[Enterprise SONiC] Symmetric 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.
Symmetric EVPN IRB
Topology:
Note :
- BGP, EVPN and VxLAN related articles are available in here, Routing (BGP) , EVPN & VxLAN.
Procedure:
Step 1. Setup VLAN 10 & VLAN 30 on SONiC01 and VLAN 20 & VLAN 30 on SONiC02. Add Ethernet52 of both switches to those created VLAN. Please refer to VLAN & Inter-VLAN Routing article.
Step 2. Configure IP address to both Ethernet48 of both switches.
Step 3: Configure IP address to Loopback0 of both switches.
Step 4. Configure VRF Setting
SONiC01
admin@SONIC01:~$ sudo config vrf add Vrf01 → reate VRF
admin@SONIC01:~$ sudo config interface vrf bind Vlan30 Vrf01 → bind Vlan30 to Vrf01
admin@SONIC01:~$ sudo config interface vrf bind Vlan10 Vrf01 → bind Vlan10 to Vrf01
admin@SONIC01:~$ sudo config interface ip add Vlan10 192.168.1.254/24 → Configure IP address on Vlan10
SONiC02
admin@SONIC02:~$ sudo config vrf add Vrf01 → create VRF
admin@SONIC02:~$ sudo config interface vrf bind Vlan30 Vrf01 → bind Vlan30 to Vrf01
admin@SONIC02:~$ sudo config interface vrf bind Vlan20 Vrf01 → bind Vlan20 to Vrf01
admin@SONIC02:~$ sudo config interface ip add Vlan20 192.168.2.254/24 → Configure IP address on Vlan20
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 30 3000 → mapping VNI 3000 to VLAN 30
admin@SONIC01:~$ sudo config save -y
SONiC02
admin@SONIC02:~$ sudo config vxlan add vtep 2.2.2.2 → configuring VTEP_name (vtep) and its IP address
admin@SONIC02:~$ sudo config vxlan evpn_nvo add nvo vtep → create nvo_name (nvo) and bind it to VTEP_name (vtep)
admin@SONIC02:~$ sudo config vxlan map add vtep 20 2000 → mapping VNI 2000 to VLAN 20
admin@SONIC02:~$ sudo config vxlan map add vtep 30 3000 → mapping VNI 3000 to VLAN 30
admin@SONIC02:~$ sudo config save -y
Step 6. Set the layer3 VNI on both switches.
SONiC01
admin@SONIC01:~$ sudo config vrf add_vrf_vni_map Vrf01 3000 → map Vrf01 VNI 3000
Step 7. Save configuration on both switches.
Both Switches
admin@SONIC01:~$ sudo config save -y
Step 8. Establish BGP environment for EVPN.
SONiC01(VTYSH)
admin@SONIC01:~$ vtysh
Hello, this is FRRouting (version 7.2.1-sonic).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# neighbor 10.0.0.5 remote-as 65100
sonic(config-router)# address-family ipv4 unicast
sonic(config-router-af)# network 1.1.1.1/32
sonic(config-router-af)# exit
sonic(config-router)# address-family l2vpn evpn
sonic(config-router-af)# neighbor 10.0.0.5 activate
sonic(config-router-af)# advertise-all-vni
sonic(config-router-af)# end
sonic# configure terminal
sonic(config)# vrf Vrf01
sonic(config-vrf)# vni 3000
sonic(config-vrf)# end
sonic# configure terminal
sonic(config)# router bgp 65100 vrf Vrf01
sonic(config-router)# address-family ipv4 unicast
sonic(config-router-af)# redistribute connected
sonic(config-router-af)# exit
sonic(config-router)# address-family l2vpn evpn
sonic(config-router-af)# advertise ipv4 unicast
sonic(config-router-af)# end
sonic# write
SONiC02(VTYSH)
admin@SONIC02:~$ vtysh
Hello, this is FRRouting (version 7.2.1-sonic).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
sonic# configure terminal
sonic(config)# router bgp 65100
sonic(config-router)# neighbor 10.0.0.4 remote-as 65100
sonic(config-router)# address-family ipv4 unicast
sonic(config-router-af)# network 2.2.2.2/32
sonic(config-router-af)# exit
sonic(config-router)# address-family l2vpn evpn
sonic(config-router-af)# neighbor 10.0.0.4 activate
sonic(config-router-af)# advertise-all-vni
sonic(config-router-af)# end
sonic# configure terminal
sonic(config)# vrf Vrf01
sonic(config-vrf)# vni 3000
sonic(config-vrf)# end
sonic# configure terminal
sonic(config)# router bgp 65100 vrf Vrf01
sonic(config-router)# address-family ipv4 unicast
sonic(config-router-af)# redistribute connected
sonic(config-router-af)# exit
sonic(config-router)# address-family l2vpn evpn
sonic(config-router-af)# advertise ipv4 unicast
sonic(config-router-af)# end
sonic# write
Step 9. Check EVPN-VNI status.
SONiC01(VTYSH)
sonic# show evpn vni detail
VNI: 1000
Type: L2
Tenant VRF: Vrf01
VxLAN interface: vtep-10
VxLAN ifIndex: 71
Local VTEP IP: 1.1.1.1
Mcast group: 0.0.0.0
No remote VTEPs known for this VNI
Number of MACs (local and remote) known for this VNI: 2
Number of ARPs (IPv4 and IPv6, local and remote) known for this VNI: 3
Advertise-gw-macip: No
VNI: 3000
Type: L3
Tenant VRF: Vrf01
Local Vtep Ip: 1.1.1.1
Vxlan-Intf: vtep-30
SVI-If: Vlan30
State: Up
VNI Filter: none
Router MAC: 04:f8:f8:6a:f6:91
L2 VNIs: 1000
SONiC02(VTYSH)
sonic# show evpn vni detail
VNI: 2000
Type: L2
Tenant VRF: Vrf01
VxLAN interface: vtep-20
VxLAN ifIndex: 71
Local VTEP IP: 2.2.2.2
Mcast group: 0.0.0.0
No remote VTEPs known for this VNI
Number of MACs (local and remote) known for this VNI: 2
Number of ARPs (IPv4 and IPv6, local and remote) known for this VNI: 3
Advertise-gw-macip: No
VNI: 3000
Type: L3
Tenant VRF: Vrf01
Local Vtep Ip: 2.2.2.2
Vxlan-Intf: vtep-30
SVI-If: Vlan30
State: Up
VNI Filter: none
Router MAC: 04:f8:f8:6b:06:91
L2 VNIs: 2000
Step 10. Check BGP EVPN status.
SONiC01(VTYSH)
sonic# show bgp summary
IPv4 Unicast Summary:
BGP router identifier 188.188.98.39, local AS number 65100 vrf-id 0
BGP table version 6
RIB entries 7, using 1288 bytes of memory
Peers 1, using 20 KiB of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
Ethernet48 4 65100 12 15 0 0 0 0:01:29 3
Total number of neighbors 1
L2VPN EVPN Summary:
BGP router identifier 188.188.98.39, local AS number 65100 vrf-id 0
BGP table version 0
RIB entries 7, using 1288 bytes of memory
Peers 1, using 20 KiB of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
Ethernet48 4 65100 12 15 0 0 0 00:01:29 4
Total number of neighbors 1
SONiC02(VTYSH)
sonic# show bgp summary
IPv4 Unicast Summary:
BGP router identifier 188.188.98.40, local AS number 65100 vrf-id 0
BGP table version 4
RIB entries 7, using 1288 bytes of memory
Peers 1, using 20 KiB of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
Ethernet48 4 65100 12 12 0 0 0 00:01:29 3
Total number of neighbors 1
L2VPN EVPN Summary:
BGP router identifier 188.188.98.40, local AS number 65100 vrf-id 0
BGP table version 0
RIB entries 7, using 1288 bytes of memory
Peers 1, using 20 KiB of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
Ethernet48 4 65100 12 12 0 0 0 00:01:29 4
Total number of neighbors 1
Step 11. Check routing and EVPN learning.
SONiC01(VTYSH)
sonic# show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
F - PBR, f - OpenFabric,
> - selected route, * - FIB route, q - queued route, r - rejected route
K>* 0.0.0.0/0 [0/202] via 188.188.1.1, eth0, 00:02:49
C>* 1.1.1.1/32 is directly connected, Loopback20, 00:02:34
B>* 2.2.2.2/32 [200/0] via 10.0.0.5, Ethernet48, 00:02:28
C>* 10.0.0.4/31 is directly connected, Ethernet48, 00:02:30
C>* 188.188.0.0/16 is directly connected, eth0, 00:02:49
sonic# show bgp l2vpn evpn
BGP table version is 4, local router ID is 188.188.98.39
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 RT:65100:3000 Rmac:04:f8:f8:6a:f6:91
*> [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 RT:65100:3000 Rmac:04:f8:f8:6a:f6:91
*> [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
*>i[2]:[0]:[48]:[8c:ea:1b:30:da:4b]
2.2.2.2 100 0 i
RT:65100:2000 RT:65100:3000 ET:8 Rmac:04:f8:f8:6b:06:91
*>i[2]:[0]:[48]:[8c:ea:1b:30:da:4b]:[32]:[192.168.2.2]
2.2.2.2 100 0 i
RT:65100:2000 RT:65100:3000 ET:8 Rmac:04:f8:f8:6b:06:91
*>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
Route Distinguisher: ip 192.168.1.254:2
*> [5]:[0]:[24]:[192.168.1.0]
1.1.1.1 0 32768 ?
ET:8 RT:65100:3000 Rmac:04:f8:f8:6a:f6:91
Route Distinguisher: ip 192.168.2.254:2
*>i[5]:[0]:[24]:[192.168.2.0]
2.2.2.2 0 100 0 ?
RT:65100:3000 ET:8 Rmac:04:f8:f8:6b:06:91
Displayed 10 out of 10 total prefixes
SONiC02(VTYSH)
sonic# show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
F - PBR, f - OpenFabric,
> - selected route, * - FIB route, q - queued route, r - rejected route
K>* 0.0.0.0/0 [0/202] via 188.188.1.1, eth0, 00:02:49
B>* 1.1.1.1/32 [200/0] via 10.0.0.4, Ethernet48, 00:02:28
C>* 2.2.2.2/32 is directly connected, Loopback20, 00:02:34
C>* 10.0.0.4/31 is directly connected, Ethernet48, 00:02:29
C>* 188.188.0.0/16 is directly connected, eth0, 00:02:49
sonic# show bgp l2vpn evpn
BGP table version is 4, local router ID is 188.188.98.40
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 RT:65100:3000 ET:8 Rmac:04:f8:f8:6a:f6:91
*>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 RT:65100:3000 ET:8 Rmac:04:f8:f8:6a:f6:91
*>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
*> [2]:[0]:[48]:[8c:ea:1b:30:da:4b]
2.2.2.2 32768 i
ET:8 RT:65100:2000 RT:65100:3000 Rmac:04:f8:f8:6b:06:91
*> [2]:[0]:[48]:[8c:ea:1b:30:da:4b]:[32]:[192.168.2.2]
2.2.2.2 32768 i
ET:8 RT:65100:2000 RT:65100:3000 Rmac:04:f8:f8:6b:06:91
*> [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
Route Distinguisher: ip 192.168.1.254:2
*>i[5]:[0]:[24]:[192.168.1.0]
1.1.1.1 0 100 0 ?
RT:65100:3000 ET:8 Rmac:04:f8:f8:6a:f6:91
Route Distinguisher: ip 192.168.2.254:2
*> [5]:[0]:[24]:[192.168.2.0]
2.2.2.2 0 32768 ?
ET:8 RT:65100:3000 Rmac:04:f8:f8:6b:06:91
Displayed 10 out of 10 total prefixes
Comments
0 comments
Please sign in to leave a comment.