Download as pdf or txt
Download as pdf or txt
You are on page 1of 86

Cisco Nexus

基本設定ハンズオン
〜 初級編 〜

シスコシステムズ合同会社
クラウドインフラストラクチャ&ソフトウェア事業
2022年11月
ハンズオンの流れ
1. 初期セットアップ
2. 基本設定
• Nexusへのログイン
• L2設定
• L3設定
• vPC設定
3. Nexus Tips集

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
2
Nexus ハンズオン 構成図

© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
ハンズオン環境
Web-host
10.10.50.10/24

gi5
gi2 gi2
Nexus9000v デバイスのログイン情報 CSR-1 CSR-2 CSR1000v
ID:admin gi4 gi3

Password:C1sco12345
1/5 1/5

1/1 1/1
Spine-1 1/2 1/2
Spine-2
1/4 1/4
Nexus9000v

1/5 1/5
1/1 1/1
Leaf-1 1/2 1/2
Leaf-2
1/4 1/4

ESXi-1 Server-3
Server-1 20.20.20.20/24 10.10.10.10/24
Server-2 20.20.20.50/24
© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
4
• コンソールログイン
1. 初期セットアップ
• 管理用Interface設定

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
5
1:初期セットアップ
この章では初回ログイン時の設定方法や管理Interfaceの設定方法を学びます。
なお、今回のハンズオン環境ではこれらの設定は設定済みです。

(1) コンソールログイン

(2) 管理用 Interface 設定


管理 VRF の設定
※今回は既に実施済み
Nexus 9500
Nexus 9300

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
6
このパートは
コンソールログイン 既に実施済みです

⚫ 初回ログイン時、パスワードの変更が求められます。
---- System Admin Account Setup ----

Do you want to enforce secure password standard (yes/no) [y]: y password strength-checkの有無

Enter the password for "admin": C1sco12345 と入力


Confirm the password for "admin":

---- Basic System Configuration Dialog ----

This setup utility will guide you through the basic configuration of
the system. Setup configures only enough connectivity for management
of the system.
<省略>

⚫ 初期設定ダイアログを使用しないため、noと入力し、ログインします。
Would you like to enter the basic configuration dialog (yes/no) [y]: no
User Access Verification
switch login: admin Passwordはセキュリティ上、
Password: C1sco12345 でログイン 入力しても表示されません。

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
7
このパートは
管理用Interface(mgmt0)の設定 既に実施済みです

⚫ IOS と同じく、 “configure terminal” で config モードに移動します。


ホスト名を設定します。
switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.

switch(config)# hostname Spine-1


Spine-1(config)#

⚫ 管理用 Interface の設定 (mgmt0)します。


Spine-1(config)# interface mgmt0
Spine-1(config-if)# ip address 198.18.4.201/24 今回の環境は以下になっております。
hostname Interface mgmt0
ip address
hostname Spine-1
⚫ 必要に応じて、Static Route の設定します。 198.18.4.201/24
ip address
Spine-1(config)# vrf context management hostname Spine-2
198.18.4.202/24
Spine-1(config-vrf)# ip route 0.0.0.0/0 198.18.4.254
ip address
hostname Leaf-1
198.18.4.101/24
ip address
hostnameand
Cloud Infrastructure Leaf-2
Software Group
© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 198.18.4.102/24 8
参考:管理用Interface 解説
⚫ 管理 interface として、“mgmt0” を使用します。
⚫ 専用のポートがあり、Nexus9500 の場合 Supervisor 上に あります。
⚫ mgmt0 のみが管理 VRF (management VRF)に所属します。
Spine-1 # show vrf
VRF-Name VRF-ID State Reason
default 1 Up --
management 2 Up --
Spine-1 # show vrf management interface
Interface VRF-Name VRF-ID Site-of-Origin
mgmt0 management 2 --

Console port
Nexus93180YC-FX3 背面

Console port
Management port
(RJ45)
Management port Nexus
(RJ45) 9504

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
9
• Nexusへのログイン
• L2設定
2. 基本設定
• L3設定
• vPC設定

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
10
Nexusスイッチへログイン
⚫ CLI で Nexus を設定していきます。
⚫ Spine-1, Spine-2,Leaf-1, Leaf-2 にMTPuTTY から
コンソールログインします。 各スイッチをダブル
各スイッチをダブル
• username: admin クリックすることで、
クリックすることで、
タブが展開されます。
タブが展開されます。
• password : C1sco12345

User Access Verification


Spine-1 login: admin
admin Passwordはセキュリティ上、
Password: C1sco12345 でログイン 入力しても表示されません。

Cisco NX-OS Software


Copyright (c) 2002-2019, Cisco Systems, Inc. All rights reserved.
<省略>

Spine-1#

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
11
参考:showコマンドの確認
⚫ NX-OS はどの階層化の設定モードでも show command や ping コマンドの実行が可能です。
⚫ “show version”, “show module” ,“show run” が configuration mode から
そのまま実行可能な事を確認してください。
⚫ [TAB] や [?] を使用してみてください。 Configuration mode であっても、その場でパーサにより補助されます。

Spine-1# conf t
Enter configuration commands, one per line. End with CNTL/Z.
Spine-1(config)# show module
Mod Ports Module-Type Model Status
--- ----- ------------------------------------- --------------------- ---------
1 128 Nexus 9000v Ethernet Module N9K-9000v active *
<以下略>

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
12
参考:IOS由来の馴染み深いCLI提供 “NX-OS”
NX-OS と Catalyst IOS は、ほぼ同等の操作性を有しています。

NX-OSコマンドの特徴
⚫ “feature” コマンドで、利用機能を有効化(起動)する必要があります。
※拡張機能のプロセスはデフォルトで起動していません。
例:feature telnet,feature interface-vlan,feature nv overlay など
nexus# config t
nexus(config)# feature interface-vlan

⚫ モードに関係なく、どこでも “show” コマンドを実行可能


nexus(config)# show running-config
nexus(config-if)# show running-config

⚫ インタフェース モードの開始が容易に!全て “ethernet” に統一化


nexus# config t nexus# config t
nexus(config)# interface ethernet 1/1 nexus(config)# interface ethernet 1/1-10
nexus(config-if)# nexus(config-if)#

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
13
• Nexusへのログイン
• L2設定
2. 基本設定
• L3設定
• vPC設定

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
14
L2設定
⚫ VLAN, Port-Channel, STP を設定します。

1. VLAN作成
各Spine/Leafにvlan10,20を作成
2. Trunk設定
• Spine-Leaf間のインタフェースにTrunk設定
※vlan10,20を割当て Po200
• LeafのServerを接続するインタフェースにTrunk設定
※vlanを割当て VLAN 10,
3. Port-channel作成 20
• Spine-1とSpine-2間のインタフェースに Po100
Port-Channel 200を設定 ※memberポートはe1/1-2
• Leaf-1とLeaf-2間のインタフェースに
VLAN VLAN
Port-Channel 100を設定 ※memberポートはe1/1-2 20 10
4. STPの状態を確認,Priority設定
Spine-1がRoot BridgeになるようPriority設定
5. STP ポートタイプ設定

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
15
L2設定:VLAN作成
⚫ Spine/LeafにVLAN 10,20を作成します。
Spine-1(config)# vlan 10,20 Leaf-1(config)# vlan 10,20

Spine-2(config)# vlan 10,20 Leaf-2(config)# vlan 10,20

⚫ show vlan で確認します。 Spine-1, Spine-2, Leaf-1, Leaf-2で


Vlan 10,20が作成されていることを確認します。
Spine-1(config-vlan)# show vlan

VLAN Name Status Ports


---- -------------------------------- --------- -------------------------------
<省略>
10 VLAN0010 active
20 VLAN0020 active

VLAN Type Vlan-mode


---- ----- ----------
1 enet CE
10 enet CE
20 enet CE
<省略>

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group 16
L2設定:Trunk設定

⚫ Spine-Leaf間にTrunkの設定します。
Spine-1(config)# interface ethernet 1/3-4 Leaf-1(config)# interface ethernet 1/5-6
Spine-1(config-if-range)# no shutdown Leaf-1(config-if-range)# no shutdown
Spine-1(config-if-range)# switchport Leaf-1(config-if-range)# switchport
Spine-1(config-if-range)# switchport mode trunk Leaf-1(config-if-range)# switchport mode trunk
Spine-1(config-if-range)# switchport trunk allowed vlan 10,20 Leaf-1(config-if-range)# switchport trunk allowed vlan 10,20

Spine-2(config)# interface ethernet 1/3-4 Leaf-2(config)# interface ethernet 1/5-6


Spine-2(config-if-range)# no shutdown Leaf-2(config-if-range)# no shutdown
Spine-2(config-if-range)# switchport Leaf-2(config-if-range)# switchport
Spine-2(config-if-range)# switchport mode trunk Leaf-2(config-if-range)# switchport mode trunk
Spine-2(config-if-range)# switchport trunk allowed vlan 10,20 Leaf-2(config-if-range)# switchport trunk allowed vlan 10,20

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group 17
L2設定:Trunk設定(続き)

⚫ Leaf-Server間にTrunkの設定します。
Leaf-1(config)# interface ethernet 1/3 Leaf-2(config)# interface ethernet 1/3
Leaf-1(config-if)# no shutdown Leaf-2(config-if)# no shutdown
Leaf-1(config-if)# switchport Leaf-2(config-if)# switchport
Leaf-1(config-if)# switchport mode trunk Leaf-2(config-if)# switchport mode trunk
Leaf-1(config-if)# switchport trunk allowed vlan 10 Leaf-2(config-if)# switchport trunk allowed vlan 20

