티스토리 뷰


1. NXOSv 소개

NXOSv (Nexus9000v)는 시스코 스위치 제품군 가운데,  Nexus 9300 시리즈를 VM으로 구성하여 배포하는 것을 말한다.
기존 하드웨어 스위치에서 처럼 모든 기능을 동일하게 지원하지는 않지만, 주요 기능을 상당수 지원하고 있다.
NXOSv를 사용하게 되면, 물리적인 스위치가 필요없이 지원하는 다양한 기능을 시험해 볼 수 있고, 특히 자동화 관련 테스트들을 간편하게 수행할 수 있다는 점이 큰 장점이다.

아래 현재 지원하는 기능들을 정리하였다. (2019년 5월 NXOSv 9.2.3 기준)
기술
기능
지원 유무
운영체제
Bash shell
지원

Guest Shell
지원

SSH
지원

RPM Install
지원

POAP
지원
프로그래머빌리티
NXAPI
지원

Puppet
지원

Chef
지원

Ansible
지원

Docker
지원
L3기능
L3 SVI
지원

BGP
지원

OSPF
지원

EIGRP
지원

RIP
지원
L3기능
L2 Unicast
지원

L2 Multicast
지원

L2 Broadcast
지원

CDP
지원

LLDP
지원

ARP Suppressiong
지원

MAC Learning
지원

Static/Router MAC
지원

Switch Port
지원

802.1Q Trunk
지원

STP
지원

SubInterface
지원

VXLAN/VXLAN EVPN
지원

VXLAN EVPN Multi-Site
지원

vPC
지원

PortChannel
지원

SNMP
지원


2. VMware ESX 환경에서의 Nexus9000v 구성

사전 준비 작업

  • Cisco 웹사이트에서 Nexus 9000v 다운로드
  • ESX Host
  • 시스템 권장 사양
    • 메모리 8GB (최소 5GB) - 메모리를 상당히 많이 차지하므로, 랩탑에서 수행하는 것을 권장하지 않는다.
    • 4vCPU - vCPU 이므로 크게 신경쓰지 않아도 된다.
    • 4GB 디스크 - Thin Provisioning으로 수행하면 디스크는 크게 차지 하지 않는다.
    • 1개 Serial Port - 가상화에서 제공하는 Serial 포트 기능으로, 사전 작업시 설정하면 된다. (반드시 설정해야 구동된다.)

Step.1 OVA 파일 배포

먼저 Cisco 웹페이지에서 OVA 파일을 다운로드 받는다.



vCenter 또는 ESX Web Client에서 OVF 파일 배포를 선택하여, 앞서 다운로드 받은 OVA파일을 선택한다.




설치할 OVF Template의 Switch 이름을 적절하게 선언한다.
배포전에 OVF의 상세정보를 확인한다.

OVF의 스토리지 배포 타입과 볼륨을 선택한다.

6개의 인터페이스를 기본 제공하고 있다.
VM Ethernet 1이 Management Interface에 해당이 된다.
VM Ethernet 2 ~6까지가 실제 Nexus9000v 가상스위치에서 Ethernet 1/1 ~5까지 연결 구성되므로 사전에 이해하고 있는 것이 구성에 매우 용이하다.

배포 전에 최종 구성정보를 확인하고 설치를 시작한다.


Step2. 가상화 환경을 위한 NXOSv 9000 콘솔 포트 구성하기.

기존 Nexus 1000V 가상스위치와 동일하게 , NXOSv 9000 스위치에서는 최초 구성시 콘솔 포트 구성이 필요하다.
VMware ESX환경에서는 기본 disable되어 있기 때문에, NXOSv 9000 가상 스위치가 탑재되는 ESX에서 반드시 Serial Port를 활성화 시켜야 한다.
UI 환경에서도 구성이 가능하지만, 간단하게 CLI에서도 가능하기 때문에 아래와 같이 ESX Console에서 RemoteSerialPort를 허용한다.

[root@DC1-ESX35:~] esxcli network firewall ruleset set --enabled true --ruleset-id=remoteSerialPort
[root@DC1-ESX35:~] esxcli network firewall ruleset list | grep remoteSerialPort
remoteSerialPort             true

ESX Host에서 RemoteSerialPort 설정이 완료되면, Step1에서 배포한 NXOSv 9000 가상스위치에서도 Serial Port구성 작업을 진행한다.
아래 그림의 예제는 vCenter 6.7U1에서의 구성환경으로 UI가 다른 환경에서도 설정값은 동일하다.
해당 NXOSv 9000 가상 스위치에서 Edit 메뉴에서 구성할 수 있다.


이제 구성이 완료되었고, VM을 구동한다.
VM을 구동하고, VM 콘솔을 통해 확인해 보면 아래와 같이 ROMON으로 떨어져서 동작하지 않는 것을 확인 할 수 있다.


