0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Cisco NX-OS New L3VNI Mode の構成

Posted at

はじめに

Cisco NX-OS リリース 10.2(3)F 以降で、New L3VNI Mode の構成が可能となった

New L3VNI Mode の導入により、VLAN との紐づけなしに L3VNI を作成できるようになった (参考)

Config の Before/After 比較 参照 は下記の通りで、VLAN 設定が不要となる

従来の L3VNI Config New L3VNI Mode Config
vlan 2000
vn-segment 50000
!
vrf context myvrf_50000
vni 50000
!
interface nve1
member vni 50000 assosiate-vrf
!
interface vlan 2000
vrf member myvrf_50000
ip forward
vrf context myvrf_50000
vni 50000 l3
!
interface nve1
member vni 50000 assosiate-vrf

また、ホワイトペーパーによると下記のような記述があり、VNI の上限値が増えるらしい

The new L3VNI cli will not require the creation of an SVI interface for VRF. The new L3 VNI cli mode will also increase the L2 VNI scale to 4000 and L3 VNI scale to 2000. Please reference the Nexus 9000 NXOS Verified Scalability Guide.

以降に、New L3 VNI mode への変更を、実際に CML 環境で試した結果を記載する

CML で試す

試験 CML 環境

  • CML-Personal 2.8.1 (詳細)
  • Spine-Leaf の 3 Tier 構成
  • 2 Leaf Set 構成で、L3VNI を既存の L3VNI 方式 (VLAN利用) で構築している
  • 設定 YAML は GitLab 参照 (Leaf-Spine-Test4_VNI_After.yaml)
  • ※ bdsw01 は設定として入れているが実行環境のメモリが足りないので起動せずに実施しているので無視

スクリーンショット 2025-07-27 14.06.54.png

スクリーンショット 2025-07-27 14.09.27.png

NX-OS バージョン変更 (事前作業)

CML デフォルト(CML-Personal 2.8.1時点)で入っている NX-OS 9K のバージョン(10.5.1.F) では New L3 VNI Mode を試すと、なぜか ethernet module が落ちる

そのため事前作業として、10.4の現時点(2025.07.27)での最新バージョン(10.4.5.M)を入れてから試す

NX-OS 9K ダウンロード

Software Download のサイトで Nexus 9000v の 10.4(5)(M) で qcow2 版をダウンロードする

スクリーンショット 2025-07-12 14.21.55.png

NX-OS 9K セットアップ

Node Definitions > IMAGE DEFINITIONS の MANAGE をクリックする

スクリーンショット 2025-07-12 14.28.30.png

Upload New Image File でダウンロードした qcow2 イメージをアップロードする

スクリーンショット 2025-07-12 14.30.03.png

アップロード後に + CREATE NEW IMAGE DEFINITION をクリックする

スクリーンショット 2025-07-12 14.35.09.png

各種パラメータに NX-OS 9300v 10.4.5.Mを入れて下の方にある+ CREATE IMAGE DEFINITION をクリックする

スクリーンショット 2025-07-12 14.41.04.png

スクリーンショット 2025-07-12 14.41.39.png

設定後に、NX-OS 9000 を選択すると Image Definition で NX-OS 9300v 10.4.5.M を選択可能になっていることを確認できる

スクリーンショット 2025-07-12 14.42.57.png

設定 YAML にすると下記のようになる

NX-OS_9300v_10.4.5.M.yaml
id: NX-OS 9300v 10.4.5.M
node_definition_id: nxosv9000
description: NX-OS 9300v 10.4.5.M
label: NX-OS 9300v 10.4.5.M
disk_image: nexus9300v64.10.4.5.M.qcow2
read_only: false
disk_subfolder: NX-OS 9300v 10.4.5.M
schema_version: 0.0.1

イメージの入れ替えは一度機器を止めて(STOP)、ワイプ(WIPE)してから実施可能で、
New L3VNI Mode に入れ替える Leaf スイッチを全て入れ替えてから次の設定変更を実施する

New L3VNI Mode への CLI での設定変更

移行方法はドキュメントによると VLAN 削除後に New L3VNI Mode の Config を入れるとのことなので、直感と逆なので注意

