簡介
本檔案將說明在Catalyst 9000系列交換器上使用VNID的L3VNI、core-SVI和core-vlan的自動布建選項。
必要條件
需求
思科建議您瞭解以下主題:
採用元件
本文中的資訊係根據以下軟體和硬體版本:
- Catalyst 9300
- Catalyst 9400
- Catalyst 9500
- Catalyst 9600
- Cisco IOS® XE 17.13.1及更高版本
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
背景資訊
第3層EVPN部署涉及許多配置選項,包括但不限於將VRF關聯到NVE介面的第3層VNI關聯、核心SVI和核心VLAN。
- 在引入自動調配L3VNI和核心VLAN功能之前,至少需要7條配置線路(1條用於與NVE介面關聯的L3VNI,2條用於核心SVI,4條用於核心VLAN)為BGP EVPN VxLAN使用設定特定VRF。
- 藉由L3VNI的自動布建和core-vlan功能,這可以只使用1行來實現,特別是在vnid命令的可選引數(這是自動RT所必須的)下。
- L3VNI、core-SVI、core-vlan和static L3VNI、core-SVI、core-vlan的自動調配功能沒有區別。 每個VRF必須與一個L3VNI、core-SVI和core-vlan唯一關聯。
- L3VNI的法定範圍是從4096到16777215(包括)。 使用「vni auto」選項,vnid值需要在此範圍內。
- core-vlan的合法範圍為1到4094。
- 此外,自動調配L3VNI和core-SVI/core-vlan可與任何特定VRF中的靜態RT共存(在此功能之前,除現有的靜態RT外,您還可以配置自動RT)。
簡化配置的能力非常理想(如果不是必要的),因為部署是可行的,並且已廣泛用於BGP EVPN VxLAN交換矩陣。此功能是EVPN的理想選擇,因為它有助於避免在脊柱 — 枝葉拓撲中編寫和維護廣泛而複雜的配置,其中在特定枝葉中配置了許多VRF。
註:此功能引入了新的CLI,並且是Catalyst 9000系列交換機上EVPN中BGP VRF的CLI簡化的一部分。
技術
VRF |
虛擬路由轉送 |
定義與其他VRF和全域性IPv4/IPv6路由域分離的第3層路由域 |
AF |
地址系列 |
定義BGP處理的型別字首和路由資訊 |
AS |
自治系統 |
一組網際網路可路由IP字首,它們屬於一個網路或一組網路,都由單個實體或組織管理、控制和監督 |
EVPN |
乙太網路虛擬私人網路 |
允許BGP傳輸第2層MAC和第3層IP資訊的擴展是EVPN和 使用多協定邊界網關協定(MP-BGP)作為協定,以分發與VXLAN重疊網路相關的可達性資訊。 |
VXLAN |
虛擬可擴充LAN(區域網路) |
VXLAN的用途是克服VLAN和STP的固有限制。建議採用的IETF標準[RFC 7348]提供與VLAN相同的乙太網第2層網路服務,但具有更高的靈活性。功能上,它是UDP內MAC封裝協定,在第3層底層網路上作為虛擬重疊運行。 |
設定
L3VNI、核心SVI、核心VLAN自動調配
Leaf-01#sh run | section vrf definition blue
vrf definition blue
vnid 31234 evpn-instance vni auto core-vlan 200 <-- Auto provision the L3VNI of 31234,
<-- core-SVI and core-vlan 200
Leaf-01#sh run | section vrf definition green
vrf definition green
vnid 12 evpn-instance vni 16777215 core-vlan 4094 <-- Provision the L3VNI of 16777215,
<-- core-SVI and core-vlan 4094
注意:其他主幹路由反射器的配置相同,因此本節不重複此步驟
注意:其他EVPN葉可以使用靜態L3VNI、core-SVI、core-vlan配置。只要L3VNI相符,就會正確路由資料流量。
驗證
驗證枝葉,使正確的L3VNI與NVE介面、core-SVI和core-vlan關聯:
Leaf-01#show derived-config interface nve1
...
interface nve1
source-interface Loopback1
host-reachability protocol bgp
...
member vni 31234 vrf blue
member vni 16777215 vrf green
...
Leaf-01# show derived-config | section vlan configuration 200
vlan configuration 200
member vni 31234
Leaf-01# show derived-config | section vlan configuration 4094
vlan configuration 4094
member vni 16777215
Leaf-01# show derived-config | section interface Vlan200
interface Vlan200
vrf forwarding blue
ip unnumbered Loopback1
ipv6 unnumbered Loopback1
no autostate
Leaf-01# show derived-config | sec interface Vlan4094
interface Vlan4094
vrf forwarding green
ip unnumbered Loopback1
ipv6 unnumbered Loopback1
no autostate
疑難排解
調試
如果VRF自動RD自動RT存在問題,您可以使用調試檢視有關問題的詳細資訊
啟用相關調試
Leaf-01#debug ip bgp autordrt
Leaf-01#debug vrf create
Leaf-01#debug vrf delete
Leaf-01#debug l2vpn evpn event detail
顯示 調試資訊
VTEP1#show debug
VRF Manager:
VRF creation debugging is on
VRF deletion debugging is on
Packet Infra debugs:
Ip Address Port
------------------------------------------------------|----------
IP routing:
BGP auto rd rt debugging is on
EVPN:
EVPN detailed events debugging is on
觀察每個配置步驟中產生的調試
Leaf-01(config)#vrf definition test
Leaf-01(config-vrf)#vnid 31234 evpn-instance vni auto core-vlan 200
% vnid vni (31234) core vlan (200) acquired for "vrf test"
% vnid 31234 evpn-instance vni auto (vni 0 core-vlan 200) is configured in "vrf test"
*Aug 12 02:57:07.414: EVPN: Received interface Vlan200 down event
*Aug 12 02:57:07.414: EVPN: Received interface Vlan200 down event
*Aug 12 02:57:07.415: BGP: VRF config event of vnid change for vrf test
*Aug 12 02:57:07.415: BGP: afi 0 vrf test vnid 31234 RT assign
*Aug 12 02:57:07.415: BGP: vrf assign auto import stitching rt for VRF test
*Aug 12 02:57:07.415: BGP: vrf assign auto export stitching rt for VRF test
*Aug 12 02:57:07.415: BGP: afi 1 vrf test vnid 31234 RT assign
*Aug 12 02:57:07.415: BGP: vrf assign auto import stitching rt for VRF test
*Aug 12 02:57:07.415: BGP: vrf assign auto export stitching rt for VRF test
*Aug 12 02:57:07.416: EVPN: Received interface Vlan200 down event
*Aug 12 02:57:07.416: EVPN: Received interface Vlan200 down event
*Aug 12 02:57:07.416: EVPN: Received interface Vlan200 down event
*Aug 12 02:57:07.416: EVPN: Received interface Vlan200 up event
*Aug 12 02:57:07.416: EVPN: Received interface Vlan200 up event
*Aug 12 02:57:07.416: EVPN: Received interface Vlan200 down event
*Aug 12 02:57:07.416: EVPN: Received interface Vlan200 down event
*Aug 12 02:57:07.416: EVPN: Received interface Vlan200 down event
*Aug 12 02:57:07.416: EVPN: Received interface Vlan200 up event
*Aug 12 02:57:07.416: EVPN: Received interface Vlan200 up event
*Aug 12 02:57:08.414: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan200, changed state to up
*Aug 12 02:57:09.414: %LINK-3-UPDOWN: Interface Vlan200, changed state to up
Leaf-01(config-vrf)#no vnid 31234 vni auto core-vlan 200
% vnid 31234 delete for VRF test
% deacquire vnid vni (31234) or core vlan (200) succeed for "vrf test"
*Aug 12 04:46:34.462: EVPN: Received interface Vlan200 down event
*Aug 12 04:46:34.462: EVPN: Received interface Vlan200 down event
*Aug 12 04:46:34.462: EVPN: Received interface Vlan200 down event
*Aug 12 04:46:34.463: EVPN: Received interface Vlan200 down event
*Aug 12 04:46:34.464: BGP: VRF config event of vnid change for vrf test
*Aug 12 04:46:34.464: BGP: afi 0 vrf test vnid config deleted
*Aug 12 04:46:34.464: BGP: vrf de-assign auto import stitching rt for VRF test
*Aug 12 04:46:34.464: BGP: vrf de-assign auto export stitching rt for VRF test
*Aug 12 04:46:34.464: BGP: afi 1 vrf test vnid config deleted
*Aug 12 04:46:34.464: BGP: vrf de-assign auto import stitching rt for VRF test
*Aug 12 04:46:34.464: BGP: vrf de-assign auto export stitching rt for VRF test
相關資訊