Leaf-1(config)# interface ethernet 1/4 Leaf-2(config)# interface ethernet 1/4


Leaf-1(config-if)# no shutdown Leaf-2(config-if)# no shutdown
Leaf-1(config-if)# switchport Leaf-2(config-if)# switchport
Leaf-1(config-if)# switchport mode trunk Leaf-2(config-if)# switchport mode trunk
Leaf-1(config-if)# switchport trunk allowed vlan 20 Leaf-2(config-if)# switchport trunk allowed vlan 10

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group 18
L2設定:Port-Channel作成
⚫ Spine-1 と Spine-2 間に Port-Channel を作成します。
Spine-1(config)# feature lacp Port-Channel を利用するために “LACP” を有効にします。
※機能ごとに有効化/無効化するのがNX-OSの特徴
Spine-1(config)# interface ethernet 1/1-2
Spine-1(config-if-range)# no shutdown
Spine-1(config-if-range)# switchport
Spine-1(config-if-range)# switchport mode trunk
Spine-1(config-if-range)# switchport trunk allowed vlan 10,20
Spine-1(config-if-range)# channel-group 200 mode active

Spine-1(config)# interface port-channel 200


Spine-1(config-if)# description Link to Spine-2

Spine-2(config)# feature lacp

Spine-2(config)# interface ethernet 1/1-2


Spine-2(config-if-range)# no shutdown
Spine-2(config-if-range)# switchport
Spine-2(config-if-range)# switchport mode trunk
Spine-2(config-if-range)# switchport trunk allowed vlan 10,20
Spine-2(config-if-range)# channel-group 200 mode active

Spine-2(config)# interface port-channel 200


Spine-2(config-if)# description Link to Spine-1

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group 19
L2設定:Port-Channel作成(続き)
⚫ Spine-1, Spine-2 のTrunkを確認します。
Spine-1(config-if)# show interface trunk
<省略>
--------------------------------------------------------------------------------
Port Vlans Allowed on Trunk
--------------------------------------------------------------------------------
Eth1/1 10,20
Eth1/2 10,20
Eth1/3 10,20
Eth1/4 10,20
Po200 10,20
<省略>

Spine-2(config-if)# show interface trunk


<省略>
--------------------------------------------------------------------------------
Port Vlans Allowed on Trunk
--------------------------------------------------------------------------------
Eth1/1 10,20
Eth1/2 10,20
Eth1/3 10,20
Eth1/4 10,20
Po200 10,20
<省略>

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
20
L2設定:Port-Channel作成(続き)

⚫ Spine-1,Spine-2のport-channel ステータスを show port-channel summary で確認します。


Spine-1(config-if)# show port-channel summary Spine-1, Spine-2 で確認します。
Flags: D - Down P - Up in port-channel (members)
I - Individual H - Hot-standby (LACP only)
s - Suspended r - Module-removed
b - BFD Session Wait
S - Switched R - Routed
U - Up (port-channel)
p - Up in delay-lacp mode (member)
M - Not in use. Min-links not met
--------------------------------------------------------------------------------
Group Port- Type Protocol Member Ports
Channel
--------------------------------------------------------------------------------
200 Po200(SU) Eth LACP Eth1/1(P) Eth1/2(P)

SUになっていることを確認します。
© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
21
L2設定:Port-Channel作成(続き)

⚫ Leaf-1 と Leaf-2 間に Port-Channel を作成します。


Leaf-1(config)# feature lacp Port-Channel を利用するために “LACP” を
有効にします。
Leaf-1(config)# interface ethernet 1/1-2
Leaf-1(config-if-range)# no shutdown
Leaf-1(config-if-range)# switchport
Leaf-1(config-if-range)# switchport mode trunk
Leaf-1(config-if-range)# switchport trunk allowed vlan 10,20
Leaf-1(config-if-range)# channel-group 100 mode active

Leaf-1(config)# interface port-channel 100


Leaf-1(config-if)# description Link to Leaf-2

Leaf-2(config)# feature lacp

Leaf-2(config)# interface ethernet 1/1-2


Leaf-2(config-if-range)# no shutdown
Leaf-2(config-if-range)# switchport
Leaf-2(config-if-range)# switchport mode trunk
Leaf-2(config-if-range)# switchport trunk allowed vlan 10,20
Leaf-2(config-if-range)# channel-group 100 mode active

Leaf-2(config)# interface port-channel 100


Leaf-2(config-if)# description Link to Leaf-1
© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
22
L2設定:Port-Channel作成(続き)
⚫ Leaf-1, Leaf-2 のTrunkを確認します。
Leaf-1(config-if)# show interface trunk
<省略>
--------------------------------------------------------------------------------
Port Vlans Allowed on Trunk
--------------------------------------------------------------------------------
Eth1/1 10,20
Eth1/2 10,20
Eth1/3 10
Eth1/4 20
Eth1/5 10,20
Eth1/6 10,20
Po100 10,20
<省略>

Leaf-2(config-if)# show interface trunk


<省略>
--------------------------------------------------------------------------------
Port Vlans Allowed on Trunk
--------------------------------------------------------------------------------
Eth1/1 10,20
Eth1/2 10,20
Eth1/3 20
Eth1/4 10
Eth1/5 10,20
Eth1/6 10,20
Po100 10,20
© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
<省略> 23
L2設定:Port-Channel作成(続き)

⚫ Leaf-1,Leaf-2のport-channel ステータスを show port-channel summary で確認します。


Leaf-1(config-if)# show port-channel summary Leaf-1, Leaf-2 で確認します。
Flags: D - Down P - Up in port-channel (members)
I - Individual H - Hot-standby (LACP only)
s - Suspended r - Module-removed
b - BFD Session Wait
S - Switched R - Routed
U - Up (port-channel)
p - Up in delay-lacp mode (member)
M - Not in use. Min-links not met
--------------------------------------------------------------------------------
Group Port- Type Protocol Member Ports
Channel
--------------------------------------------------------------------------------
100 Po100(SU) Eth LACP Eth1/1(P) Eth1/2(P)

SUになっていることを確認します。
© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
24
L2設定:STP の状態を確認, priority の設定

⚫ NX-OSでのデフォルトのSTPモードはRPVST+です。
Spine-1# show spanning-tree summary
Switch is in rapid-pvst mode
Root bridge for: none
L2 Gateway STP is disabled
Port Type Default is disable
Edge Port [PortFast] BPDU Guard Default is disabled
Edge Port [PortFast] BPDU Filter Default is disabled
Bridge Assurance is enabled
Loopguard Default is disabled
Pathcost method used is short
STP-Lite is disabled

⚫ Spine-1 が root bridge になるよう、Spine-1 と Spine-2の priority値 を設定します。


Spine-1(config)# spanning-tree vlan 10,20 priority 8192
デフォルト: 32768
Spine-2(config)# spanning-tree vlan 10,20 priority 16384

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
25
L2設定:STP の状態を確認, priority の設定(続き)
⚫ Spine-1, Spine-2 のpriority値を確認します。
Spine-1(config)# show spanning-tree

VLAN0010
<省略>
Bridge ID Priority 8202 (priority 8192 sys-id-ext 10)
<省略>
VLAN0020
<省略>
Bridge ID Priority 8212 (priority 8192 sys-id-ext 20)
<省略>

Spine-2(config)# show spanning-tree

VLAN0010
<省略>
Bridge ID Priority 16394 (priority 16384 sys-id-ext 10)
<省略>
VLAN0020
<省略>
Bridge ID Priority 16404 (priority 16384 sys-id-ext 20)
<省略>

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
26
L2設定:STP ポートタイプ設定

⚫ 対向がNexusであるポートのSTPポートタイプを「network」に設定します。
Spine-1(config)# interface port-channel 200 Leaf-1(config)# interface port-channel 100
Spine-1(config-if)# spanning-tree port type network Leaf-1(config-if)# spanning-tree port type network

Spine-2(config)# interface port-channel 200 Leaf-2(config)# interface port-channel 100


Spine-2(config-if)# spanning-tree port type network Leaf-2(config-if)# spanning-tree port type network

⚫ Leaf-1,Leaf-2の対向がホストであるポートのSTPポートタイプを「edge」に設定します。
Leaf-1(config)# interface ethernet 1/3-4 Leaf-2(config)# interface ethernet 1/3-4
Leaf-1(config-if-range)# spanning-tree port type edge trunk Leaf-2(config-if-range)# spanning-tree port type edge trunk

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
27
L2設定:BLK ポートの確認
⚫ 下図のようにBLKになっている事をLeaf-1,Leaf-2で確認します。
Leaf-1# show spanning-tree
VLAN20でも同ポートがBLKになります。
VLAN0010
<省略>
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Po100 Desg FWD 3 128.4195 Network P2p
Eth1/3 Desg FWD 4 128.3 Edge P2p
Eth1/5 Root FWD 4 128.5 P2p
Eth1/6 Altn BLK 4 128.6 P2p
<省略>

Leaf-2# show spanning-tree

VLAN0010
<省略>
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Po100 Altn BLK 3 128.4195 Network P2p 一部ポートがBLKになるため、
Eth1/4 Desg FWD 4 128.4 Edge P2p 帯域が有効活用できていない状態となります。
Eth1/5 Altn BLK 4 128.5 P2p
Eth1/6 Root FWD 4 128.6 P2p
<省略>
© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
28
参考:STP ポートタイプ
⚫ NexusのSTPには、ポートタイプという概念が存在します。

