[Enterprise SONiC] Asymmetric EVPN IRB Follow
Tested model & firmware version:
- Switch model name:
AS7326-56X
AS7726-32X
AS5835-54X(T)
- Edgecore SONiC version:
202006.4
202012.2
Restriction:
- EVPN only supports ipv4 in the current version, it doesn't support ipv6.
Asymmetric EVPN IRB
Topology:
Note :
- BGP, EVPN and VxLAN related articles are available in here, Routing (BGP) , EVPN & VxLAN.
- All VNI is belong to L2 VNI.
Procedure:
Step 1. Setup VLAN 10 and VLAN 20. Add Ethernet52 of both switches to VLAN 10 and VLAN 20. Please refer to VLAN & Inter-VLAN Routing article.
Step 2. Configure IP address to VLAN 10 and VLAN 20. In this example as shown on topology diagram above, configure the IP address to VLAN 10 and VLAN 20 of both switches. There's known issue as listed above which requires IP address on VLAN. Please refer to VLAN & Inter-VLAN Routing article.
Step 3. Configure IP address to both Ethernet48 of both switches.
#SONiC01
admin@SONIC01:~$sudo config interface ip add Ethernet48 10.0.0.4/31
#SONiC02
admin@SONIC02:~$sudo config interface ip add Ethernet48 10.0.0.5/31
Step 4: Configure IP address to Loopback0 of both switches.
#SONiC01
admin@SONIC01:~$ sudo config interface ip remove Loopback0 10.1.0.1/32
admin@SONIC01:~$ sudo config interface ip add Loopback0 1.1.1.1/32
#SONiC02
admin@SONIC02:~$ sudo config interface ip remove Loopback0 10.1.0.1/32
admin@SONIC02:~$ sudo config interface ip add Loopback0 2.2.2.2/32
Step 5. Create VxLAN
#SONiC01
admin@SONIC01:~$sudo config vxlan add vtep 1.1.1.1 → configuring VTEP_name (vtep) and its IP address
admin@SONIC01:~$sudo config vxlan evpn_nvo add nvo vtep → create nvo_name (nvo) and bind it to VTEP_name (vtep)
admin@SONIC01:~$sudo config vxlan map add vtep 10 1000 → mapping VNI 1000 to VLAN 10
admin@SONIC01:~$sudo config vxlan map add vtep 20 2000 → mapping VNI 2000 to VLAN 20
admin@SONIC01:~$sudo config save -y
#SONiC02
admin@SONIC01:~$sudo config vxlan add vtep 2.2.2.2 → configuring VTEP_name (vtep) and its IP address
admin@SONIC01:~$sudo config vxlan evpn_nvo add nvo vtep → create nvo_name (nvo) and bind it to VTEP_name (vtep)
admin@SONIC01:~$sudo config vxlan map add vtep 10 1000 → mapping VNI 1000 to VLAN 10
admin@SONIC01:~$sudo config vxlan map add vtep 20 2000 → mapping VNI 2000 to VLAN 20
admin@SONIC01:~$sudo config save -y
Step 6. Establish BGP environment for EVPN.
#SONiC01
admin@7726:~$ vtysh → enter vtysh shell
Hello, this is FRRouting (version 7.2.1-sonic).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
sonic# configure terminal
sonic(config)#router bgp 65100 → assign BGP AS number
sonic(config-router)#neighbor 10.0.0.5 interface remote-as 65100 → assign Ethernet48 IP address to connect via IBGP with peering on same AS
sonic(config-router)# address-family ipv4 unicast → Enter address-family ipv4
sonic(config-router-af)# network 1.1.1.1/32 → Announce 1.1.1.1 network
sonic(config-router-af)# exit
sonic(config-router)#address-family l2vpn evpn → enter EVPN setting
sonic(config-router-af)#neighbor 10.0.0.5 activate → activate EVPN for neighbor 10.0.0.5
sonic(config-router-af)#advertise-all-vni → advertise all VNI routing
sonic(config-router-af)#exit
#SONiC02
admin@7726:~$ vtysh → enter vtysh shell
Hello, this is FRRouting (version 7.2.1-sonic).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
sonic# configure terminal
sonic(config)#router bgp 65100 → assign BGP AS number
sonic(config-router)#neighbor 10.0.0.4 interface remote-as 65100 → assign Ethernet48 IP address to connect via IBGP with peering on same AS
sonic(config-router)# address-family ipv4 unicast → Enter address-family ipv4
sonic(config-router-af)# network 2.2.2.2/32 → Announce 2.2.2.2 network
sonic(config-router-af)# exit
sonic(config-router)#address-family l2vpn evpn → enter EVPN setting
sonic(config-router-af)#neighbor 10.0.0.4 activate → activate EVPN for neighbor 10.0.0.4
sonic(config-router-af)#advertise-all-vni → advertise all VNI routing
sonic(config-router-af)#exit
Step 7. Check EVPN-VNI status.
#SONiC01
sonic# show evpn vni
VNI Type VxLAN IF # MACs # ARPs # Remote VTEPs Tenant VRF
1000 L2 vtep-10 2 5 1 default
2000 L2 vtep-20 2 5 1 default
sonic# show evpn vni detail
VNI: 1000
Type: L2
Tenant VRF: default
VxLAN interface: vtep-10
VxLAN ifIndex: 317
Local VTEP IP: 1.1.1.1
Mcast group: 0.0.0.0
Remote VTEPs for this VNI:
2.2.2.2 flood: HER
Number of MACs (local and remote) known for this VNI: 2
Number of ARPs (IPv4 and IPv6, local and remote) known for this VNI: 5
Advertise-gw-macip: No
VNI: 2000
Type: L2
Tenant VRF: default
VxLAN interface: vtep-20
VxLAN ifIndex: 318
Local VTEP IP: 1.1.1.1
Mcast group: 0.0.0.0
Remote VTEPs for this VNI:
2.2.2.2 flood: HER
Number of MACs (local and remote) known for this VNI: 2
Number of ARPs (IPv4 and IPv6, local and remote) known for this VNI: 5
Advertise-gw-macip: No
#SONiC02
sonic# show evpn vni
VNI Type VxLAN IF # MACs # ARPs # Remote VTEPs Tenant VRF
1000 L2 vtep-10 2 5 1 default
2000 L2 vtep-20 2 5 1 default
sonic# show evpn vni detail
VNI: 1000
Type: L2
Tenant VRF: default
VxLAN interface: vtep-10
VxLAN ifIndex: 71
Local VTEP IP: 2.2.2.2
Mcast group: 0.0.0.0
Remote VTEPs for this VNI:
1.1.1.1 flood: HER
Number of MACs (local and remote) known for this VNI: 2
Number of ARPs (IPv4 and IPv6, local and remote) known for this VNI: 5
Advertise-gw-macip: No
VNI: 2000
Type: L2
Tenant VRF: default
VxLAN interface: vtep-20
VxLAN ifIndex: 72
Local VTEP IP: 2.2.2.2
Mcast group: 0.0.0.0
Remote VTEPs for this VNI:
1.1.1.1 flood: HER
Number of MACs (local and remote) known for this VNI: 2
Number of ARPs (IPv4 and IPv6, local and remote) known for this VNI: 5
Advertise-gw-macip: No
Step 8. Check BGP EVPN status.
#SONiC01
sonic# show bgp l2vpn evpn
BGP table version is 12, local router ID is 192.168.2.253
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> [2]:[0]:[48]:[8c:ea:1b:30:da:47]
1.1.1.1 32768 i
ET:8 RT:65100:1000
*> [2]:[0]:[48]:[8c:ea:1b:30:da:47]:[32]:[192.168.1.1]
1.1.1.1 32768 i
ET:8 RT:65100:1000
*> [2]:[0]:[48]:[8c:ea:1b:30:da:47]:[128]:[fe80::5037:63f4:3aba:bbe9]
1.1.1.1 32768 i
ET:8 RT:65100:1000
*> [3]:[0]:[32]:[1.1.1.1]
1.1.1.1 32768 i
ET:8 RT:65100:1000
Route Distinguisher: ip 192.168.2.253:3
*> [3]:[0]:[32]:[1.1.1.1]
1.1.1.1 32768 i
ET:8 RT:65100:2000
Route Distinguisher: ip 192.168.2.254:2
*>i[3]:[0]:[32]:[2.2.2.2]
2.2.2.2 100 0 i
RT:65100:1000 ET:8
*>i[2]:[0]:[48]:[8c:ea:1b:30:da:4b]
2.2.2.2 100 0 i
RT:65100:2000 ET:8
*>i[2]:[0]:[48]:[8c:ea:1b:30:da:4b]:[32]:[192.168.2.1]
2.2.2.2 100 0 i
RT:65100:2000 ET:8
*>i[2]:[0]:[48]:[8c:ea:1b:30:da:4b]:[128]:[fe80::2a29:a798:37d3:76c2]
2.2.2.2 100 0 i
RT:65100:2000 ET:8
*>i[3]:[0]:[32]:[2.2.2.2]
2.2.2.2 100 0 i
RT:65100:2000 ET:8
Displayed 10 out of 10 total prefixes
#SONiC02
sonic# show bgp l2vpn evpn
BGP table version is 12, local router ID is 192.168.2.254
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*>i[2]:[0]:[48]:[8c:ea:1b:30:da:47]
1.1.1.1 100 0 i
RT:65100:1000 ET:8
*>i[2]:[0]:[48]:[8c:ea:1b:30:da:47]:[32]:[192.168.1.1]
1.1.1.1 100 0 i
RT:65100:1000 ET:8
*>i[2]:[0]:[48]:[8c:ea:1b:30:da:47]:[128]:[fe80::5037:63f4:3aba:bbe9]
1.1.1.1 100 0 i
RT:65100:1000 ET:8
*>i[3]:[0]:[32]:[1.1.1.1]
1.1.1.1 100 0 i
RT:65100:1000 ET:8
Route Distinguisher: ip 192.168.2.253:3
*>i[3]:[0]:[32]:[1.1.1.1]
1.1.1.1 100 0 i
RT:65100:2000 ET:8
Route Distinguisher: ip 192.168.2.254:2
*> [3]:[0]:[32]:[2.2.2.2]
2.2.2.2 32768 i
ET:8 RT:65100:1000
*> [2]:[0]:[48]:[8c:ea:1b:30:da:4b]
2.2.2.2 32768 i
ET:8 RT:65100:2000
*> [2]:[0]:[48]:[8c:ea:1b:30:da:4b]:[32]:[192.168.2.1]
2.2.2.2 32768 i
ET:8 RT:65100:2000
*> [2]:[0]:[48]:[8c:ea:1b:30:da:4b]:[128]:[fe80::2a29:a798:37d3:76c2]
2.2.2.2 32768 i
ET:8 RT:65100:2000
*> [3]:[0]:[32]:[2.2.2.2]
2.2.2.2 32768 i
ET:8 RT:65100:2000
Displayed 10 out of 10 total prefixes
Step 9. Check VNI MAC learning.
#SONiC01
sonic# show evpn mac vni all
VNI 1000 #MACs (local and remote) 2
MAC Type Intf/Remote VTEP VLAN Seq #'s
04:f8:f8:6a:f6:91 local Vlan10 10 0/0
8c:ea:1b:30:da:47 local Ethernet52 10 0/0
VNI 2000 #MACs (local and remote) 2
MAC Type Intf/Remote VTEP VLAN Seq #'s
04:f8:f8:6a:f6:91 local Vlan20 20 0/0
8c:ea:1b:30:da:4b remote 2.2.2.2 0/0
#SONiC02
sonic# show evpn mac vni all
VNI 1000 #MACs (local and remote) 2
MAC Type Intf/Remote VTEP VLAN Seq #'s
04:f8:f8:6b:06:91 local Vlan10 10 0/0
8c:ea:1b:30:da:47 remote 1.1.1.1 0/0
VNI 2000 #MACs (local and remote) 2
MAC Type Intf/Remote VTEP VLAN Seq #'s
04:f8:f8:6b:06:91 local Vlan20 20 0/0
8c:ea:1b:30:da:4b local Ethernet52 20 0/0
Step 10. Check ARP learning table. Hosts ARP shall be learnt by both switches.
#SONiC01
sonic# show evpn arp-cache vni all
VNI 1000 #ARP (IPv4 and IPv6, local and remote) 5
IP Type State MAC Remote VTEP Seq #'s
fe80::6f8:f8ff:fe6b:691 local inactive 04:f8:f8:6b:06:91 0/0
fe80::5037:63f4:3aba:bbe9 local active 8c:ea:1b:30:da:47 0/0
192.168.1.254 local active 04:f8:f8:6a:f6:91 0/0
fe80::6f8:f8ff:fe6a:f691 local active 04:f8:f8:6a:f6:91 0/0
192.168.1.1 local active 8c:ea:1b:30:da:47 0/0
VNI 2000 #ARP (IPv4 and IPv6, local and remote) 5
IP Type State MAC Remote VTEP Seq #'s
192.168.2.1 remote active 8c:ea:1b:30:da:4b 2.2.2.2 0/0
fe80::6f8:f8ff:fe6b:691 local inactive 04:f8:f8:6b:06:91 0/0
fe80::6f8:f8ff:fe6a:f691 local active 04:f8:f8:6a:f6:91 0/0
192.168.2.253 local active 04:f8:f8:6a:f6:91 0/0
fe80::2a29:a798:37d3:76c2 remote active 8c:ea:1b:30:da:4b 2.2.2.2 0/0
#SONiC02
sonic# show evpn arp-cache vni all
VNI 1000 #ARP (IPv4 and IPv6, local and remote) 5
IP Type State MAC Remote VTEP Seq #'s
fe80::6f8:f8ff:fe6b:691 local active 04:f8:f8:6b:06:91 0/0
fe80::5037:63f4:3aba:bbe9 remote active 8c:ea:1b:30:da:47 1.1.1.1 0/0
fe80::6f8:f8ff:fe6a:f691 local inactive 04:f8:f8:6a:f6:91 0/0
192.168.1.253 local active 04:f8:f8:6b:06:91 0/0
192.168.1.1 remote active 8c:ea:1b:30:da:47 1.1.1.1 0/0
VNI 2000 #ARP (IPv4 and IPv6, local and remote) 5
IP Type State MAC Remote VTEP Seq #'s
192.168.2.1 local active 8c:ea:1b:30:da:4b 0/0
fe80::6f8:f8ff:fe6b:691 local active 04:f8:f8:6b:06:91 0/0
192.168.2.254 local active 04:f8:f8:6b:06:91 0/0
fe80::6f8:f8ff:fe6a:f691 local inactive 04:f8:f8:6a:f6:91 0/0
fe80::2a29:a798:37d3:76c2 local active 8c:ea:1b:30:da:4b 0/0
Comments
0 comments
Please sign in to leave a comment.