ドキュメントより_L3VNI 構成を古いものから新しいものに移行するには、次の手順を実行します。
1. VLAN、vlan-vnsegment および SVI 構成を削除します。
2. インターフェイス nve1 member-vni-associate 構成は保持します。
3. 新しい VRF-VNI-L3 構成を追加します。

本試験構成では下記のコマンドで入れ替えた

vrf の中の VNI については旧設定を一度消さないと Cannot switch to/from L3 VNI mode. VNI should be deleted and reconfigured. と出るので消してから新しいモードの設定を入れている

設定移行コマンド
conf t
!
no interface Vlan3000
no interface Vlan3001
no interface Vlan3002
!
no vlan 3000
no vlan 3001
no vlan 3002
!
vrf context controller-vpc1
  no vni 9001
  vni 9001 l3
vrf context tenant1-vpc1
  no vni 19001
  vni 19001 l3
vrf context tenant2-vpc1
  no vni 29001
  vni 29001 l3
!
end

戻す場合もドキュメントに従って設定を戻す

ドキュメントより_L3VNI 設定を新しいものから古いものに移行するには、次の手順を実行します。
1. 新しい VRF-VNI-L3 構成を削除します。
2. VLAN および vlan-vnsegment 構成を作成します。
3. インターフェイス nve1 member-vni-associate 構成を保持します。
4. L3VNI の SVI構成を作成します。
5. VRF 構成の下に member-vni を追加します。
切り戻しConfig
conf t
!
vrf context controller-vpc1
  no vni 9001 l3
vrf context tenant1-vpc1
  no vni 19001 l3
vrf context tenant2-vpc1
  no vni 29001 l3
!
vlan 3000
  name controller-vpc1-l3vni
  vn-segment 9001
!
vlan 3001
  name tenant1-vpc1-l3vni
  vn-segment 19001
!
vlan 3002
  name tenant2-vpc1-l3vni
  vn-segment 29001
!
interface Vlan3000
  description controller-vpc1
  no shutdown
  vrf member controller-vpc1
  ip forward
  ipv6 address use-link-local-only
!
interface Vlan3001
  description tenant1-vpc1
  no shutdown
  vrf member tenant1-vpc1
  ip forward
  ipv6 address use-link-local-only
!
interface Vlan3002
  description tenant2-vpc1
  no shutdown
  vrf member tenant2-vpc1
  ip forward
  ipv6 address use-link-local-only
!
vrf context controller-vpc1
  vni 9001
vrf context tenant1-vpc1
  vni 19001
vrf context tenant2-vpc1
  vni 29001
!
end

新しいモードへの設定変更後の DIFF 結果は下記の通りで、L3VNI 用のVLAN/SVIが不要になったことが確認できる

show_run_diff
lfsw01# show run diff unified 
--- Startup-config
+++ Running-config
@@ -42,39 +41,30 @@
 rmon event 3 log trap public description ERROR(3) owner PMON@ERROR
 rmon event 4 log trap public description WARNING(4) owner PMON@WARNING
 rmon event 5 log trap public description INFORMATION(5) owner PMON@INFO
 
 fabric forwarding anycast-gateway-mac 2020.0000.00aa
-vlan 1,100,200,2001,3000-3002
+vlan 1,100,200,2001
 vlan 100
   name tenant1-vpc1-server-seg1
   vn-segment 10100
 vlan 200
   name tenant2-vpc1-server-seg1
   vn-segment 20200
 vlan 2001
   name controller-vpc1-seg1
   vn-segment 100
-vlan 3000
-  name controller-vpc1-l3vni
-  vn-segment 9001
-vlan 3001
-  name tenant1-vpc1-l3vni
-  vn-segment 19001
-vlan 3002
-  name tenant2-vpc1-l3vni
-  vn-segment 29001
 
 no spanning-tree vlan 10-3900
 ip prefix-list all-v4 seq 10 permit 0.0.0.0/0 ge 1 le 32 
 ipv6 prefix-list all-v6 seq 10 permit 0::/0 ge 1 le 128 
 route-map permit-all-v4 permit 100
   match ip address prefix-list all-v4 
 route-map permit-all-v6 permit 100
   match ipv6 address prefix-list all-v6 
 vrf context controller-vpc1
