简介
本文档介绍在Catalyst 9000系列交换机上使用VNID为L3VNI、core-SVI和core-vlan自动调配选项。
先决条件
要求
Cisco 建议您了解以下主题:
使用的组件
本文档中的信息基于以下软件和硬件版本:
- Catalyst 9300
- Catalyst 9400
- Catalyst 9500
- Catalyst 9600
- Cisco IOS® XE 17.13.1及更高版本
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您的网络处于活动状态,请确保您了解所有命令的潜在影响。
背景信息
第3层EVPN部署涉及许多配置选项,包括但不限于将VRF关联到NVE接口、核心SVI和核心VLAN的第3层VNI关联。
- 在引入L3VNI和core-vlan功能的自动调配之前,至少需要7条配置行(1条用于与nve接口的L3VNI关联,2条用于核心SVI,4条用于core-vlan),以设置特定的VRF用于BGP EVPN VxLAN。
- 通过L3VNI和core-vlan功能的自动调配,仅使用1行即可实现此目的,特别是在vnid命令的可选参数下(这是自动RT所必需的)。
- L3VNI、core-SVI、core-vlan和静态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层网络服务,但灵活性更高。功能上,它是MAC-in-UDP封装协议,在第3层底层网络上作为虚拟重叠运行。 |
配置
L3VNI、Core-SVI、Core-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
相关信息