loader> dir

# 현재 built in 되어 있는 이미지를 확인한다.

Loader> boot bootflash:nxos.9.2.3.bin

# 해당 이미지로 부팅을 시작한다.


모두 부팅이 완료되면, 이제 가상의 시리얼 콘솔로 접속이 가능하다.

[whchoi@ansible ~]$ telnet 10.72.86.35 2001
# NXOSv가 설치된 ESX의 Host IP주소와 서비스 포트 번호를 선언한다.

Trying 10.72.86.35...
Connected to 10.72.86.35.
Escape character is '^]'.
2019 May  8 07:06:57 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9OL8152KWRX-00:50:56:8F:6E:B2] - USB Initializing Success
2019 May  8 07:06:57 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9OL8152KWRX-00:50:56:8F:6E:B2] - USB disk not detected
2019 May  8 07:06:57 switch %$ VDC-1 %$ last message repeated 1 time
2019 May  8 07:06:57 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9OL8152KWRX-00:50:56:8F:6E:B2] - Start DHCP v6 session
2019 May  8 07:06:57 switch %$ VDC-1 %$ %POAP-2-POAP_DHCP_DISCOVER_START: [9OL8152KWRX-00:50:56:8F:6E:B2] - POAP DHCP Discover phase started
2019 May  8 07:06:57 switch %$ VDC-1 %$ %POAP-2-POAP_INFO:   - Abort Power On Auto Provisioning [yes - continue with normal setup, skip - bypass password and basic configuration, no - continue with Power On Auto Provisioning] (yes/skip/no)[no]:yes
2019 May  8 07:07:07 switch %$ VDC-1 %$ %ASCII-CFG-2-CONF_CONTROL: System ready
2019 May  8 07:07:25 switch %$ VDC-1 %$ %VMAN-2-ACTIVATION_STATE: Successfully activated virtual service 'guestshell+'
2019 May  8 07:07:25 switch %$ VDC-1 %$ %VMAN-2-GUESTSHELL_ENABLED: The guest shell has been enabled. The command 'guestshell' may be used to access it, 'guestshell destroy' to remove it.
Disabling POAP.......Disabling POAP
2019 May  8 07:07:57 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: [9OL8152KWRX-00:50:56:8F:6E:B2] - Start DHCP v4 session
2019 May  8 07:07:57 switch %$ VDC-1 %$ %POAP-2-POAP_DHCP_DISCOVER_START: [9OL8152KWRX-00:50:56:8F:6E:B2] - POAP DHCP Discover phase started
2019 May  8 07:08:02 switch %$ VDC-1 %$ poap: Rolling back, please wait... (This may take 5-15 minutes)

         ---- System Admin Account Setup ----

Do you want to enforce secure password standard (yes/no) [y]:

Do you want to enforce secure password standard (yes/no) [y]: no
  Enter the password for "admin":
  Confirm the password for "admin”:

This setup utility will guide you through the basic configuration of
the system. Setup configures only enough connectivity for management
of the system.
Please register Cisco Nexus9000 Family devices promptly with your
supplier. Failure to register may affect response times for initial
service calls. Nexus9000 devices must be registered to receive
entitled support services.
Press Enter at anytime to skip a dialog. Use ctrl-c at anytime
to skip the remaining dialogs.

Would you like to enter the basic configuration dialog (yes/no): no

User Access Verification
login: admin
Password:


Cisco NX-OS Software
Copyright (c) 2002-2019, Cisco Systems, Inc. All rights reserved.
Nexus 9000v software ("Nexus 9000v Software") and related documentation,
files or other reference materials ("Documentation") are
the proprietary property and confidential information of Cisco
Systems, Inc. ("Cisco") and are protected, without limitation,
pursuant to United States and International copyright and trademark
laws in the applicable jurisdiction which provide civil and criminal
penalties for copying or distribution without Cisco's authorization.


Any use or disclosure, in whole or in part, of the Nexus 9000v Software
or Documentation to any third party for any purposes is expressly
prohibited except as otherwise authorized by Cisco in writing.
The copyrights to certain works contained herein are owned by other
third parties and are used and distributed under license. Some parts
of this software may be covered under the GNU Public License or the
GNU Lesser General Public License. A copy of each such license is
available at
http://www.gnu.org/licenses/gpl.html and
http://www.gnu.org/licenses/lgpl.html
***************************************************************************
*  Nexus 9000v is strictly limited to use for evaluation, demonstration   *
*  and NX-OS education. Any use or disclosure, in whole or in part of     *
*  the Nexus 9000v Software or Documentation to any third party for any   *
*  purposes is expressly prohibited except as otherwise authorized by     *
*  Cisco in writing.                                                      *
***************************************************************************