-  vni 9001
+  vni 9001 l3
   rd auto
   address-family ipv4 unicast
     route-target both auto
     route-target both auto evpn
   address-family ipv6 unicast
@@ -82,20 +72,20 @@
     route-target both auto evpn
 vrf context management
   ip name-server 192.168.129.254
   ip route 0.0.0.0/0 192.168.129.254
 vrf context tenant1-vpc1
-  vni 19001
+  vni 19001 l3
   rd auto
   address-family ipv4 unicast
     route-target both auto
     route-target both auto evpn
   address-family ipv6 unicast
     route-target both auto
     route-target both auto evpn
 vrf context tenant2-vpc1
-  vni 29001
+  vni 29001 l3
   rd auto
   address-family ipv4 unicast
     route-target both auto
     route-target both auto evpn
   address-family ipv6 unicast
@@ -137,31 +127,10 @@
   ipv6 address fd12:0:0:1::1/64
   ipv6 nd suppress-ra
   no ipv6 redirects
   fabric forwarding mode anycast-gateway
 
-interface Vlan3000
-  description controller-vpc1
-  no shutdown
-  vrf member controller-vpc1
-  ip forward
-  ipv6 address use-link-local-only
-
-interface Vlan3001
-  description tenant1-vpc1
-  no shutdown
-  vrf member tenant1-vpc1
-  ip forward
-  ipv6 address use-link-local-only
-
-interface Vlan3002
-  description tenant2-vpc1
-  no shutdown
-  vrf member tenant2-vpc1
-  ip forward
-  ipv6 address use-link-local-only
-
 interface port-channel1
   description virtual-vpc-peer-link
   switchport mode trunk
   spanning-tree port type network
   storm-control broadcast level 40.00

設定後にshow nve vni出力しても設定前と変わらない出力を確認している

lfsw01# show nve vni
Codes: CP - Control Plane        DP - Data Plane          
       UC - Unconfigured         SA - Suppress ARP        
       S-ND - Suppress ND        
       SU - Suppress Unknown Unicast 
       Xconn - Crossconnect      
       MS-IR - Multisite Ingress Replication 
       HYB - Hybrid IRB mode
    
Interface VNI      Multicast-group   State Mode Type [BD/VRF]      Flags
--------- -------- ----------------- ----- ---- ------------------ -----
nve1      100      UnicastBGP        Up    CP   L2 [2001]               
nve1      9001     n/a               Up    CP   L3 [controller-vpc1]      
nve1      10100    UnicastBGP        Up    CP   L2 [100]                
nve1      19001    n/a               Up    CP   L3 [tenant1-vpc1]       
nve1      20200    UnicastBGP        Up    CP   L2 [200]                
nve1      29001    n/a               Up    CP   L3 [tenant2-vpc1]     

show ip route を見ることで、lfsw01 から lfsw03/04 にしかないセグメント(172.16.1.0/24)が見えていることも確認できている

lfsw01# show ip route vrf tenant1-vpc1 
IP Route Table for VRF "tenant1-vpc1"
'*' denotes best ucast next-hop
'**' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'%<string>' in via output denotes VRF <string>

172.16.0.0/24, ubest/mbest: 1/0, attached
    *via 172.16.0.254, Vlan100, [0/0], 2w1d, direct
172.16.0.1/32, ubest/mbest: 1/0, attached
    *via 172.16.0.1, Vlan100, [190/0], 1w0d, hmm
172.16.0.254/32, ubest/mbest: 1/0, attached
    *via 172.16.0.254, Vlan100, [0/0], 2w1d, local
172.16.1.0/24, ubest/mbest: 1/0
    *via 10.0.2.2%default, [200/0], 1w0d, bgp-65001, internal, tag 65001, segid: 19001 tunnelid: 0xa000202 encap: VXLAN

以上、New L3VNI Mode へ設定切り替え完了

おわりに

CML 設定後の YAML は下記に保存してある (ただし 10.4.5M のイメージアップロードと設定も必要)

実環境で切り替え・使用する上では、既知のバグがあるため、バグ情報を確認してから利用する必要がありそう

既知のバグ例:N9K/TRM/new L3VNI mode - The secondary vPC does not forward multicast traffic in a failover scenario CSCwn22843

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?