タイプ 説明 主な接続先
デフォルトのモードです。 スイッチ
Normal 従来のSTPポートに該当します。 ホスト
Network Bridge Assuranceを使用する際に使用します。 Nexus
blockingやlearning statesを経由せず、すぐにforwarding stateに移行します。
Edge 従来のportfastに該当します。
ホスト

Switch(config-if)# spanning-tree port type ?


edge Consider the interface as edge port (enable portfast)
network Consider the interface as inter-switch link
normal Consider the interface as normal spanning tree port

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
29
参考:Bridge Assuranceとは?
⚫ Bridge Assuranceとは、片方向リンク障害やソフトウェア障害などを原因とするブリッジング ループを防ぐための機能です。

Bridge Assuranceが無効だと、、 Bridge Assuranceが有効なら!

右側のNexusにS/W障害が発生しBPDUを処理できなくなって 右側のNexusからBPDUが受信されなくなることで
しまうと、ブロッキングポートが解除され、ループ構成となってしまいます。 ポートをブロッキングにするため、ループを防ぐことが可能です。

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
30
参考:Spine-1のサンプルConfig
Spine-1# show running-config ▼各インタフェースの設定 interface mgmt0
interface Ethernet1/1 no cdp enable ※設定済み
!Command: show running-config switchport mode trunk vrf member management Spin-2は、198.18.4.202/24
!Running configuration last done at: Tue Aug 2 04:48:49 2022 switchport trunk allowed vlan 10,20 ip address 198.18.4.201/24
!Time: Tue Aug 2 05:39:30 2022 channel-group 200 mode active line console
line vty
version 9.2(3) Bios:version interface Ethernet1/2 boot nxos bootflash:/nxos.9.2.3.bin
hostname Spine-1 switchport mode trunk
switchport trunk allowed vlan 10,20
(省略) channel-group 200 mode active
feature lacp
interface Ethernet1/3
(省略) switchport mode trunk
※Spine-2のpriority値は switchport trunk allowed vlan 10,20
vlan 1,10,20 16384
interface Ethernet1/4
spanning-tree vlan 10,20 priority 8192 switchport mode trunk
vrf context management switchport trunk allowed vlan 10,20
ip route 0.0.0.0/0 198.18.4.254
interface Ethernet1/5
▼Port-channel 200 ※設定済み
no switchport
interface port-channel200 ip address 10.10.40.2/24 Spin-2は、10.10.60.2/24
description Link to Spine-2 no shutdown
switchport mode trunk
switchport trunk allowed vlan 10,20 interface Ethernet1/6 ※設定済み
spanning-tree port type network no switchport Spin-2は、10.10.30.2/24
no shutdown

(省略)

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
31
参考:Leaf-1のサンプルConfig
Leaf-1# show running-config channel-group 100 mode active interface mgmt0
no cdp enable ※設定済み
!Command: show running-config interface Ethernet1/2 vrf member management Leaf-2は、198.18.4.102/24
!Running configuration last done at: Tue Aug 2 04:54:56 2022 switchport mode trunk ip address 198.18.4.101/24
!Time: Tue Aug 2 05:59:30 2022 switchport trunk allowed vlan 10,20 line console
channel-group 100 mode active line vty
version 9.2(3) Bios:version boot nxos bootflash:/nxos.9.2.3.bin
hostname Leaf-1 #Server収容ポート
interface Ethernet1/3 ※Leaf-2のe1/3は
(省略) switchport mode trunk vlan 20
feature lacp switchport trunk allowed vlan 10
spanning-tree port type edge trunk
(省略)
interface Ethernet1/4 ※Leaf-2のe1/4は
vlan 1,10,20 switchport mode trunk vlan 10
switchport trunk allowed vlan 20
vrf context management spanning-tree port type edge trunk
ip route 0.0.0.0/0 198.18.4.254
#Spineとの接続ポート
▼Port-channel 100 interface Ethernet1/5
interface port-channel100 switchport mode trunk
description Link to Leaf-2 switchport trunk allowed vlan 10,20
switchport mode trunk
switchport trunk allowed vlan 10,20 interface Ethernet1/6
spanning-tree port type network switchport mode trunk
switchport trunk allowed vlan 10,20
▼各インタフェースの設定
interface Ethernet1/1 (省略)
switchport mode trunk
switchport trunk allowed vlan 10,20

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
32
• Nexusへのログイン
• L2設定
2. 基本設定
• L3設定
• vPC設定

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
33
L3設定
⚫ SVI,HSRP,OSPF を設定します。 1. SpineとCSR間のインタフェースの設定
※本ハンズオンでは設定済み
gi1: 198.18.4.51/24 gi1: 198.18.4.52/24
gi2: 10.10.20.1 gi2: 10.10.20.2 2. SVIの作成
gi3: 10.10.30.1 gi3: 10.10.60.1
gi4: 10.10.40.1 lo1: 7.7.7.7 3. HSRPの設定
gi5: 10.10.50.1 ※Spine-1をActiveに
OSPF 100 VLAN 10 SVI: 4. OSPFの設定
VLAN 10 SVI: 10.10.10.2/24
10.10.10.1/24 VLAN 20 SVI: ※Spine対象
VLAN 20 SVI: 20.20.20.2/24
Eth1/5: 10.10.60.2/24
5. Web-hostとESXi-1間で疎通確認
20.20.20.1/24
HSRPEth1/5:
10 / VLAN 10 VIP :
10.10.40.2/24 Eth1/6: 10.10.30.2/24 ※Web-hostから実施
Po200
10.10.10.254
HSRP 20 / VLAN 20 VIP :
20.20.20.254
VLAN 10, 20

Po100

VLAN VLAN
20 10

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
34
このパートは
L3設定:L3 IF の設定 CSR側も設定済みです。 既に実施済みです

⚫ Spine-1,Spine-2 と ルータを接続する L3 IF の設定をします。


Spine-1(config)# interface ethernet 1/5 Spine-2(config)# interface ethernet 1/5
Spine-1(config-if)# no shutdown Spine-2(config-if)# no shutdown
Spine-1(config-if)# no switchport Spine-2(config-if)# no switchport
Spine-1(config-if)# ip address 10.10.40.2/24 Spine-2(config-if)# ip address 10.10.60.2/24

Spine-2(config)# interface ethernet 1/6


Spine-2(config-if)# no shutdown
Spine-2(config-if)# no switchport
今回はいずれのポートも設定済みです。
Spine-2(config-if)# ip address 10.10.30.2/24

⚫ 設定した L3 IF が up している事を確認します。
Spine-1(config-if)# show ip interface brief Spine-2(config-if)# show ip interface brief

IP Interface Status for VRF "default"(1) IP Interface Status for VRF "default"(1)
Interface IP Address Interface Status Interface IP Address Interface Status
Eth1/5 10.10.40.2 protocol-up/link-up/admin-up Eth1/5 10.10.60.2 protocol-up/link-up/admin-up
Eth1/6 10.10.30.2 protocol-up/link-up/admin-up

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
35
L3設定:SVI の作成

⚫ Spine-1,Spine-2でSVI を作成します。 SVI を利用するために


”interface-vlan” を有効にします。
Spine-1(config)# feature interface-vlan Spine-2(config)# feature interface-vlan

Spine-1(config)# interface vlan 10 Spine-2(config)# interface vlan 10


Spine-1(config-if)# no shutdown Spine-2(config-if)# no shutdown
Spine-1(config-if)# ip address 10.10.10.1/24 Spine-2(config-if)# ip address 10.10.10.2/24

Spine-1(config)# interface vlan 20 Spine-2(config)# interface vlan 20


Spine-1(config-if)# no shutdown Spine-2(config-if)# no shutdown
Spine-1(config-if)# ip address 20.20.20.1/24 Spine-2(config-if)# ip address 20.20.20.2/24

⚫ 設定した SVI が up している事を確認します。


Spine-1(config-if)# show ip interface brief Spine-2(config-if)# show ip interface brief

IP Interface Status for VRF "default"(1) IP Interface Status for VRF "default"(1)
Interface IP Address Interface Status Interface IP Address Interface Status
Vlan10 10.10.10.1 protocol-up/link-up/admin-up Vlan10 10.10.10.2 protocol-up/link-up/admin-up
Vlan20 20.20.20.1 protocol-up/link-up/admin-up Vlan20 20.20.20.2 protocol-up/link-up/admin-up
Eth1/5 10.10.40.2 protocol-up/link-up/admin-up Eth1/5 10.10.60.2 protocol-up/link-up/admin-up
Eth1/6 10.10.30.2 protocol-up/link-up/admin-up
© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
36
L3設定:HSRP の設定
Spine-1: priority
100
⚫ Spine-1,Spine-2でHSRP を設定します。 Spine-2: priority
50
Spine-1(config)# feature hsrp HSRP を利用するために Spine-2(config)# feature hsrp
”hsrp” を有効にします。
Spine-1(config)# interface vlan 10 Spine-2(config)# interface vlan 10
Spine-1(config-if)# hsrp 10 Spine-2(config-if)# hsrp 10
Spine-1(config-if-hsrp)# ip 10.10.10.254 Spine-2(config-if-hsrp)# ip 10.10.10.254
Spine-1(config-if-hsrp)# preempt Spine-2(config-if-hsrp)# priority 50
Spine-2(config-if-hsrp)# preempt
Spine-1(config)# interface vlan 20
Spine-1(config-if)# hsrp 20 Spine-2(config)# interface vlan 20
Spine-1(config-if-hsrp)# ip 20.20.20.254 Spine-2(config-if)# hsrp 20 Priority値はデフォルトで
Spine-1(config-if-hsrp)# preempt Spine-2(config-if-hsrp)# ip 20.20.20.254
Spine-2(config-if-hsrp)# priority 50
100となっており、数値が
Spine-2(config-if-hsrp)# preempt 大きい方が優先されます。