switch# dir
       4096    May 08 05:51:12 2019  .rpmstore/
       4096    May 08 05:51:30 2019  .swtam/
    1158407    May 08 06:30:17 2019  20190508_060615_poap_30812_1.log
    2097174    May 08 06:22:46 2019  20190508_060615_poap_30812_init.log
     493616    May 08 06:53:11 2019  20190508_063428_poap_30830_1.log
    2097295    May 08 06:50:08 2019  20190508_063428_poap_30830_init.log
       1680    May 08 06:57:06 2019  20190508_065645_poap_30801_init.log
     536351    May 08 07:05:45 2019  20190508_070059_poap_30823_init.log
      34634    May 08 07:08:14 2019  20190508_070630_poap_30816_init.log
1335985152    Feb 17 15:32:36 2019  nxos.9.2.3.bin
          0    May 08 07:11:12 2019  platform-sdk.cmd
       4096    May 08 05:52:19 2019  scripts/
       4096    May 08 05:53:00 2019  virt_strg_pool_bf_vdc_1/
       4096    May 08 05:51:50 2019  virtual-instance/
         59    May 08 05:51:42 2019  virtual-instance.conf


Usage for bootflash://
1521803264 bytes used
1948307456 bytes free
3470110720 bytes total

switch(config)# boot nxos bootflash:nxos.9.2.3.bin
Performing image verification and compatibility check, please wait….

switch(config)# copy r s

Nexus9000v의 연결에 대한 논리적 구조는 다음과 같이 구성된다.


실제 중요한 것은 이러한 Serial Port를 가상으로 연결하는 방식은 , ESX의 관리용 VMkernel Port를 사용하는 방식으로 ESX에 Dependency를 가져가게 된다.
따라서 vMotion,HA가 발생할 경우에는 Console Port를 사용하지 못하게 된다.
만약 Cluster로 구성된 방식이라면, Policy기반으로 구성하여 Nexus9000v VM들이 특정 호스트에 매핑되도록 정책을 선언하면 된다.
아래와 같은 방식으로 필자는 구성하였다.
vCenter가 없고, Cluster를 구성하지 않은 단독 호스트라면 아래 옵션을 사용하지 않아도 된다.


모두 구성이 완료된 이후 vCenter에서 아래와 같이 확인이 가능하다.


마지막으로 Console이외에 SSH 접속이 가능하도록 설정하여, 외부에서 SSH로 접속하도록 구성해 준다.

NXOSv-S2# sh running-config interface mgmt 0

interface mgmt0
  vrf member management
  ip address 10.72.78.172/25

NXOSv-S2# sh running-config vrf management

vrf context management
  ip route 0.0.0.0/0 10.72.78.129

# SSH 접속을 위해 관리 IP와 Routing Table을 구성한다.

NXOSv-S2(config)# feature scp-server
NXOSv-S2(config)# feature sftp-server
NXOSv-S2(config)# feature nxapi
NXOSv-S2(config)# feature privilege

# 외부에서 REST API 연동 및 안전한 파일 전송을 위해 SCP/SFTP Server를 활성화 한다.

cent7 $ ssh NXOSv-S2
User Access Verification


Cisco NX-OS Software
Copyright (c) 2002-2019, Cisco Systems, Inc. All rights reserved.
Nexus 9000v software ("Nexus 9000v Software") and related documentation,
files or other reference materials ("Documentation") are
the proprietary property and confidential information of Cisco
Systems, Inc. ("Cisco") and are protected, without limitation,
pursuant to United States and International copyright and trademark
laws in the applicable jurisdiction which provide civil and criminal
penalties for copying or distribution without Cisco's authorization.


Any use or disclosure, in whole or in part, of the Nexus 9000v Software
or Documentation to any third party for any purposes is expressly
prohibited except as otherwise authorized by Cisco in writing.
The copyrights to certain works contained herein are owned by other
third parties and are used and distributed under license. Some parts
of this software may be covered under the GNU Public License or the
GNU Lesser General Public License. A copy of each such license is
available at
http://www.gnu.org/licenses/gpl.html and
http://www.gnu.org/licenses/lgpl.html
***************************************************************************
*  Nexus 9000v is strictly limited to use for evaluation, demonstration   *
*  and NX-OS education. Any use or disclosure, in whole or in part of     *
*  the Nexus 9000v Software or Documentation to any third party for any   *
*  purposes is expressly prohibited except as otherwise authorized by     *
*  Cisco in writing.                                                      *
***************************************************************************
NXOSv-S2#

# 외부에서 정상적으로 SSH가 접속되는 것을 확인 할 수 있다.




'네트워크 > Nexus Switch' 카테고리의 다른 글

NXOSv 네트워크 구축 2편  (0) 2019.05.10
Nexus Switch NTP 구성  (0) 2019.03.24
Nexus Switch SSH Key 기반 로그인 관리  (0) 2019.03.24
공지사항