CX-N云网典型配置方案验证
1 方案概述
本文主要讲解CX-N 系列交换机基于MC-LAG实现的三层组网下的相关解决方案,验证网络通信、故障转移和恢复等能力。整个验证过程中交换机所有命令通过思科命令行配置完成。
2 物理网络拓扑
本次相关方案验证的整体物理拓扑如图1所示:
3 硬件与软件环境
3.1 设备管理口
验证过程中所涉及到的设备、主机名及管理网口IP地址等信息,如表1所示:
设备 | 主机名 | 管理口IP地址 | 备注 |
CX532-N | Spine1 | 10.230.1.32 | |
CX532-N | Spine2 | 10.230.1.33 | |
CX308-N | Leaf1 | 10.230.1.18 | |
CX308-N | Leaf2 | 10.230.1.19 | |
CX308-N | Leaf3 | 10.230.1.20 | |
CX308-N | Leaf4 | 10.230.1.21 | |
Server | Server1 | 10.230.1.11 | |
Server | Server2 | 10.230.1.13 |
3.2 硬件环境
验证环境中涉及到的硬件环境,如表2所示:
名称 | 型号 | 硬件指标 | 数量 | 备注 |
Spine | CX532P-N | 【参见产品彩页】 | 2 | |
Leaf | CX308P-48Y-N | 【参见产品彩页】 | 4 | |
光模块 | 10G | SFP+ | 8 | 为了尽量减少物料种类,线缆和模块速率进行了统一,交换机互联使用100G模块和线缆,服务器需用10G模块和线缆 |
100G | QSFP28 | 24 | ||
网线 | / | / | 8 | |
光纤 | 多模 | 10G /25G适用 | 4 | |
多模 | 100G适用 | 12 | ||
服务器 | / | 内存推荐8G以上 | 2 |
3.3 软件环境
验证环境中涉及到的软件环境,如表3所示:
名称 | 版本 | 备注 |
iperf3 | 3.1.7 | |
CX532-N | SONiC.201911.R0314P04 | |
CX308-N | SONiC.201911.R0314P04 | |
服务器系统 | CentOS Linux 7.8.2003 | |
服务器内核 | 3.10.0-1127.18.2.el7 |
4 基础环境部署
在两台Server服务器上,安装部署本次验证方案的所需要的基础软件。
补充说明:以”[root@server ~]#”为开头的命令表示两台服务器都要执行。
4.1 LLDP
在两台Server服务器上安装LLDP服务,如果是X710网卡要求网卡驱动版本大于2.3.6,然后配置网卡开启LLDP。
[root@server ~]# yum -y install epel-release
[root@server ~]# yum -y install lldpd
[root@server ~]# systemctl start lldpd
[root@server ~]# systemctl enable lldpd
[root@server ~]# lspci |grep -i ether
[root@server ~]# ethtool -i ens1f2
[root@server ~]# ethtool -i ens1f3
[root@sever ~]# ethtool --set-priv-flags ens1f2 disable-fw-lldp on
[root@sever ~]# ethtool --set-priv-flags ens1f3 disable-fw-lldp on
4.2 安装iPerf3
在2台Server服务器上安装iPerf3软件用来打流。
在3台服务器上上执行:
[root@server ~]# yum -y install iperf3
[root@server ~]# iperf3 -v
iperf 3.1.7
Linux compute-2 3.10.0-1160.62.1.el7.x86_64 #1 SMP Tue Apr 5 16:57:59 UTC 2022 x86_64
Optional features available: CPU affinity setting, IPv6 flow label, TCP congestion algorithm setting, sendfile / zerocopy, socket pacing
4.3 检查链路连接
所有交换机设备要提前检查和Server服务器之间的链路连接情况,确保交换机设备和Server服务器之间的链路连接没有问题,以下命令在所有交换机设备上执行。
admin@sonic:~$ sudo config cli-mode cli
admin@sonic:~$ sudo sonic-cli
sonic#
Spine1# show lldp table
Spine2# show lldp table
Leaf1# show lldp table
Leaf2# show lldp table
Leaf3# show lldp table
Leaf4# show lldp table
5 组网环境配置
5.1 逻辑拓扑
5.2 Spine1
5.2.1 设备恢复出厂设置
配置思科命令行,恢复Spine1设备到出厂设置。
Spine1@sonic:~$ sudo config cli-mode cli
Spine1@sonic:~$ sudo sonic-cli
sonic# delete startup-config
sonic# reload
5.2.2 配置Spine1 接口IP
在Spine1交换机上配置与4台Leaf交换机的互联接口IP。
Spine1# configure terminal
Spine1(config)# interface ethernet 0/0
Spine1(config-if-0/0)# ip address 10.0.10.2/24
Spine1(config)# interface ethernet 0/4
Spine1(config-if-0/4)# ip address 10.0.11.2/24
Spine1(config)# interface ethernet 0/8
Spine1(config-if-0/8)# ip address 10.0.12.2/24
Spine1(config)# interface ethernet 0/12
Spine1(config-if-0/12)# ip address 10.0.13.2/24
5.2.3 配置Spine1 的BGP
在Spine1交换机上配置4台Leaf交换机的BGP邻居。
Spine1# configure terminal
Spine1(config)# router bgp 65003
Spine1(config-router)# bgp router-id 10.10.0.3
Spine1(config)# interface loopback 0
Spine1(config-loif-0)# ip address 10.10.0.3/32
Change Loopback0 ip from 10.1.0.1/32 to 10.10.0.3/32
Loopback ip will be used as bgp router-id in frr
Spine1(config)# router bgp 65003
Spine1(config-router)# no bgp ebgp-requires-policy
Spine1(config-router)# neighbor 10.0.10.1 remote-as 65007
Spine1(config-router)# neighbor 10.0.11.1 remote-as 65007
Spine1(config-router)# neighbor 10.0.12.1 remote-as 65008
Spine1(config-router)# neighbor 10.0.13.1 remote-as 65008
Spine1(config-router)# address-family l2vpn evpn
Spine1(config-router-af)# neighbor 10.0.10.1 activate
Spine1(config-router-af)# neighbor 10.0.11.1 activate
Spine1(config-router-af)# neighbor 10.0.12.1 activate
Spine1(config-router-af)# neighbor 10.0.13.1 activate
Spine1(config-router-af)# advertise-all-vni
Spine1(config)# write
Spine1(config)# reload
5.3 Spine2
5.3.1 设备恢复出厂设置
配置思科命令行,恢复Spine2设备到出厂设置。
Spine2@sonic:~$ sudo config cli-mode cli
Spine2@sonic:~$ sudo sonic-cli
sonic# delete startup-config
sonic# reload
5.3.2 配置Spine2接口IP
在Spine2交换机上配置与4台Leaf交换机的互联接口IP。
Spine2# configure terminal
Spine2(config)# interface ethernet 0/0
Spine2(config-if-0/0)# ip address 10.1.10.2/24
Spine2(config)# interface ethernet 0/4
Spine2(config-if-0/4)# ip address 10.1.11.2/24
Spine2(config)# interface ethernet 0/8
Spine2(config-if-0/8)# ip address 10.1.12.2/24
Spine2(config)# interface ethernet 0/12
Spine2(config-if-0/12)# ip address 10.1.13.2/24
5.3.3 配置Spine2的BGP
在Spine2交换机上配置4台Leaf交换机的BGP邻居。
Spine2# configure terminal
Spine2(config)# router bgp 65004
Spine2(config-router)# bgp router-id 10.10.0.4
Spine2(config)# interface loopback 0
Spine2(config-loif-0)# ip address 10.10.0.4/32
Change Loopback0 ip from 10.1.0.1/32 to 10.10.0.3/32
Loopback ip will be used as bgp router-id in frr
Spine2(config)# router bgp 65004
Spine2(config-router)# no bgp ebgp-requires-policy
Spine2(config-router)# neighbor 10.1.10.1 remote-as 65007
Spine2(config-router)# neighbor 10.1.11.1 remote-as 65007
Spine2(config-router)# neighbor 10.1.12.1 remote-as 65008
Spine2(config-router)# neighbor 10.1.13.1 remote-as 65008
Spine2(config-router)# address-family l2vpn evpn
Spine2(config-router-af)# neighbor 10.1.10.1 activate
Spine2(config-router-af)# neighbor 10.1.11.1 activate
Spine2(config-router-af)# neighbor 10.1.12.1 activate
Spine2(config-router-af)# neighbor 10.1.13.1 activate
Spine2(config-router-af)# advertise-all-vni
Spine2(config)# write
Spine2(config)# reload
5.4 Leaf1
5.4.1 设备恢复出厂设置
恢复Leaf1设备到出厂设置。
Leaf1# delete startup-config
Leaf1# reload
5.4.2 配置Leaf1端口速率
配置Leaf1交换机的Ethernet0口速率为10G。
Leaf1# configure terminal
Leaf1(config)# interface ethernet 0/0
Leaf1(config-if-0/0)# speed 10000
Leaf1(config-if-0/0)# show this
!
interface ethernet 0/0
speed 10000
5.4.3 配置Leaf1接口IP
在Leaf1交换机上配置与Leaf、Spine交换机的互联接口IP以及PortChannel、VLAN信息。
Leaf1# configure terminal
Leaf1(config)# interface ethernet 0/48
Leaf1(config-if-0/48)# ip address 10.0.10.1/24
Leaf1(config)# interface ethernet 0/52
Leaf1(config-if-0/52)# ip address 10.1.10.1/24
Leaf1(config)# interface link-aggregation 1
Leaf1(config)# interface link-aggregation 3
Leaf1(config)# interface ethernet 0/0
Leaf1(config-if-0/0)# link-aggregation-group 1
Leaf1(config-if-0/0)# interface ethernet 0/56
Leaf1(config-if-0/56)# link-aggregation-group 3
Leaf1(config-if-0/56)# interface ethernet 0/60
Leaf1(config-if-0/60)# link-aggregation-group 3
Leaf1(config)# vlan 10
Leaf1(config)# interface vlan 10
Leaf1(config-vlanif-10)# ip address 100.0.10.1/24
Leaf1(config)# interface link-aggregation 1
Leaf1(config-lagif-1)# switchport access vlan 10
Leaf1(config)# interface link-aggregation 3
Leaf1(config-lagif-3)# switchport trunk vlan 10
5.4.4 配置Leaf1的MC-LAG
在Leaf1交换机上配置与Leaf2交换机互联接口的MC-LAG。
Leaf1# configure terminal
Leaf1(config)# vlan 30
Leaf1(config)# interface link-aggregation 3
Leaf1(config-lagif-3)# switchport trunk vlan 30
Leaf1(config)# interface vlan 30
Leaf1(config-vlanif-30)# ip address 11.0.0.6/24
Leaf1(config)# mclag domain 1
Leaf1(mclag-domain)# peer-link link-aggregation 3
Leaf1(mclag-domain)# local-address 11.0.0.6
Leaf1(mclag-domain)# peer-address 11.0.0.7
Leaf1(mclag-domain)# member lag 1
Leaf1(mclag-domain)# commit
Leaf1(config)# interface vlan 10
Leaf1(config-vlanif-10)# mac-address 18:17:25:37:64:40
5.4.5 配置Leaf1的BGP
在Leaf1交换机上配置2台Spine交换机的BGP邻居。
Leaf1# configure terminal
Leaf1(config)# router bgp 65007
Leaf1(config-router)# bgp router-id 10.10.0.7
Leaf1(config)# interface loopback 0
Leaf1(config-loif-0)# ip address 10.10.0.7/32
Change Loopback0 ip from 10.1.0.1/32 to 10.10.0.7/32
Loopback ip will be used as bgp router-id in frr
Leaf1(config)# router bgp 65007
Leaf1(config-router)# no bgp ebgp-requires-policy
Leaf1(config-router)# neighbor 10.0.10.2 remote-as 65003
Leaf1(config-router)# neighbor 10.1.10.2 remote-as 65004
Leaf1(config-router)# address-family ipv4 unicast
Leaf1(config-router)# network 10.10.0.7/32
Leaf1(config-router)# address-family l2vpn evpn
Leaf1(config-router-af)# neighbor 10.0.10.2 activate
Leaf1(config-router-af)# neighbor 10.1.10.2 activate
Leaf1(config-router-af)# advertise-all-vni
5.4.6 配置Leaf1 的EVPN
在Leaf1交换机上配置EVPN、创建VNET,建立二三层VXLAN映射。
Leaf1# configure terminal
Leaf1(config)# interface vxlan 0
Leaf1(config-vxlanif-0)# source 10.10.0.7
Leaf1(config)# evpn-overlay enable
Leaf1(config)# vrf 123
Leaf1(config-vrf)# mac 60:eb:5a:00:86:20
Leaf1(config-vrf)# interface vlan 10
Leaf1(config-vlanif-10)# vrf 123
Leaf1(config)# vlan 10
Leaf1(config-vlan-10)# vni 10
Leaf1(config)# vrf 123
Leaf1(config-vrf)# vni 1000
Leaf1(config)# write
Leaf1(config)# reload
5.5 Leaf2
5.5.1 设备恢复出厂设置
恢复Leaf2设备到出厂设置。
Leaf2# delete startup-config
Leaf2# reload
5.5.2 配置Leaf2 端口速率
配置Leaf2交换机的Ethernet0口速率为10G。
Leaf2# configure terminal
Leaf2(config)# interface ethernet 0/0
Leaf2(config-if-0/0)# speed 10000
Leaf2(config-if-0/0)# show this
!
interface ethernet 0/0
speed 10000
5.5.3 配置Leaf2接口IP
在Leaf2交换机上配置与Leaf、Spine交换机的互联接口IP以及PortChannel、VLAN信息。
Leaf2# configure terminal
Leaf2(config)# interface ethernet 0/48
Leaf2(config-if-0/48)# ip address 10.0.11.1/24
Leaf2(config)# interface ethernet 0/52
Leaf2(config-if-0/52)# ip address 10.1.11.1/24
Leaf2(config) interface link-aggregation 1
Leaf2(config) interface link-aggregation 3
Leaf2(config)# interface ethernet 0/0
Leaf2(config-if-0/0)# link-aggregation-group 1
Leaf2(config-if-0/0)# interface ethernet 0/56
Leaf2(config-if-0/56)# link-aggregation-group 3
Leaf2(config-if-0/56)# interface ethernet 0/60
Leaf2(config-if-0/60)# link-aggregation-group 3
Leaf2(config)# vlan 10
Leaf2(config)# interface vlan 10
Leaf2(config-vlanif-10)# ip address 100.0.10.1/24
Leaf2(config)# interface link-aggregation 1
Leaf2(config-lagif-1)# switchport access vlan 10
Leaf2(config)# interface link-aggregation 3
Leaf2(config-lagif-3)# switchport trunk vlan 10
5.5.4 配置Leaf2的MC-LAG
在Leaf2交换机上配置与Leaf1交换机互联接口的MC-LAG。
Leaf2# configure terminal
Leaf2(config)# vlan 30
Leaf2(config)# interface link-aggregation 3
Leaf2(config-lagif-3)# switchport trunk vlan 30
Leaf2(config)# interface vlan 30
Leaf2(config-vlanif-30)# ip address 11.0.0.7/24
Leaf2(config)# mclag domain 1
Leaf2(mclag-domain)# peer-link link-aggregation 3
Leaf2(mclag-domain)# local-address 11.0.0.7
Leaf2(mclag-domain)# peer-address 11.0.0.6
Leaf2(mclag-domain)# member lag 1
Leaf2(mclag-domain)# commit
Leaf2(config)# interface vlan 10
Leaf2(config-vlanif-10)# mac-address 18:17:25:37:64:40
5.5.5 配置Leaf2的BGP
在Leaf2交换机上配置2台Spine交换机的BGP邻居。
Leaf2# configure terminal
Leaf2(config)# router bgp 65007
Leaf2(config-router)# bgp router-id 10.10.0.7
Leaf2(config)# interface loopback 0
Leaf2(config-loif-0)# ip address 10.10.0.7/32
Change Loopback0 ip from 10.1.0.1/32 to 10.10.0.7/32
Loopback ip will be used as bgp router-id in frr
Leaf2(config)# router bgp 65007
Leaf2(config-router)# no bgp ebgp-requires-policy
Leaf2(config-router)# neighbor 10.0.11.2 remote-as 65003
Leaf2(config-router)# neighbor 10.1.11.2 remote-as 65004
Leaf2(config-router)# address-family ipv4 unicast
Leaf2(config-router)# network 10.10.0.7/32
Leaf2(config-router)# address-family l2vpn evpn
Leaf2(config-router-af)# neighbor 10.0.11.2 activate
Leaf2(config-router-af)# neighbor 10.1.11.2 activate
Leaf2(config-router-af)# advertise-all-vni
5.5.6 配置Leaf2 的EVPN
在Leaf2交换机上配置EVPN、创建VNET,建立二三层VXLAN映射。
Leaf2# configure terminal
Leaf2(config)# interface vxlan 0
Leaf2(config-vxlanif-0)# source 10.10.0.7
Leaf2(config)# evpn-overlay enable
Leaf2(config)# vrf 123
Leaf2(config-vrf)# mac 60:eb:5a:00:86:20
Leaf2(config-vrf)# interface vlan 10
Leaf2(config-vlanif-10)# vrf 123
Leaf2(config)# vlan 10
Leaf2(config-vlan-10)# vni 10
Leaf2(config)# vrf 123
Leaf2(config-vrf)# vni 1000
Leaf2(config)# write
Leaf2(config)# reload
5.6 Leaf3
5.6.1 设备恢复出厂设置
恢复Leaf3设备到出厂设置。
Leaf3# delete startup-config
Leaf3# reload
5.6.2 配置Leaf3 端口速率
配置Leaf3交换机的Ethernet0口速率为10G。
Leaf3# configure terminal
Leaf3(config)# interface ethernet 0/0
Leaf3(config-if-0/0)# speed 10000
Leaf3(config-if-0/0)# show this
!
interface ethernet 0/0
speed 10000
5.6.3 配置Leaf3接口IP
在Leaf3交换机上配置与Leaf、Spine交换机的互联接口IP以及PortChannel、VLAN信息。
Leaf3# configure terminal
Leaf3(config)# interface ethernet 0/48
Leaf3(config-if-0/48)# ip address 10.0.12.1/24
Leaf3(config)# interface ethernet 0/52
Leaf3(config-if-0/52)# ip address 10.1.12.1/24
Leaf3(config) interface link-aggregation 1
Leaf3(config) interface link-aggregation 3
Leaf3(config)# interface ethernet 0/0
Leaf3(config-if-0/0)# link-aggregation-group 1
Leaf3(config-if-0/0)# interface ethernet 0/56
Leaf3(config-if-0/56)# link-aggregation-group 3
Leaf3(config-if-0/56)# interface ethernet 0/60
Leaf3(config-if-0/60)# link-aggregation-group 3
Leaf3(config)# vlan 20
Leaf3(config)# interface vlan 20
Leaf3(config-vlanif-20)# ip address 100.0.20.1/24
Leaf3(config)# interface link-aggregation 1
Leaf3(config-lagif-1)# switchport access vlan 20
Leaf3(config)# interface link-aggregation 3
Leaf3(config-lagif-3)# switchport trunk vlan 20
5.6.4 配置Leaf3的MC-LAG
在Leaf3交换机上配置与Leaf4交换机互联接口的MC-LAG。
Leaf3(config)# vlan 30
Leaf3(config)# interface link-aggregation 3
Leaf3(config-lagif-3)# switchport trunk vlan 30
Leaf3(config)# interface vlan 30
Leaf3(config-vlanif-30)# ip address 11.0.0.8/24
Leaf3(config)# mclag domain 1
Leaf3(mclag-domain)# peer-link link-aggregation 3
Leaf3(mclag-domain)# local-address 11.0.0.8
Leaf3(mclag-domain)# peer-address 11.0.0.9
Leaf3(mclag-domain)# member lag 1
Leaf3(mclag-domain)# commit
Leaf3(config)# interface vlan 20
Leaf3(config-vlanif-20)# mac-address 18:17:25:37:64:32
5.6.5 配置Leaf3的BGP
在Leaf3交换机上配置2台Spine交换机的BGP邻居。
Leaf3(config)# router bgp 65008
Leaf3(config-router)# bgp router-id 10.10.0.8
Leaf3(config)# interface loopback 0
Leaf3(config-loif-0)# ip address 10.10.0.8/32
Change Loopback0 ip from 10.1.0.1/32 to 10.10.0.8/32
Loopback ip will be used as bgp router-id in frr
Leaf3(config)# router bgp 65008
Leaf3(config-router)# no bgp ebgp-requires-policy
Leaf3(config-router)# neighbor 10.0.12.2 remote-as 65003
Leaf3(config-router)# neighbor 10.1.12.2 remote-as 65004
Leaf3(config-router)# address-family ipv4 unicast
Leaf3(config-router)# network 10.10.0.8/32
Leaf3(config-router)# address-family l2vpn evpn
Leaf3(config-router-af)# neighbor 10.0.12.2 activate
Leaf3(config-router-af)# neighbor 10.1.12.2 activate
Leaf3(config-router-af)# advertise-all-vni
5.6.6 配置Leaf3 的EVPN
在Leaf3交换机上配置EVPN、创建VNET,建立二三层VXLAN映射。
Leaf3# configure terminal
Leaf3(config)# interface vxlan 0
Leaf3(config-vxlanif-0)# source 10.10.0.8
Leaf3(config)# evpn-overlay enable
Leaf3(config)# vrf 456
Leaf3(config-vrf)# mac 60:eb:5a:00:86:22
Leaf3(config-vrf)# interface vlan 20
Leaf3(config-vlanif-10)# vrf 456
Leaf3(config)# vlan 20
Leaf3(config-vlan-10)# vni 20
Leaf3(config)# vrf 456
Leaf3(config-vrf)# vni 1000
Leaf3(config)# write
Leaf3(config)# reload
5.7 Leaf4
5.7.1 设备恢复出厂设置
恢复Leaf4设备到出厂设置。
Leaf4# delete startup-config
Leaf4# reload
5.7.2 配置Leaf4 端口速率
配置Leaf4交换机的Ethernet0口速率为10G。
Leaf4# configure terminal
Leaf4(config)# interface ethernet 0/0
Leaf4(config-if-0/0)# speed 10000
Leaf4(config-if-0/0)# show this
!
interface ethernet 0/0
speed 10000
5.7.3 配置Leaf4接口IP
在Leaf4交换机上配置与Leaf、Spine交换机的互联接口IP以及PortChannel、VLAN信息。
Leaf4# configure terminal
Leaf4(config)# interface ethernet 0/48
Leaf4(config-if-0/48)# ip address 10.0.13.1/24
Leaf4(config)# interface ethernet 0/52
Leaf4(config-if-0/52)# ip address 10.1.13.1/24
Leaf4(config) interface link-aggregation 1
Leaf4(config) interface link-aggregation 3
Leaf4(config)# interface ethernet 0/0
Leaf4(config-if-0/0)# link-aggregation-group 1
Leaf4(config-if-0/0)# interface ethernet 0/56
Leaf4(config-if-0/56)# link-aggregation-group 3
Leaf4(config-if-0/56)# interface ethernet 0/60
Leaf4(config-if-0/60)# link-aggregation-group 3
Leaf4(config)# vlan 20
Leaf4(config)# interface vlan 20
Leaf4(config-vlanif-20)# ip address 100.0.20.1/24
Leaf4(config)# interface link-aggregation 1
Leaf4(config-lagif-1)# switchport access vlan 20
Leaf4(config)# interface link-aggregation 3
Leaf4(config-lagif-3)# switchport trunk vlan 20
5.7.4 配置Leaf4的MC-LAG
在Leaf4交换机上配置与Leaf3交换机互联接口的MC-LAG。
Leaf4(config)# vlan 30
Leaf4(config)# interface link-aggregation 3
Leaf4(config-lagif-3)# switchport trunk vlan 30
Leaf4(config)# interface vlan 30
Leaf4(config-vlanif-30)# ip address 11.0.0.9/24
Leaf4(config)# mclag domain 1
Leaf4(mclag-domain)# peer-link link-aggregation 3
Leaf4(mclag-domain)# local-address 11.0.0.9
Leaf4(mclag-domain)# peer-address 11.0.0.8
Leaf4(mclag-domain)# member lag 1
Leaf4(mclag-domain)# commit
Leaf4(config)# interface vlan 20
Leaf4(config-vlanif-20)# mac-address 18:17:25:37:64:32
5.7.5 配置Leaf4的BGP
在Leaf4交换机上配置2台Spine交换机的BGP邻居。
Leaf4(config)# router bgp 65008
Leaf4(config-router)# bgp router-id 10.10.0.8
Leaf4(config)# interface loopback 0
Leaf4(config-loif-0)# ip address 10.10.0.8/32
Change Loopback0 ip from 10.1.0.1/32 to 10.10.0.8/32
Loopback ip will be used as bgp router-id in frr
Leaf4(config)# router bgp 65008
Leaf4(config-router)# no bgp ebgp-requires-policy
Leaf4(config-router)# neighbor 10.0.13.2 remote-as 65003
Leaf4(config-router)# neighbor 10.1.13.2 remote-as 65004
Leaf4(config-router)# address-family ipv4 unicast
Leaf4(config-router)# network 10.10.0.8/32
Leaf4(config-router)# address-family l2vpn evpn
Leaf4(config-router-af)# neighbor 10.0.13.2 activate
Leaf4(config-router-af)# neighbor 10.1.13.2 activate
Leaf4(config-router-af)# advertise-all-vni
5.7.6 配置Leaf4 的EVPN
在Leaf4交换机上配置EVPN、创建VNET,建立二三层VXLAN映射。
Leaf4# configure terminal
Leaf4(config)# interface vxlan 0
Leaf4(config-vxlanif-0)# source 10.10.0.8
Leaf4(config)# evpn-overlay enable
Leaf4(config)# vrf 456
Leaf4(config-vrf)# mac 60:eb:5a:00:86:22
Leaf4(config-vrf)# interface vlan 20
Leaf4(config-vlanif-10)# vrf 456
Leaf4(config)# vlan 20
Leaf4(config-vlan-10)# vni 20
Leaf4(config)# vrf 456
Leaf4(config-vrf)# vni 1000
Leaf4(config)# write
Leaf4(config)# reload
更多内容请参考:A-Lab