⚫ HSRP の状態を確認します。
Spine-1# show hsrp brief
<省略>
Interface Grp Prio P State Active addr Standby addr Group addr
Vlan10 10 100 P Active local 10.10.10.2 10.10.10.254 (conf)
Vlan20 20 100 P Active local 20.20.20.2 20.20.20.254 (conf) Spine-1は Active
Spine-2は Standby
Spine-2# show hsrp brief
<省略> になっていることを確認します。
Interface Grp Prio P State Active addr Standby addr Group addr
© 2022 Vlan10 10
Cisco and/or its affiliates. 50 P reserved.
All rights StandbyCisco
10.10.10.1
Confidential local 10.10.10.254Cloud
(conf)
Infrastructure and Software Group
Vlan20 20 50 P Standby 20.20.20.1 local 20.20.20.254 (conf) 37
L3設定:OSPF の設定
CSR側は設定済みです。

⚫ Spine-1,Spine-2でOSPFを設定します。
※NX-OS では、”network” コマンドではなく、インタフェースで設定
Spine-1(config)# feature ospf
OSPF を利用するために ”ospf” を有効にします。
Spine-1(config)# router ospf 100 ※本環境ではライセンスに関する警告が表示されますが無視してください。
Spine-1(config-router)# ?
プロセス番号を指定します。再配送・集約・router-id 等の設定も、
Spine-1(config)# interface loopback 0 この階層で行います。 ”?” コマンドで確認してみてください
Spine-1(config-if)# ip address 1.1.1.1/32

Spine-1(config)# interface ethernet 1/5 Spine-2(config)# feature ospf


Spine-1(config-if)# ip router ospf 100 area 0
Spine-2(config)# router ospf 100
Spine-1(config)# interface vlan 10 Spine-2(config-router)# ?
Spine-1(config-if)# ip router ospf 100 area 0
Spine-1(config-if)# ip ospf passive-interface Spine-2(config)# interface loopback 0
Spine-2(config-if)# ip address 2.2.2.2/32
Spine-1(config)# interface vlan 20
Spine-1(config-if)# ip router ospf 100 area 0 Spine-2(config)# interface ethernet 1/5-6
Spine-1(config-if)# ip ospf passive-interface Spine-2(config-if-range)# ip router ospf 100 area 0

Spine-2(config)# interface vlan 10


Spine-2(config-if)# ip router ospf 100 area 0
Spine-2(config-if)# ip ospf passive-interface

Spine-2(config)# interface vlan 20


Spine-2(config-if)# ip router ospf 100 area 0
© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloudip
Spine-2(config-if)# Infrastructure and Software
ospf passive-interface Group
38
L3設定:OSPF の状態確認

⚫ OSPF neighborsの状態を確認します。
Spine-1# show ip ospf neighbors
OSPF Process ID 100 VRF default
Total number of neighbors: 1
Neighbor ID Pri State Up Time Address Interface
198.18.4.51 1 FULL/DR 00:01:49 10.10.40.1 Eth1/5

Spine-2# show ip ospf neighbors


OSPF Process ID 100 VRF default
Total number of neighbors: 2
Neighbor ID Pri State Up Time Address Interface
7.7.7.7 1 FULL/DR 00:00:46 10.10.60.1 Eth1/5
198.18.4.51 1 FULL/DR 00:00:50 10.10.30.1 Eth1/6

OSPF neighborsの状態がFULLに
なっていることを確認します。

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
39
L3設定:OSPF の状態確認(続き)
⚫ OSPF ルートの状態を確認します。
Spine-1# show ip route ospf-100
<省略> OSPFでルート学習されていることを
10.10.20.0/24, ubest/mbest: 1/0 確認します。
*via 10.10.40.1, Eth1/5, [110/41], 00:10:04, ospf-100, intra
10.10.30.0/24, ubest/mbest: 1/0
*via 10.10.40.1, Eth1/5, [110/41], 00:10:04, ospf-100, intra
10.10.50.0/24, ubest/mbest: 1/0
*via 10.10.40.1, Eth1/5, [110/41], 00:10:04, ospf-100, intra
10.10.60.0/24, ubest/mbest: 1/0
*via 10.10.40.1, Eth1/5, [110/42], 00:10:04, ospf-100, intra

Spine-2# show ip route ospf-100 各neighborsを経由して経路学習していることを確認します。


<省略> 10.10.40.1: CSR-1 gi4
10.10.20.0/24, ubest/mbest: 2/0
*via 10.10.30.1, Eth1/6, [110/41], 00:09:15, ospf-100, intra
*via 10.10.60.1, Eth1/5, [110/41], 00:09:15, ospf-100, intra
10.10.40.0/24, ubest/mbest: 1/0
*via 10.10.30.1, Eth1/6, [110/41], 00:09:15, ospf-100, intra
10.10.50.0/24, ubest/mbest: 1/0
*via 10.10.30.1, Eth1/6, [110/41], 00:09:15, ospf-100, intra

各neighborsを経由して経路学習していることを確認します。
© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 10.10.30.1: CSR-1 gi3 Cloud Infrastructure and Software Group
10.10.60.1: CSR-2 gi3 40
疎通確認
password:C1sco12345

⚫ MTPuTTYからWeb-host へログインし、Server-1とServer-2へ
疎通確認をしてください。
tc@Web-Host:~$ ping 20.20.20.20
PING 20.20.20.20 (20.20.20.20): 56 data bytes
64 bytes from 20.20.20.20: seq=0 ttl=62 time=13.191 ms
64 bytes from 20.20.20.20: seq=1 ttl=62 time=13.320 ms
64 bytes from 20.20.20.20: seq=2 ttl=62 time=18.383 ms
64 bytes from 20.20.20.20: seq=3 ttl=62 time=15.628 ms
^C
--- 20.20.20.20 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 13.191/15.130/18.383 ms

tc@Web-Host:~$ ping 20.20.20.50


PING 20.20.20.50 (20.20.20.50): 56 data bytes Server-3については
64 bytes from 20.20.20.50: seq=0 ttl=62 time=16.623 ms vPC設定後に疎通確認します。
64 bytes from 20.20.20.50: seq=1 ttl=62 time=11.667 ms
64 bytes from 20.20.20.50: seq=2 ttl=62 time=12.298 ms
64 bytes from 20.20.20.50: seq=3 ttl=62 time=16.946 ms
^C
--- 20.20.20.50 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 11.667/14.383/16.946 ms

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
41
参考:Spine-1のサンプルConfig
Spine-1# show running-config ip 10.10.10.254 interface Ethernet1/4
switchport mode trunk
!Command: show running-config interface Vlan20 switchport trunk allowed vlan 10,20
!Running configuration last done at: Fri Aug 5 06:56:17 2022 no shutdown
!Time: Fri Aug 5 07:01:11 2022 ip address 20.20.20.1/24 interface Ethernet1/5
ip ospf passive-interface no switchport
version 9.2(3) Bios:version ip router ospf 100 area 0.0.0.0 ip address 10.10.40.2/24
hostname Spine-1 hsrp 20 ip router ospf 100 area 0.0.0.0 ← OSPF設定
(省略) preempt no shutdown
ip 20.20.20.254
feature ospf interface Ethernet1/6
feature interface-vlan interface port-channel200 no switchport
feature hsrp description Link to Spine-2 no shutdown
feature lacp switchport mode trunk
switchport trunk allowed vlan 10,20 (省略)
(省略) spanning-tree port type network
vlan 1,10,20 interface mgmt0
interface Ethernet1/1 no cdp enable
spanning-tree vlan 10,20 priority 8192 switchport mode trunk vrf member management
vrf context management switchport trunk allowed vlan 10,20 ip address 198.18.4.201/24
ip route 0.0.0.0/0 198.18.4.254 channel-group 200 mode active
interface loopback0
interface Vlan1 interface Ethernet1/2 ip address 1.1.1.1/32
switchport mode trunk line console
▼SVI switchport trunk allowed vlan 10,20 line vty
interface Vlan10 channel-group 200 mode active boot nxos bootflash:/nxos.9.2.3.bin
no shutdown router ospf 100 ← OSPF設定
ip address 10.10.10.1/24 interface Ethernet1/3
ip ospf passive-interface ← OSPF設定 switchport mode trunk
ip router ospf 100 area 0.0.0.0 switchport trunk allowed vlan 10,20
hsrp 10
preempt
© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
42
参考:Spine-2のサンプルConfig
Spine-2# show running-config priority 50 interface Ethernet1/4
ip 10.10.10.254 switchport mode trunk
!Command: show running-config switchport trunk allowed vlan 10,20
!Running configuration last done at: Fri Aug 5 06:56:58 2022 interface Vlan20
!Time: Fri Aug 5 07:12:13 2022 no shutdown interface Ethernet1/5
ip address 20.20.20.2/24 no switchport
version 9.2(3) Bios:version ip ospf passive-interface ip address 10.10.60.2/24
hostname Spine-2 ip router ospf 100 area 0.0.0.0 ip router ospf 100 area 0.0.0.0← OSPF設定
(省略) hsrp 20 no shutdown
preempt
feature ospf priority 50 interface Ethernet1/6
feature interface-vlan ip 20.20.20.254 no switchport
feature hsrp ip address 10.10.30.2/24
feature lacp interface port-channel200 ip router ospf 100 area 0.0.0.0
description Link to Spine-1 no shutdown
(省略) switchport mode trunk
vlan 1,10,20 switchport trunk allowed vlan 10,20 (省略)
spanning-tree port type network
spanning-tree vlan 10,20 priority 16384 interface mgmt0
vrf context management interface Ethernet1/1 no cdp enable
ip route 0.0.0.0/0 198.18.4.254 switchport mode trunk vrf member management
switchport trunk allowed vlan 10,20 ip address 198.18.4.202/24
interface Vlan1 channel-group 200 mode active
interface loopback0
▼SVI interface Ethernet1/2 ip address 2.2.2.2/32
interface Vlan10 switchport mode trunk line console
no shutdown switchport trunk allowed vlan 10,20 line vty
ip address 10.10.10.2/24 channel-group 200 mode active boot nxos bootflash:/nxos.9.2.3.bin
ip ospf passive-interface ← OSPF設定 router ospf 100
ip router ospf 100 area 0.0.0.0 interface Ethernet1/3
hsrp 10 switchport mode trunk
preempt switchport trunk allowed vlan 10,20 ← OSPF設定
© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
43
• Nexusへのログイン
• L2設定
2. 基本設定
• L3設定
• vPC設定

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
44
vPC設定
⚫ vPCを設定します。
gi1: 198.18.4.51/24 gi1: 198.18.4.52/24
gi2: 10.10.20.1 gi2: 10.10.20.2
gi3: 10.10.30.1 gi3: 10.10.60.1
gi4: 10.10.40.1 lo1: 7.7.7.7
gi5: 10.10.50.1
OSPF 100 VLAN 10 SVI:
VLAN 10 SVI: 10.10.10.2/24
10.10.10.1/24 VLAN 20 SVI:
VLAN 20 SVI: 20.20.20.2/24
20.20.20.1/24 Eth1/5: 10.10.60.2/24
HSRPEth1/5:
10 / VLAN 10 VIP :
10.10.40.2/24 Eth1/6: 10.10.30.2/24
Po200
10.10.10.254
HSRP 20 / VLAN 20 VIP :
vPC Domain 200
20.20.20.254
Po300

