X-N系列交换机MC-LAG功能验证
1 方案概述
本文主要讲解CX-N 系列交换机基于MC-LAG实现的三层组网下的相关解决方案,验证网络通信、故障转移和恢复等能力。整个验证过程中交换机所有命令通过KLISH命令行配置完成。
2 物理网络拓扑
本次相关方案验证的整体物理拓扑如图1所示:
3 硬件与软件环境
3.1 设备管理口
验证过程中所涉及到的设备、主机名及管理网口IP地址等信息,如下表所示:
设备 | 主机名 | 管理口IP |
---|---|---|
CX532-N | Spine1 | 10.230.1.7 |
CX532-N | Spine2 | 10.230.1.8 |
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 硬件环境
验证环境中涉及到的硬件环境,如下表所示:
名称 | 型号 | 硬件指标 | 数量 | 备注 |
---|---|---|---|---|
Spine | CX532P-N | 【参见产品彩页】 | 2 | |
Leaf | CX308P-48Y-N | 【参见产品彩页】 | 4 | |
光模块 | 10G 100G | SFP+ QSFP28 | 8 24 | 为了尽量减少物料种类,线缆和模块速率进行了统一,交换机互联使用100G模块和线缆,服务器需用10G模块和线缆 |
网线 | / | / | 8 | |
光纤 | 多模 多模 | 10G /25G适用 100G适用 | 4 12 | |
服务器 | / | 内存推荐8G以上 | 2 |
3.3 软件环境
验证环境中涉及到的软件环境,如下表所示:
名称 | 版本 |
---|---|
iperf3 | 3.1.7 |
CX532-N | SONiC.201911.R0312P03 |
CX308-N | SONiC.201911.R0312P03 |
服务器系统 | 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软件用来打流。
在2台服务器上上执行:
[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 neighbor summary
Spine2# show lldp neighbor summary
Leaf1#show lldp neighbor summary
Leaf2#show lldp neighbor summary
Leaf3#show lldp neighbor summary
Leaf4#show lldp neighbor summary
5 组网环境配置
5.1 逻辑拓扑
5.2 Spine1
- 设备恢复出厂设置
配置CICSO-LIKE命令行,恢复Spine1设备到出厂设置。
Spine1@sonic:~$ sudo config cli-mode cli
Spine1@sonic:~$ sudo sonic-cli
sonic# delete startup-config
sonic# reload
- 配置Spine1接口IP
在Spine1交换机上配置与4台Leaf交换机的互联接口IP。
Spine1# configure terminal
Spine1(config)# interface ethernet 0/4
Spine1(config-if-0/4)# ip address 10.0.10.2/24
Spine1(config)# interface ethernet 0/8
Spine1(config-if-0/8)# ip address 10.0.11.2/24
Spine1(config)# interface ethernet 0/12
Spine1(config-if-0/12)# ip address 10.0.12.2/24
Spine1(config)# interface ethernet 0/16
Spine1(config-if-0/16)# ip address 10.0.13.2/24
- 配置Spine1的BGP
在Spine1交换机上配置4台Leaf交换机的BGP邻居。
Spine1# configure terminal
Spine1(config)# interface ethernet 0/4
Spine1(config-if-0/4)# ip address 10.0.10.2/24
Spine1(config-if-0/4)# interface ethernet 0/8
Spine1(config-if-0/8)# ip address 10.0.11.2/24
Spine1(config-if-0/8)# interface ethernet 0/12
Spine1(config-if-0/12)# ip address 10.0.12.2/24
Spine1(config-if-0/12)# interface ethernet 0/16
Spine1(config-if-0/16)# ip address 10.0.13.2/24
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 ipv4 unicast
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
5.3 Spine2
- 设备恢复出厂设置
配置CICSO-LIKE命令行,恢复Spine2设备到出厂设置。
Spine2@sonic:~$ sudo config cli-mode cli
Spine2@sonic:~$ sudo sonic-cli
sonic# delete startup-config
sonic# reload
- 配置Spine2接口IP
在Spine2交换机上配置与4台Leaf交换机的互联接口IP。
Spine2# configure terminal
Spine2(config)# interface ethernet 0/4
Spine2(config-if-0/4)# ip address 10.1.10.2/24
Spine2(config)# interface ethernet 0/8
Spine2(config-if-0/8)# ip address 10.1.11.2/24
Spine2(config)# interface ethernet 0/12
Spine2(config-if-0/12)# ip address 10.1.12.2/24
Spine2(config)# interface ethernet 0/16
Spine2(config-if-0/16)# ip address 10.1.13.2/24
- 配置Spine2的BGP
在Spine2交换机上配置4台Leaf交换机的BGP邻居。
Spine2# configure terminal
Spine2(config)# interface ethernet 0/4
Spine2(config-if-0/4)# ip address 10.0.10.2/24
Spine2(config-if-0/4)# interface ethernet 0/8
Spine2(config-if-0/8)# ip address 10.0.11.2/24
Spine2(config-if-0/8)# interface ethernet 0/12
Spine2(config-if-0/12)# ip address 10.0.12.2/24
Spine2(config-if-0/12)# interface ethernet 0/16
Spine2(config-if-0/16)# ip address 10.0.13.2/24
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
5.4 Leaf1
- 设备恢复出厂设置
恢复Leaf1设备到出厂设置。
Leaf1# delete startup-config
Leaf1# reload
- 配置Leaf1端口速率
配置Leaf1交换机的Ethernet2口速率为10G。
Leaf1# configure terminal
Leaf1(config)# interface ethernet 0/2
Leaf1(config-if-0/2)# speed 10000
Leaf1(config-if-0/2)# show this
!
interface ethernet 0/2
speed 10000
- 配置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/2
Leaf1(config-if-0/2)# link-aggregation-group 1
Leaf1(config-if-0/2)# 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-1)# switchport trunk vlan 10
- 配置Leaf1的MC-LAG
在Leaf1交换机上配置与Leaf2交换机互联接口的MC-LAG。
Leaf1# configure terminal
Leaf1(config)# vlan 30
Leaf1(config)# interface link-aggregation 3
Leaf1(config-lagif-1)# 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
- 配置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
- 配置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
5.5 Leaf2
- 设备恢复出厂设置
恢复Leaf2设备到出厂设置。
sonic# delete startup-config
sonic# reload
- 配置Leaf2端口速率
配置Leaf2交换机的Ethernet2口速率为10G。
sonic# configure terminal
sonic(config)# interface ethernet 0/2
sonic(config-if-0/2)# speed 10000
sonic(config-if-0/2)# show this
!
interface ethernet 0/2
speed 10000
- 配置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/2
Leaf2(config-if-0/2)# link-aggregation-group 1
Leaf2(config-if-0/2)# 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-1)# switchport trunk vlan 10
- 配置Leaf2的MC-LAG
在Leaf2交换机上配置与Leaf1交换机互联接口的MC-LAG。
Leaf2# configure terminal
Leaf2(config)# vlan 30
Leaf2(config)# interface link-aggregation 3
Leaf2(config-lagif-1)# 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
- 配置Leaf2的BGP
在Leaf2交换机上配置2台Spine交换机的BGP邻居。
Leaf1# 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
- 配置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
5.6 Leaf3
- 设备恢复出厂设置
恢复Leaf3设备到出厂设置。
sonic# delete startup-config
sonic# reload
- 配置Leaf3端口速率
配置Leaf3交换机的Ethernet2口速率为10G。
Leaf3# configure terminal
Leaf3(config)# interface ethernet 0/2
Leaf3(config-if-0/2)# speed 10000
Leaf3(config-if-0/2)# show this
!
interface ethernet 0/2
speed 10000
- 配置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/2
Leaf3(config-if-0/2)# link-aggregation-group 1
Leaf3(config-if-0/2)# interface ethernet 0/64
Leaf3(config-if-0/64)# link-aggregation-group 3
Leaf3(config-if-0/64)# interface ethernet 0/68
Leaf3(config-if-0/68)# 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
- 配置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
- 配置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
- 配置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
5.7 Leaf4
- 设备恢复出厂设置
恢复Leaf4设备到出厂设置。
sonic# delete startup-config
sonic# reload
- 配置Leaf4端口速率
配置Leaf4交换机的Ethernet2口速率为10G。
Leaf4# configure terminal
Leaf4(config)# interface ethernet 0/2
Leaf4(config-if-0/2)# speed 10000
Leaf4(config-if-0/2)# show this
!
interface ethernet 0/2
speed 10000
- 配置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/2
Leaf4(config-if-0/2)# link-aggregation-group 1
Leaf4(config-if-0/2)# interface ethernet 0/64
Leaf4(config-if-0/64)# link-aggregation-group 3
Leaf4(config-if-0/64)# interface ethernet 0/68
Leaf4(config-if-0/68)# 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
- 配置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
- 配置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
- 配置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