検証環境
VIRL Cisco Nexus Operating System (NX-OS) Software 7.3(0)D1(1)
検証構成
初期化
1 2 3 4 5 |
switch# write erase Warning: This command will erase the startup-configuration. Do you wish to proceed anyway? (y/n) [n] y switch# reload This command will reboot the system. (y/n)? [n] y |
初期のセットアップ 下記例はadmin/adminでログインするように設定します。
パスワード入力時は実際には画面には表示されませんが、今回はadminと表示しています。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
Abort Auto Provisioning and continue with normal setup ?(yes/no)[n]: y Disabling PoAP service, please wait ... ---- System Admin Account Setup ---- Do you want to enforce secure password standard (yes/no) [y]: n Enter the password for "admin":admin Confirm the password for "admin":admin WARNING: Length should be at least 8 characters WARNING: Password should contain characters from at least three of the following classes: lower case letters, upper case letters, digits and special characters. WARNING: it is too short ---- Basic System Configuration Dialog VDC: 1 ---- 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 Nexus7000 Family devices promptly with your supplier. Failure to register may affect response times for initial service calls. Nexus7000 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 2018 Jan 2 02:00:19 switch %COPP-2-COPP_POLICY: Control-Plane is protected with policy copp-system-p-policy-strict. User Access Verification login: admin Password:admin Cisco NX-OS Software Copyright (c) 2002-2016, Cisco Systems, Inc. All rights reserved. NX-OSv software ("NX-OSv 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 NX-OSv 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 *************************************************************************** * NX-OSv is strictly limited to use for evaluation, demonstration and * * NX-OS education. NX-OSv is provided as-is and is not supported by * * Cisco's Technical Advisory Center. Any use or disclosure, in whole or * * in part of the NX-OSv Software or Documentation to any third party for * * any purposes is expressly prohibited except as otherwise authorized by * * Cisco in writing. * *************************************************************************** switch# |
ホスト名(nx-os-1)の設定
conf t(configモード)に変更して設定コマンドを投入。設定投入直後に即時反映されます。
1 2 3 4 |
switch# configure terminal Enter configuration commands, one per line. End with CNTL/Z. switch(config)# hostname nx-os-1 nx-os-1(config)# end |
設定ファイルの保存
設定ファイルの保存をしなければ、設定情報は再起動されると初期化されます。下記コマンドで設定ファイルの保存することで再起動時にも設定が反映されます。
1 2 3 4 |
nx-os-1# copy running-config startup-config [########################################] 100% Copy complete. nx-os-1# |
インターフェイスの有効化、無効化
show interface briefの状態を確認するコマンド、statusが初期状態は「down」
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
nx-os-1# show interface brief -------------------------------------------------------------------------------- Port VRF Status IP Address Speed MTU -------------------------------------------------------------------------------- mgmt0 -- up -- 1000 1500 -------------------------------------------------------------------------------- Ethernet VLAN Type Mode Status Reason Speed Por t Interface Ch # -------------------------------------------------------------------------------- Eth2/1 -- eth routed down Administratively down auto(D) -- Eth2/2 -- eth routed down Administratively down auto(D) -- Eth2/3 -- eth routed down Administratively down auto(D) -- Eth2/4 -- eth routed down Administratively down auto(D) -- Eth2/5 -- eth routed down Administratively down auto(D) -- Eth2/6 -- eth routed down Administratively down auto(D) -- Eth2/7 -- eth routed down Administratively down auto(D) -- Eth2/8 -- eth routed down Administratively down auto(D) -- Eth2/9 -- eth routed down Administratively down auto(D) -- Eth2/10 -- eth routed down Administratively down auto(D) -- Eth2/11 -- eth routed down Administratively down auto(D) -- /snip/ nx-os-1# |
インターフェイスの有効化
1 2 3 4 5 6 7 |
nx-os-1# conf t Enter configuration commands, one per line. End with CNTL/Z. nx-os-1(config)# interface breakout ethernet loopback mgmt port-channel nx-os-1(config)# interface ethernet 2/1 nx-os-1(config-if)# no shutdown nx-os-1(config-if)# end |
インターフェイスの無効化
1 2 3 4 5 |
nx-os-1# conf t Enter configuration commands, one per line. End with CNTL/Z. nx-os-1(config)# interface ethernet 2/1 nx-os-1(config-if)# shutdown nx-os-1(config-if)# end |
インターフェイスの状態確認
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
nx-os-1# show interface brief -------------------------------------------------------------------------------- Port VRF Status IP Address Speed MTU -------------------------------------------------------------------------------- mgmt0 -- up -- 1000 1500 -------------------------------------------------------------------------------- Ethernet VLAN Type Mode Status Reason Speed Por t Interface Ch # -------------------------------------------------------------------------------- Eth2/1 -- eth routed down Administratively down auto(D) -- Eth2/2 -- eth routed down Administratively down auto(D) -- Eth2/3 -- eth routed down Administratively down auto(D) -- Eth2/4 -- eth routed down Administratively down auto(D) -- Eth2/5 -- eth routed down Administratively down auto(D) -- Eth2/6 -- eth routed down Administratively down auto(D) -- Eth2/7 -- eth routed down Administratively down auto(D) -- Eth2/8 -- eth routed down Administratively down auto(D) -- Eth2/9 -- eth routed down Administratively down auto(D) -- Eth2/10 -- eth routed down Administratively down auto(D) -- Eth2/11 -- eth routed down Administratively down auto(D) -- nx-os-1# |
インターフェイスipv4アドレス設定
ipv4の192.168.0.1/24のアドレスを設定
1 2 3 4 5 6 7 8 9 10 |
nx-os-1# conf t Enter configuration commands, one per line. End with CNTL/Z. nx-os-1(config)# interface ethernet 2/1 nx-os-1(config-if)# ip address 192.168.0.1/24 nx-os-1(config-if)# end nx-os-1# show ip int b IP Interface Status for VRF "default"(1) Interface IP Address Interface Status Eth2/1 192.168.0.1 protocol-up/link-up/admin-up nx-os-1# |
インターフェイスipv6アドレス設定
ipv6の2001:db8::1/64を設定しています。
1 2 3 4 5 6 7 8 9 10 11 12 |
nx-os-1# conf t Enter configuration commands, one per line. End with CNTL/Z. nx-os-1(config)# interface ethernet 2/1 nx-os-1(config-if)# ipv6 address 2001:db8::1/64 nx-os-1(config-if)# end nx-os-1# show ipv6 int b IPv6 Interface Status for VRF "default"(1) Interface IPv6 Address/Link-local Address Interface Status prot/link/admin Eth2/1 2001:db8::1 up/up/up fe80::f816:3eff:feb5:dbb5 nx-os-1# |
デフォルトstaticルート設定
ipv4でフォルトルート(自信のルーティングテーブル記載されていないprefix以外全ての宛先)の設定
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
nx-os-1# conf t Enter configuration commands, one per line. End with CNTL/Z. nx-os-1(config)# ip route 0.0.0.0/0 192.168.0.2 nx-os-1(config)# end nx-os-1# show ip route static IP Route Table for VRF "default" '*' denotes best ucast next-hop '**' denotes best mcast next-hop '[x/y]' denotes [preference/metric] '%<string>' in via output denotes VRF <string> 0.0.0.0/0, ubest/mbest: 1/0 *via 192.168.0.2, [1/0], 00:00:09, static nx-os-1# |
show コマンドでstaticの設定ができたことを確認します。
ipv6でフォルトルート(自信のルーティングテーブル記載されていないprefix以外全ての宛先)の設定
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
nx-os-1# conf t Enter configuration commands, one per line. End with CNTL/Z. nx-os-1(config)# ipv6 route ::/0 2001:db8::2 nx-os-1(config)# end nx-os-1# show ipv6 route static IPv6 Routing Table for VRF "default" '*' denotes best ucast next-hop '**' denotes best mcast next-hop '[x/y]' denotes [preference/metric] 0::/0, ubest/mbest: 1/0 *via 2001:db8::2/128, [1/0], 00:00:06, static nx-os-1# |
スポンサーリンク
nx-os-3の設定
staticの設定
nx-os-2,nx-os-3のホスト名、interfaceの設定は設定済みとします。
今回はデフォルトルートゲートではなく個別のprefixのstatic設定をします。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
nx-os-3# conf t Enter configuration commands, one per line. End with CNTL/Z. nx-os-3(config)# ip route 192.168.0.0/24 192.168.1.2 nx-os-3(config)# end nx-os-3# show ip route static IP Route Table for VRF "default" '*' denotes best ucast next-hop '**' denotes best mcast next-hop '[x/y]' denotes [preference/metric] '%<string>' in via output denotes VRF <string> 192.168.0.0/24, ubest/mbest: 1/0 *via 192.168.1.2, [1/0], 00:00:08, static nx-os-3# |
ipv6も同様に個別のprefixを設定します。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
nx-os-3# conf t Enter configuration commands, one per line. End with CNTL/Z. nx-os-3(config)# ipv6 route 2001:db8::/64 2001:db8:1::2 nx-os-3(config)# end nx-os-3# show ipv6 route static IPv6 Routing Table for VRF "default" '*' denotes best ucast next-hop '**' denotes best mcast next-hop '[x/y]' denotes [preference/metric] 2001:db8::/64, ubest/mbest: 1/0 *via 2001:db8:1::2/128, [1/0], 00:00:07, static nx-os-3# |
疎通確認
IPv4 および IPv6 共にPingが通り疎通がとれました。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
nx-os-3# ping 192.168.0.1 PING 192.168.0.1 (192.168.0.1): 56 data bytes 64 bytes from 192.168.0.1: icmp_seq=0 ttl=253 time=5.832 ms 64 bytes from 192.168.0.1: icmp_seq=1 ttl=253 time=2.591 ms 64 bytes from 192.168.0.1: icmp_seq=2 ttl=253 time=2.055 ms 64 bytes from 192.168.0.1: icmp_seq=3 ttl=253 time=2.553 ms 64 bytes from 192.168.0.1: icmp_seq=4 ttl=253 time=2.724 ms --- 192.168.0.1 ping statistics --- 5 packets transmitted, 5 packets received, 0.00% packet loss round-trip min/avg/max = 2.055/3.151/5.832 ms nx-os-3# ping6 2001:db8::1 PING6 2001:db8::1 (2001:db8::1): 56 data bytes 64 bytes from 2001:db8::1: icmp_seq=0 time=3.064 ms 64 bytes from 2001:db8::1: icmp_seq=1 time=2.866 ms 64 bytes from 2001:db8::1: icmp_seq=2 time=2.393 ms 64 bytes from 2001:db8::1: icmp_seq=3 time=2.469 ms 64 bytes from 2001:db8::1: icmp_seq=4 time=2.803 ms --- 2001:db8::1 ping6 statistics --- 5 packets transmitted, 5 packets received, 0.00% packet loss round-trip min/avg/max = 2.393/2.719/3.064 ms nx-os-3# |
設定Config
Basic-Config-nx-os-1
Basic-Config-nx-os-2
Basic-Config-nx-os-3
スポンサーリンク