Po100
vPC Domain 100

VLAN VLAN
20 Po55 10

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
45
参考:vPCとは?
⚫ vPC (virtual Port Channel)とは、2台のNexusでL2ポートチャネルを構成する技術です。
対向機器からは論理的に1台のNexusとして見え、帯域の有効活用や耐障害性の向上など、様々なメリットがあります。

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
46
参考:vPCとは?(続き)
⚫ vPCはCatalystでお馴染みのStackやVSSと異なり、それぞれのNexusが独立して動作することが
大きな特徴となっています

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
47
管理 NW

参考:vPCとは?(続き) vPC peer-keepalive lin


mgmt0 mgmt0
⚫ vPCは、主に以下の要素から構成されます。
Nexus9300での
構成となります。

名前 説明

vPC device vPCを構成するNexus自体を示します。


vPCを構成するNexusのグループを示します。
vPC domain グループはvPC domain IDで定義され、
これはグループごとに一意である必要があります。
vPC device間の相互死活監視を行うI/Fです。
vPC peer-keepalive
このI/Fを介してIPレベルの疎通性が必要となります。
link 通常のPort-channel
mgmt0を使用する構成が推奨となります。
対向スイッチやホストは
vPC device間の情報同期や、実際のデータ通信に使用されます。 vPCを意識する必要なし
vPC peer link
10G以上、L2 Port Channel、Trunkが推奨となります。
対抗機器に接続される、vPCの構成ポートです。
vPC member port LACP, No protocol(mode on)がサポートされており、
Layer 2 interfaceとしてのみ使用できます。
© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
48
vPC設定:STP Priority を変更
⚫ STP Priority を変更
Spine-1(config)# spanning-tree vlan 10,20 priority 8192

Spine-2(config)# spanning-tree vlan 10,20 priority 8192

peer-switch を動作させるために、
Leaf-1(config)# spanning-tree vlan 10,20 priority 16384
vPC Pair スイッチで全VLANのSTP
priorityを揃える必要があります。
Leaf-2(config)# spanning-tree vlan 10,20 priority 16384 ※peer-switchについては後述

⚫ STP Priority を変更できたことを確認


Spine-1(config)# show spanning-tree
Spine-1, Spin-2, Leaf-1, Leaf2 で
VLAN0010 確認します。
<省略>
Bridge ID Priority 8202 (priority 8192 sys-id-ext 10)
<省略>
VLAN0020
<省略>
Bridge ID Priority 8212 (priority 8192 sys-id-ext 20)
<省略>

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
49
vPC設定:vPC domain, keepalive link

⚫ Spine-1,Spine-2で vPC domain及びkeepalive linkの設定をします。


※mgmt0を利用 vPC Domain ID は Spine-1: 1000
Spine-1(config)# feature vpc vPC を構成するNexus間で Spine-2: 2000
一意である必要があります。 に設定します。
Spine-1(config)# vpc domain 200 値が小さいほうが primary になります
Spine-1(config-vpc-domain)# role priority 1000
Spine-1(config-vpc-domain)# peer-keepalive destination 198.18.4.202 source 198.18.4.201 vrf management
Spine-1(config-vpc-domain)# peer-gateway
Spine-1(config-vpc-domain)# peer-switch
Spine-1(config-vpc-domain)# ip arp synchronize 宛先に vPC を構成するデバイスのアドレス、
Spine-1(config-vpc-domain)# auto-recovery 送信元に自身のアドレスを設定します。

Spine-2(config)# feature vpc

Spine-2(config)# vpc domain 200


Spine-2(config-vpc-domain)# role priority 2000
Spine-2(config-vpc-domain)# peer-keepalive destination 198.18.4.201 source 198.18.4.202 vrf management
Spine-2(config-vpc-domain)# peer-gateway
Spine-2(config-vpc-domain)# peer-switch
Spine-2(config-vpc-domain)# ip arp synchronize 詳細は参考資料をご参照ください。
Spine-2(config-vpc-domain)# auto-recovery

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
50
vPC設定:vPC domain, keepalive link(続き)

⚫ Leaf-1,Leaf-2で vPC domain及びkeepalive linkの設定をします。


※mgmt0を利用
Leaf-1(config)# feature vpc

Leaf-1(config)# vpc domain 100


Leaf-1(config-vpc-domain)# role priority 1000
Leaf-1(config-vpc-domain)# peer-keepalive destination 198.18.4.102 source 198.18.4.101 vrf management
Leaf-1(config-vpc-domain)# peer-gateway
Leaf-1(config-vpc-domain)# peer-switch
Leaf-1(config-vpc-domain)# ip arp synchronize
Leaf-1(config-vpc-domain)# auto-recovery

Leaf-2(config)# feature vpc

Leaf-2(config)# vpc domain 100


Leaf-2(config-vpc-domain)# role priority 2000
Leaf-2(config-vpc-domain)# peer-keepalive destination 198.18.4.101 source 198.18.4.102 vrf management
Leaf-2(config-vpc-domain)# peer-gateway
Leaf-2(config-vpc-domain)# peer-switch
Leaf-2(config-vpc-domain)# ip arp synchronize
Leaf-2(config-vpc-domain)# auto-recovery

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
51
vPC設定:vPC domain, keepalive link(続き)
⚫ keepalive linkを確認します。 Spine-1, Spine-2, Leaf-1, Leaf-2で
Spine-1# show vpc peer-keepalive vPC keep-alive statusが alive になっていることを確認します。

vPC keep-alive status : peer is alive


--Peer is alive for : (19) seconds, (289) msec
--Send status : Success
--Last send at : 2022.05.19 00:54:34 605 ms
--Sent on interface : mgmt0
--Receive status : Success
--Last receive at : 2022.05.19 00:54:35 231 ms
--Received on interface : mgmt0
--Last update from peer : (0) seconds, (234) msec

vPC Keep-alive parameters


--Destination : 198.18.4.202
--Keepalive interval : 1000 msec
--Keepalive timeout : 5 seconds
--Keepalive hold timeout : 3 seconds
--Keepalive vrf : management
--Keepalive udp port : 3200
--Keepalive tos : 192

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
52
参考:peer-gatewayとは?
⚫ vPCピアデバイスの実MAC宛て通信をHSRPの仮想MAC宛て通信と同様に、両方のvPCピアデバイスで
トラフィック転送する機能
⚫ vPC配下の機器(SLB 等)が、vPCピアデバイスの実MAC宛てに通信を行う仕様である場合、実MACの持ち主ではない
vPCピアデバイス宛に送信されたパケットはループ回避メカニズムによりドロップする
⚫ vPCピアゲートウェイの適用により、対向vPCピアデバイスの実MAC宛てへの通信に対しても、vPCピアリンクに渡すことなく、ローカルで転送する

IP : 2.2.2.2 IP : 2.2.2.2

実MAC 1 実MAC 2 実MAC 1 実MAC 2

仮想MAC 3 仮想MAC 3

宛先IP : 2.2.2.2 宛先IP : 2.2.2.2


宛先MAC: 実MAC 2 宛先MAC: 実MAC 2

ピアゲートウェイ適用なし ピアゲートウェイ適用あり

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
53
参考:peer-switchとは?
⚫ vPC Primary (STPのルートブリッジ)の障害時に、STPのトポロジー変更が発生することを防止する機能
⚫ STPのBPDUの生成・処理・計算はPrimaryが担当しており、Primaryに障害が発生するとSTPのトポロジーチェンジが発生する可能性がある
⚫ Peer-switchの適用により、BPDUの処理を両方のvPCピアデバイスが行う
⚫ STPのルートブリッジをvPCドメイン全体とすることでPrimary障害時のトポロジーチェンジを防止
⚫ 両vPCピアデバイスのSTPプライオリティは同じ値を設定する必要がある

Primaryのみ Primary / Secondaryともに


STPルートブリッジ STPルートブリッジ

Primary Secondary Primary Secondary

BPDU

ピアスイッチ適用なし ピアスイッチ適用あり

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
54
参考:ip arp synchronizeとは?
⚫ vPCピアリンク復旧時に、vPCピアデバイス間で即座にARP同期を行う機能
⚫ 復旧したvPCデバイスは、ARPエントリを保持していないため、ARP解決が完了するまでの間、フレームのドロップが発生
⚫ ARP同期の適用により、復旧後即座にvPCピアデバイスの持つARPテーブルの同期が可能

vPCピアデバイスの
ARPテーブルにエントリなし ARPテーブルを同期
Addr MAC Addr I/F Addr MAC Addr I/F Addr MAC Addr I/F Addr MAC Addr I/F
<IP> <MAC> Vlan100 <IP> <MAC> Vlan100 <IP> <MAC> Vlan100 <IP> <MAC> Vlan100
<IP> <MAC> Vlan100 <IP> <MAC> Vlan100 <IP> <MAC> Vlan100 <IP> <MAC> Vlan100

Primary Secondary Primary Secondary


vPC復旧直後 vPC復旧直後

S S S S

SW1 SW1
VLAN 100 VLAN 100

ARP synchronization適用なし ARP synchronization適用あり S :SVI

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
55
参考:auto recoveryとは?
⚫ Secondaryスイッチがサスペンド状態時、Primaryスイッチに筐体障害が発生した場合に、Secondaryスイッチが再度復旧し、
トラフィック転送を可能とする機能
⚫ 適用しない場合、SecondaryはvPCピアリンクダウンにてサスペンド状態の後、Primaryがダウンすると、
Operational Primaryになることができず、vPCが復旧しない
⚫ Auto recoveryの適用により、vPCキープアライブタイマの経過後、Operational Primaryとしてトラフィック転送を開始

vPC Secondaryとして
サスペンド状態のまま Operational Primary
② Primaryがダウン vPC復旧せず

Primary Secondary Primary Secondary

① vPCキープアライブ
② タイマ経過後
S S S S vPCキープアライブタイマ
=> TimeOut x 3
(デフォルト5秒x3)

① vPC Peer-linkの全リンクがダウン

Auto recovery適用なし Auto recovery適用あり S :SVI

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
56
vPC設定:vPC peer-link

⚫ Spine間のvPC peer-link を設定します。


Spine-1(config)# interface port-channel 200
Spine-1(config-if)# vpc peer-link

Spine-2(config)# interface port-channel 200


Spine-2(config-if)# vpc peer-link

⚫ Leaf間のvPC peer-link を設定します。


Leaf-1(config)# interface port-channel 100
Leaf-1(config-if)# vpc peer-link

Leaf-2(config)# interface port-channel 100


Leaf-2(config-if)# vpc peer-link

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
57
vPC設定:vPC peer-link(続き)

⚫ Spine のvPC peer-link の状態を確認します。


Spine-1# show vpc brief
<省略>
vPC Peer-link status
---------------------------------------------------------------------
id Port Status Active vlans
-- ---- ------ -------------------------------------------------
1 Po200 up 10,20
vPC Peer-link statusがUPになって
いることを確認します。

Spine-2# show vpc brief


<省略>
vPC Peer-link status
---------------------------------------------------------------------
id Port Status Active vlans
-- ---- ------ -------------------------------------------------
1 Po200 up 10,20

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
58
vPC設定:vPC peer-link(続き)

⚫ Leaf のvPC peer-link の状態を確認します。


Leaf-1# show vpc brief
<省略>
vPC Peer-link status
---------------------------------------------------------------------
id Port Status Active vlans
-- ---- ------ -------------------------------------------------
1 Po100 up 10,20

Leaf-2# show vpc brief


<省略>
vPC Peer-link status
---------------------------------------------------------------------
id Port Status Active vlans
-- ---- ------ -------------------------------------------------
1 Po100 up 10,20

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
59
vPC設定:vPC member ポート
シングルサイドvPC
vPCの対向は通常の
⚫ Leaf-Server3間のvPC memberポートを設定します。 PortChannel設定で
OK
Leaf-1(config)# interface ethernet 1/3
Leaf-1(config-if-range)# channel-group 55 mode active

Leaf-1(config)# interface port-channel 55 Port Channel で vPC ID を指定することで


Leaf-1(config-if)# vpc 55 vPC member portsになる
Leaf-1(config-if)# spanning-tree port type edge trunk
Port Channel ID と
vPC ID は統一させることが
推奨となります。
Leaf-2(config)# interface ethernet 1/4
Leaf-2(config-if-range)# channel-group 55 mode active

Leaf-2(config)# interface port-channel 55


Leaf-2(config-if)# vpc 55
Leaf-2(config-if)# spanning-tree port type edge trunk

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
60
vPC設定:vPC member ポート(続き)
⚫ Spine-Leaf間のvPC memberポート を設定します。
Spine-1(config)# interface ethernet 1/3-4
Spine-1(config-if-range)# channel-group 300 mode active

Spine-1(config)# interface port-channel 300


Spine-1(config-if)# vpc 300

Spine-2(config)# interface ethernet 1/3-4


Spine-2(config-if-range)# channel-group 300 mode active

Spine-2(config)# interface port-channel 300


Spine-2(config-if)# vpc 300 Spine-Leaf間は
Spine-Leaf間は
ダブルサイド
Double-sidevPCとなります。
vPC構成となります。
設定や管理面から、
設定や管理面から、
Leaf-1(config)# interface ethernet 1/5-6 Port ChannelIDID
Port Channel とと vPC
vPC ID ID
を を
Leaf-1(config-if-range)# channel-group 300 mode active 全て統一させることが推奨となります。
統一させることが推奨となります。
Leaf-1(config)# interface port-channel 300
Leaf-1(config-if)# vpc 300

Leaf-2(config)# interface ethernet 1/5-6


Leaf-2(config-if-range)# channel-group 300 mode active

Leaf-2(config)# interface port-channel 300


Leaf-2(config-if)# vpc 300
© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
61
vPC設定:状態確認
⚫ Spine のvPC memberポート の状態を確認します。
Spine-1# show vpc brief
<省略>
vPC status
----------------------------------------------------------------------------
Id Port Status Consistency Reason Active vlans
-- ------------ ------ ----------- ------ ---------------
300 Po300 up success success 10,20

Spine-2# show vpc brief


<省略>
vPC status
----------------------------------------------------------------------------
Id Port Status Consistency Reason Active vlans
-- ------------ ------ ----------- ------ ---------------
300 Po300 up success success 10,20

vPC statusがUPに
なっていることを確認します。

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
62
vPC設定:状態確認(続き)
⚫ Leaf のvPC memberポート の状態を確認します。
Leaf-1# show vpc brief
<省略>
vPC status
----------------------------------------------------------------------------
Id Port Status Consistency Reason Active vlans
-- ------------ ------ ----------- ------ ---------------
55 Po55 up success success 10

Leafについては
Leafについては
300 Po300 up success success 10,20
Spine側とServer-3側で
Spine側とServer-3側で
それぞれup
それぞれ しています。
up しています。
Leaf-2# show vpc brief
<省略>
vPC status
----------------------------------------------------------------------------
Id Port Status Consistency Reason Active vlans
-- ------------ ------ ----------- ------ ---------------
55 Po55 up success success 10

300 Po300 up success success 10,20

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
63
vPC設定:STPの状態確認
Spine-1# show spanning-tree
VLAN0010
<省略>
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Po200 Desg FWD 3 128.4295 (vPC peer-link) Network P2p
Po300 Desg FWD 1 128.4395 (vPC) Network P2p
<省略>
VLAN0020
<省略>
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Po200 Desg FWD 3 128.4295 (vPC peer-link) Network P2p
Po300 Desg FWD 1 128.4395 (vPC) P2p
vPC の裏ではSTPがFail Safeと
Spine-2# show spanning-tree して動いていることを確認します。
VLAN0010
<省略>
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Po200 Root FWD 3 128.4295 (vPC peer-link) Network P2p
Po300 Desg FWD 1 128.4395 (vPC) P2p
<省略>
VLAN0020
<省略>
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Po200 Root FWD 3 128.4295 (vPC peer-link) Network P2p
Po300 Desg FWD
© 2022 Cisco and/or its affiliates. 1
All rights reserved. 128.4395 (vPC) P2p
Cisco Confidential Cloud Infrastructure and Software Group
64
vPC設定:STPの状態確認(続き)
Leaf-1# show spanning-tree
VLAN0010
<省略>
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Po55 Desg FWD 1 128.4150 (vPC) Edge P2p
Po100 Desg FWD 3 128.4195 (vPC peer-link) Network P2p
Po300 Root FWD 1 128.4395 (vPC) P2p
<省略>
VLAN0020
<省略>
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Po100 Desg FWD 3 128.4195 (vPC peer-link) Network P2p
Po300 Root FWD 1 128.4395 (vPC) P2p
Eth1/4 Desg FWD 4 128.4 Edge P2p

Leaf-2# show spanning-tree


VLAN0010 Leaf側が全てFWDになっており、
<省略> 帯域が有効活用できていることを確認します。
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Po55 Desg FWD 1 128.4150 (vPC) Edge P2p
Po100 Root FWD 3 128.4195 (vPC peer-link) Network P2p
Po300 Root FWD 1 128.4395 (vPC) P2p
<省略>
VLAN0020
<省略>
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Po100 Root FWD 3 128.4195 (vPC peer-link) Network P2p
Po300 Root FWD 1 128.4395
© 2022 Cisco and/or its affiliates. All rights reserved. (vPC) P2p
Cisco Confidential Cloud Infrastructure and Software Group
Eth1/3 Desg FWD 4 128.3 Edge P2p 65
疎通確認

⚫ MTPuTTYからWeb-host へログインし、Server-1,Server-2,
Server-3 へ疎通確認をしてください。
tc@Web-Host:~$ ping 20.20.20.20
PING 20.20.20.20 (20.20.20.20): 56 data bytes
64 bytes from 20.20.20.20: seq=0 ttl=62 time=13.191 ms
64 bytes from 20.20.20.20: seq=1 ttl=62 time=13.320 ms
64 bytes from 20.20.20.20: seq=2 ttl=62 time=18.383 ms
64 bytes from 20.20.20.20: seq=3 ttl=62 time=15.628 ms
^C
--- 20.20.20.20 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 13.191/15.130/18.383 ms

tc@Web-Host:~$ ping 20.20.20.50 tc@Web-Host:~$ ping 10.10.10.10


PING 20.20.20.50 (20.20.20.50): 56 data bytes PING 10.10.10.10 (10.10.10.10): 56 data bytes
64 bytes from 20.20.20.50: seq=0 ttl=62 time=16.623 ms 64 bytes from 10.10.10.10: seq=0 ttl=62 time=14.620 ms
64 bytes from 20.20.20.50: seq=1 ttl=62 time=11.667 ms 64 bytes from 10.10.10.10: seq=1 ttl=62 time=16.524 ms
64 bytes from 20.20.20.50: seq=2 ttl=62 time=12.298 ms 64 bytes from 10.10.10.10: seq=2 ttl=62 time=14.688 ms
64 bytes from 20.20.20.50: seq=3 ttl=62 time=16.946 ms 64 bytes from 10.10.10.10: seq=3 ttl=62 time=9.514 ms
^C ^C
--- 20.20.20.50 ping statistics --- --- 10.10.10.10 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss 4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 11.667/14.383/16.946 ms round-trip min/avg/max = 9.514/13.836/16.524 ms

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
66
参考:Spine-1のサンプルConfig
※Spine-2は、 peer-keepalive destination 198.18.4.201 source 198.18.4.202

Spine-1# show running-config peer-keepalive destination 198.18.4.202 interface port-channel300


source 198.18.4.201 switchport mode trunk interface Ethernet1/6
!Command: show running-config peer-gateway switchport trunk allowed vlan 10,20 no switchport
!Running configuration last done at: Fri Aug 5 auto-recovery vpc 300 ← vPC member設定 no shutdown
06:56:17 2022 ip arp synchronize
!Time: Fri Aug 5 07:01:11 2022 interface Ethernet1/1 (省略)
interface Vlan10 switchport mode trunk
version 9.2(3) Bios:version no shutdown switchport trunk allowed vlan 10,20 interface mgmt0
hostname Spine-1 ip address 10.10.10.1/24 channel-group 200 mode active no cdp enable
(省略) ip ospf passive-interface vrf member management
ip router ospf 100 area 0.0.0.0 interface Ethernet1/2 ip address 198.18.4.201/24
feature ospf hsrp 10 switchport mode trunk
feature interface-vlan preempt switchport trunk allowed vlan 10,20 interface loopback0
feature hsrp ip 10.10.10.254 channel-group 200 mode active ip address 1.1.1.1/32
feature lacp line console
feature vpc interface Vlan20 interface Ethernet1/3 line vty
no shutdown switchport mode trunk boot nxos bootflash:/nxos.9.2.3.bin
(省略) ip address 20.20.20.1/24 switchport trunk allowed vlan 10,20 router ospf 100
vlan 1,10,20 ip ospf passive-interface channel-group 300 mode active
ip router ospf 100 area 0.0.0.0
spanning-tree vlan 10,20 priority 8192 hsrp 20 interface Ethernet1/4
vrf context management preempt switchport mode trunk
ip route 0.0.0.0/0 198.18.4.254 ip 20.20.20.254 switchport trunk allowed vlan 10,20
channel-group 300 mode active
interface port-channel200
description Link to Spine-2 interface Ethernet1/5
▼vPC domain ,peer-keepalive link switchport mode trunk no switchport
vpc domain 200 ※Spine-2は、 switchport trunk allowed vlan 10,20 ip address 10.10.40.2/24
peer-switch role priority 2000 spanning-tree port type network ip router ospf 100 area 0.0.0.0
role priority 1000 vpc peer-link ← peer-link設定 no shutdown

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
67
参考:Leaf-1のサンプルConfig
Leaf-1# show running-config interface port-channel55 switchport trunk allowed vlan 10
switchport mode trunk spanning-tree port type edge trunk ※Leaf-2は、e1/4に設定
!Command: show running-config switchport trunk allowed vlan 10 channel-group 55 mode active
!Running configuration last done at: Tue Aug 2 04:54:56 2022 spanning-tree
← vPC port type edge trunk
member設定
!Time: Tue Aug 2 05:59:30 2022 vpc 55 interface Ethernet1/4
switchport mode trunk
version 9.2(3) Bios:version interface port-channel100 switchport trunk allowed vlan 20
hostname Leaf-1 description Link to Leaf-2 spanning-tree port type edge trunk
(省略) switchport mode trunk
switchport trunk allowed vlan 10,20 interface Ethernet1/5
feature lacp spanning-tree← port type network
peer-link設定 switchport mode trunk
feature vpc vpc peer-link switchport trunk allowed vlan 10,20
channel-group 300 mode active
(省略) interface port-channel300
vlan 1,10,20 switchport mode trunk interface Ethernet1/6
switchport
← trunk
vPC allowed vlan 10,20
member設定 switchport mode trunk
spanning-tree vlan 10,20 priority 16384 vpc 300 switchport trunk allowed vlan 10,20
vrf context management channel-group 300 mode active
ip route 0.0.0.0/0 198.18.4.254 interface Ethernet1/1
switchport mode trunk (省略)
▼vPC domain ,peer-keepalive link switchport trunk allowed vlan 10,20 interface mgmt0
vpc domain 100 channel-group 100 mode active no cdp enable
peer-switch ※Leaf-2は、 vrf member management
role priority 1000 role priority 2000 interface Ethernet1/2 ip address 198.18.4.101/24
peer-keepalive destination 198.18.4.102 source switchport mode trunk line console
198.18.4.101 switchport trunk allowed vlan 10,20 line vty
peer-gateway channel-group 100 mode active boot nxos bootflash:/nxos.9.2.3.bin
auto-recovery
ip arp synchronize interface Ethernet1/3
switchport mode trunk

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
68
※Leaf-2は、 peer-keepalive destination 198.18.4.101 source 198.18.4.102
• 確認コマンド(showコマンド)
• 設定関連コマンド
3. Nexus Tips集 • tac-pac
• バージョンアップ
• パスワードリカバリ

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
69
確認コマンド:show version
⚫ show versionコマンドでは、NX-OSバージョン、ハードウェア情報 を確認できます。
Leaf-1# show version
<省略>
Software
BIOS: version
NXOS: version 9.2(3)
BIOS compile time:
NXOS image file is: bootflash:///nxos.9.2.3.bin
NXOS compile time: 2/17/2019 5:00:00 [02/17/2019 15:07:27]

Hardware
cisco Nexus9000 9000v Chassis
Intel(R) Xeon(R) CPU E7- 2830 @ 2.13GHz with 8164196 kB of memory.
Processor Board ID 9JMVH9DP8CJ

Device name: Leaf-1


bootflash: 3509454 kB
Kernel uptime is 0 day(s), 17 hour(s), 3 minute(s), 42 second(s)
<省略>

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
70
確認コマンド:show inventory
⚫ show inventoryコマンドでは、本体、オプション品の型番、S/Nを確認できます。
Leaf-1# show inventory
NAME: "Chassis", DESCR: "Nexus9000 9000v Chassis"
PID: N9K-9000v , VID: V02 , SN: 9JMVH9DP8CJ

NAME: "Slot 1", DESCR: "Nexus 9000v Ethernet Module"


PID: N9K-9000v , VID: V02 , SN: 9JMVH9DP8CJ

NAME: "Fan 1", DESCR: "Nexus9000 9000v Chassis Fan Module"


PID: N9K-9000v-FAN , VID: V01 , SN: N/A

NAME: "Fan 2", DESCR: "Nexus9000 9000v Chassis Fan Module"


PID: N9K-9000v-FAN , VID: V01 , SN: N/A

NAME: "Fan 3", DESCR: "Nexus9000 9000v Chassis Fan Module"


PID: N9K-9000v-FAN , VID: V01 , SN: N/A

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
71
確認コマンド:show running-config
⚫ show running-configコマンドでは、動作中のコンフィグファイルを確認できます。
Spine-1# show running-config
特定の設定のみ表示することもできます。
!Command: show running-config
例) show running-config interface ehternet 1/1
!Running configuration last done at: Fri Jul 22 01:49:28 2022
!Time: Fri Jul 22 04:26:15 2022

version 9.2(3) Bios:version


hostname Spine-1
vdc Spine-1 id 1
limit-resource vlan minimum 16 maximum 4094
limit-resource vrf minimum 2 maximum 4096
limit-resource port-channel minimum 0 maximum 511
limit-resource u4route-mem minimum 248 maximum 248
limit-resource u6route-mem minimum 96 maximum 96
limit-resource m4route-mem minimum 58 maximum 58
limit-resource m6route-mem minimum 8 maximum 8

cfs eth distribute


feature ospf
feature interface-vlan
feature hsrp
feature lacp
feature vpc
<省略>
© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
72
確認コマンド:show startup-config
⚫ show startup-configコマンドでは、起動時に読み込まれるコンフィグファイルを確認できます。
Spine-1# show startup-config
特定の設定のみ表示することもできます。
!Command: show running-config
例) show startup-config interface ehternet 1/1
!Running configuration last done at: Sat Jan 23 18:43:15 2021
!Time: Sat Jan 23 18:44:06 2021

version 9.2(3) Bios:version


hostname Spine-1
vdc Spine-1 id 1
limit-resource vlan minimum 16 maximum 4094
limit-resource vrf minimum 2 maximum 4096
limit-resource port-channel minimum 0 maximum 511
limit-resource u4route-mem minimum 248 maximum 248
limit-resource u6route-mem minimum 96 maximum 96
limit-resource m4route-mem minimum 58 maximum 58
limit-resource m6route-mem minimum 8 maximum 8

cfs eth distribute


feature interface-vlan
feature hsrp
feature lacp
feature vpc
<省略>
© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
73
確認コマンド:show interface status
⚫ show interface statusコマンドでは、物理ポートのステータスを確認できます。
Leaf-1# show interface status

--------------------------------------------------------------------------------
Port Name Status Vlan Duplex Speed Type
--------------------------------------------------------------------------------
mgmt0 -- connected routed full 1000 --

--------------------------------------------------------------------------------
Port Name Status Vlan Duplex Speed Type
--------------------------------------------------------------------------------
Eth1/1 vPC Peer-Link to L connected trunk full 1000 10g
Eth1/2 vPC Peer-Link to L connected trunk full 1000 10g
Eth1/3 -- connected trunk full 1000 10g
Eth1/4 -- connected trunk full 1000 10g
Eth1/5 -- connected trunk full 1000 10g
Eth1/6 -- connected trunk full 1000 10g
Eth1/7 -- notconnec 1 auto auto 10
Eth1/8 -- notconnec 1 auto auto 10g

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
74
確認コマンド:show ip interface brief
⚫ show ip interface briefコマンドでは、IPプロトコルが設定されたIFのステータスを確認できます。

Spine-1# show ip interface brief

IP Interface Status for VRF "default"(1)


Interface IP Address Interface Status
Vlan10 10.10.10.1 protocol-up/link-up/admin-up
Vlan20 20.20.20.1 protocol-up/link-up/admin-up
Lo0 1.1.1.1 protocol-up/link-up/admin-up
Eth1/5 10.10.40.2 protocol-up/link-up/admin-up

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
75
確認コマンド:show feature
⚫ show featureコマンドでは、機能の有効 / 無効 を確認できます。

Leaf-1# show feature


Feature Name Instance State
-------------------- -------- --------
Flexlink 1 disabled
analytics 1 disabled
bash-shell 1 disabled
bfd 1 disabled
bgp 1 disabled
bulkstat 1 disabled
cable-management 1 disabled
catena 1 disabled
container-tracker 1 disabled
macsec 1 disabled
dhcp 1 disabled
dot1x 1 disabled

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
76
確認コマンド:show logging
⚫ show loggingコマンドでは、ロギングの設定やログの参照
Leaf-1# show logging

Logging console: enabled (Severity: critical)


Logging monitor: enabled (Severity: notifications)
Logging linecard: enabled (Severity: notifications)
Logging timestamp: Seconds
Logging source-interface : disabled
Logging rate-limit: enabled
Logging server: disabled
Logging origin_id : disabled
Logging RFC : disabled
Logging logflash: enabled (Severity: notifications)
Logging logfile: enabled
<省略>
2022 Jul 7 05:26:44 %USER-2-SYSTEM_MSG: <<%USBHSD-2-MOUNT>> logflash: online - usbhsd
2022 Jul 7 05:26:45 %VDC_MGR-5-VDC_STATE_CHANGE: vdc 1 state changed to create in progress
2022 Jul 7 05:26:45 %VDC_MGR-5-VDC_STATE_CHANGE: vdc 1 state changed to create pending
2022 Jul 7 05:26:46 Jul 7 05:26:46 %KERN-3-SYSTEM_MSG: [ 23.746817] sysconf checkum failed expected 30
Got 18 - kernel
2022 Jul 7 05:26:46 Jul 7 05:26:46 %KERN-3-SYSTEM_MSG: [ 23.746817] read_from_sysconf: No Valid sysconf
- kernel

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
77
確認コマンド:show cli history
⚫ show cli historyコマンドでは、設定履歴を参照できます。
Spine-1# show cli history
0 08:04:01 show ip route ospf-100
1 08:05:34 show running-config
2 08:13:57 conf t
3 08:13:59 spanning-tree vlan 10,20 priority 8192
4 08:14:46 show spanning-tree
5 08:15:46 feature vpc
6 08:15:47 vpc domain 200
7 08:15:47 peer-switch
8 08:15:47 role priority 1000

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
78
show コマンドの出力結果はパイプを使用可能
⚫ Linux コマンド: grep, sortなど
⚫ IOS コマンド: include, exclude, sectionなど

Spine-1# show running-config | ?


awk Mini AWK
cut Print selected parts of lines.
diff Show difference between current and previous invocation (creates
temp files: remove them with 'diff-clean' command and dont use
it on commands with big outputs, like 'show tech'!)
egrep Egrep - print lines matching a pattern
email Email command output
grep Grep - print lines matching a pattern
head Display first lines
human Output in human format
json Output in json format
json-pretty Output in json pretty print format
last Display last lines
less Filter for paging
no-more Turn-off pagination for command output
section Show lines that include the pattern as well as the subsequent
<省略>
© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
79
設定コマンド 暗号化のオプション
0: クリアテキスト
5: 暗号化(SHA256)
⚫ adminのパスワードを変更
Switch(config)# username admin password [0 | 5] C1sco12345

⚫ パスワード強度のチェックを無効 / 有効を変更(デフォルトは有効)
Switch(config)# [no] password strength-check

⚫ copyコマンドでローカル、リモートでファイルコピーが可能 設定の保存
※write memoryは不可
switch# copy running-config startup-config
switch# copy tftp://10.10.1.1/sw1-run-config.bak running-config tftpやbootflashなどの
switch# copy startup-config bootflash:sw1-start-config.bak 指定も可能

⚫ dir, pwd, cd や move, delete, mkdir などのファイル操作が可能


参考URL:
https://www.cisco.com/c /en/us/td/docs/dcn/nx-os/nexus9000/102x/configuration/fundamentals/cisco-nexus-9000-nx-os-fundamentals-
configuration-guide-102x/m-using-device-file-systems.html

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
80
設定コマンド(続き)
⚫ 初期化
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

⚫ NTP,Time Zone
switch(config)# clock timezone JST 9 0
switch(config)# ntp server <IPアドレス>

⚫ Syslogサーバ
switch(config)# logging server<IPアドレス>

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
81
tac-pacコマンド 保存先、ファイル名を指定することも可能です。
例) tac-pac bootflash:test.gz

⚫ tac-pac は、show tech-support detail の出力を圧縮して保存するコマンド

Leaf-1# tac-pac
Show tech detail can take more than 5 minutes to complete. Please Wait ...
Leaf-1# dir volatile:
94 Jul 07 05:28:20 2022 cli_batch_dbg.log
0 Jul 07 05:27:36 2022 nginx_logflag
8380329 Jul 07 23:26:01 2022 show_tech_out.gz
60 Jul 07 05:27:16 2022 virtual-instance/

Usage for volatile://sup-local


8384512 bytes used tac-pacを保存するために、環境にもよりますが
620761088 bytes free 数百MB程度の空き容量が必要です。
dirコマンドで保存先の”free”を確認してください。
629145600 bytes total

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
82
バージョンアップ
⚫ NX-OSではStandard ISSU, Enhanced ISSUをサポート

⚫ 詳細は下記のURLを参照
Cisco Nexus 9000 Series NX-OS Software Upgrade and Downgrade Guide, Release 10.2(x)
https://www.cisco.com/c /en/us/td/docs/dcn/nx-os/nexus9000/102x/upgrade/b-cisco-nexus-9000-nx-
os-software-upgrade-downgrade-guide-
102x/m_upgrading_or_downgrading_the_cisco_nexus_9000_series_nx-os_software_101x.html

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
83
パスワードリカバリー
1. 再起動し、「Booting nx-os image: bootflash…」で Ctrl + C
電源を投入
<省略> ここで「Ctrl +
Booting nx-os image: bootflash:/n9000-dk9.x.x.x.bin.... C」
....Aborting Image Boot
GNU GRUB version 0.97
Loader Version 3.22.0 プロンプトが loader> に
loader> なることを確認する

2. リカバリーモードに入る
loader> cmdline recoverymode=1

3. OSを指定し Bootする
loader> boot n9000-dk9.x.x.x.bin
<省略>
プロンプトが switch(boot)#
switch(boot)# になることを確認する

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
84
パスワードリカバリー(続き)
4. パスワードを設定し、load-nxos コマンドでロードする
switch(boot)# config terminal
switch(boot)(config)# admin-password <新しいパスワード>
switch(boot)(config)# exit
switch(boot)# load-nxos

5. ログイン後、パスワードを再設定し、設定を保存する
switch login: admin
Password: <新しいパスワード>
<省略>
switch# configure terminal 再設定することで
switch(config)# username admin password <新しいパスワード> SNMPパスワードとして
switch(config)# exit も
switch# copy running-config startup-config 使用できるようになる

© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Cloud Infrastructure and Software Group
85

You might also like