OcNOS DC : Multi-Protocol Label Switching Guide : Multi-Protocol Label Switching Configuration Guide : BGP Peer Groups for Address-Family L2VPN EVPN
BGP Peer Groups for Address-Family L2VPN EVPN
BGP peer groups are used to simplify configuration and to improve performance. This is achieved by assigning the same outbound policy to each of the neighbors. Because UPDATEs are generated only once per peer group rather than multiple times for each neighboring router, peer groups save processing time when building neighbor updates. It reduces the amount of system resources (CPU and memory) necessary in an update generation.
A BGP peer group reduces the load on system resources by allowing the routing table to be checked only once, and updates to be replicated to all peer group members instead of being done individually for each peer in the peer group.
 
Topology
BGP Peer-Groups with L2VPN EVPN address-family
Configuration
R1
 
#configure terminal
Enter the configure mode.
(config)# interface lo
Enter the interface mode for Loopback
(config-if)#ip address 1.1.1.1/32 secondary
Configure IP address for loopback interface
(config-if)#exit
Exit the interface mode
(config)# interface xe1
Enter the interface mode for xe1
(config-if)#ip address 10.1.1.2/24
Configure the IP address
(config-if)#exit
Exit the interface mode
(config)# interface xe2
Enter the interface mode for xe2
(config-if)#ip address 20.1.1.2
Configure the IP address
(config-if)#exit
Exit the interface mode
(config)#router ospf 100
Configure the OSPF process (100)
(config-router)# ospf router-id 1.1.1.1
Configure the OSPF router-id
(config-router)#network 1.1.1.1/32 area 0
Advertise the network in Area 0
(config-router)#network 10.1.1.0/24 area 0
Advertise the network in Area 0
(config-router)#network 20.1.1.0/24 area 0
Advertise the network in Area 0
(config-router)#exit
Exit the Router mode and return to Configure mode
(config)#router bgp 100
Define the routing process. The number 100 specifies the AS number of R1
(config-router)# bgp router-id 1.1.1.1
Configure BGP router-id
(config-router)#neighbor PG peer-group
Create a peer group named PG
(config-router)#neighbor PG remote-as 100
Assign options to the peer group named PG
(config-router)#neighbor PG update-source lo
Assign options to the peer group named PG
(config-router)#neighbor 2.2.2.2 peer-group PG
Define neighbor 2.2.2.2 (R2) as a peer group
(config-router)#neighbor 3.3.3.3 peer-group PG
Define neighbor 3.3.3.3 (R3) as a peer group member.
(config-router)#address-family l2vpn evpn
Enter the address-family l2vpn evpn mode
(config-router-af)#neighbor PG activate
Activate the peer-group ABC for address-family l2vpn evpn
(config-router-af)# exit-address-family
Exit the address-family ipv4 unicast mode
(config-router)#exit
Exit the router bgp mode
(config)#commit
Commit the candidate configuration to the running configuration.
R2
 
#configure terminal
Enter the configure mode.
(config)# interface lo
Enter the interface mode for Loopback
(config-if)#ip address 2.2.2.2/32 secondary
Configure IP address for Loopback interface
(config-if)#exit
Exit the interface mode
(config)# interface xe1
Enter the interface mode for xe1
(config-if)#ip address 10.1.1.1/24
Configure IP address
(config-if)#exit
Exit the interface mode
(config)#router ospf 100
Configure the OSPF process (100)
(config-router)# ospf router-id 2.2.2.2
Configure the OSPF router-id
(config-router)#network 2.2.2.2/32 area 0
Advertise the network in Area 0
(config-router)#network 10.1.1.0/24 area 0
Advertise the network in Area 0
(config-router)#exit
Exit Router mode and return to Configure mode
(config)#router bgp 100
Define the routing process. The number 100 specifies the AS number of R1
(config-router)# bgp router-id 2.2.2.2
Configure the BGP router-id
(config-router)#neighbor PG peer-group
Create a peer group named PG
(config-router)#neighbor PG remote-as 100
Assign options to the peer group named PG
(config-router)#neighbor PG update-source lo
Assign options to the peer group named PG
(config-router)#neighbor 1.1.1.1 peer-group PG
Define neighbor 1.1.1.1 (R1) as a peer group member.
(config-router)#address-family l2vpn evpn
Enter the address-family L2VPN EVPN mode
(config-router-af)#neighbor PG activate
Activate the peer-group ABC for address-family l2vpn evpn
(config-router-af)# exit-address-family
Exit the address-family ipv4 unicast mode
(config-router)#exit
Exit the router bgp mode
(config)#commit
Commit the candidate configuration to the running configuration.
R3
 
#configure terminal
Enter the configure mode.
(config)# interface lo
Enter the interface mode for Loopback
(config-if)#ip address 3.3.3.3/32 secondary
Configure IP address for the loopback interface
(config-if)#exit
Exit the interface mode
(config)# interface ce15
Enter the interface mode for ce15
(config-if)#ip address 20.1.1.1/24
Configure IP address
(config-if)#exit
Exit the interface mode
(config)# interface xe1
Enter the interface mode for xe1
(config-if)#ip address 10.1.1.1/24
Configure the IP address
(config-if)#exit
Exit the interface mode
(config)#router ospf 100
Configure the OSPF process (100)
(config-router)# ospf router-id 3.3.3.3
Configure the OSPF router-id
(config-router)#network 20.1.1.0/24 area 0
Advertise the network in Area 0
(config-router)#exit
Exit the router mode and return to Configure mode
(config)#router bgp 100
Define the routing process. The number 100 specifies the AS number of R1.
(config-router)# bgp router-id 3.3.3.3
Configure the BGP router-id
(config-router)#neighbor PG peer-group
Create a peer group named PG
(config-router)#neighbor PG remote-as 100
Assign options to the peer group named PG
(config-router)#neighbor PG update-source lo
Assign options to the peer group named PG
(config-router)#neighbor 1.1.1.1 peer-group PG
Define neighbor 1.1.1.1 (R1) as a peer group member.
(config-router)#address-family l2vpn evpn
Enter the address-family l2vpn evpn mode
(config-router-af)#neighbor PG activate
Activate the peer-group ABC for address-family l2vpn evpn
(config-router-af)# exit-address-family
Exit the address-family ipv4 unicast mode
(config-router)#exit
Exit the router bgp mode
(config)#commit
Commit the candidate configuration to the running configuration.
Validation
R1
 
R1#show run bgp
!
router bgp 100
bgp router-id 1.1.1.1
neighbor PG peer-group
neighbor PG remote-as 100
neighbor PG update-source lo
neighbor 2.2.2.2 peer-group PG
neighbor 3.3.3.3 peer-group PG
!
address-family l2vpn evpn
neighbor PG activate
exit-address-family
R1#show bgp neighbors
BGP neighbor is 2.2.2.2, remote AS 100, local AS 100, internal link
Member of peer-group PG for session parameters
BGP version 4, local router ID 1.1.1.1, remote router ID 2.2.2.2
BGP state = Established, up for 01:20:53
Last read 00:00:24, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family L2VPN EVPN: advertised and received
Received 192 messages, 0 notifications, 0 in queue
Sent 191 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
Update source is lo
For address family: L2VPN EVPN
BGP table version 1, neighbor version 1
Index 2, Offset 0, Mask 0x4
PG peer-group member
Community attribute sent to this neighbor (both)
Large Community attribute sent to this neighbor
0 accepted prefixes
Accepted AD:0 MACIP:0 MCAST:0 ESI:0 PREFIX:0
0 announced prefixes
 
Connections established 1; dropped 0
Local host: 1.1.1.1, Local port: 42981
Foreign host: 2.2.2.2, Foreign port: 179
Nexthop: 1.1.1.1
Nexthop global: ::
Nexthop local: ::
BGP connection: non shared network
 
BGP neighbor is 3.3.3.3, remote AS 100, local AS 100, internal link
Member of peer-group PG for session parameters
BGP version 4, local router ID 1.1.1.1, remote router ID 3.3.3.3
BGP state = Established, up for 01:36:13
Last read 00:00:08, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family L2VPN EVPN: advertised and received
Received 227 messages, 0 notifications, 0 in queue
Sent 229 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
Update source is lo
For address family: L2VPN EVPN
BGP table version 1, neighbor version 1
Index 3, Offset 0, Mask 0x8
PG peer-group member
Community attribute sent to this neighbor (both)
Large Community attribute sent to this neighbor
0 accepted prefixes
Accepted AD:0 MACIP:0 MCAST:0 ESI:0 PREFIX:0
0 announced prefixes
 
Connections established 1; dropped 0
Local host: 1.1.1.1, Local port: 179
Foreign host: 3.3.3.3, Foreign port: 32857
Nexthop: 1.1.1.1
Nexthop global: ::
Nexthop local: ::
BGP connection: non shared network
R1#show ip ospf neighbor
 
Total number of full neighbors: 2
OSPF process 100 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
2.2.2.2 1 Full/Backup 00:00:38 10.1.1.1 xe15 0
3.3.3.3 1 Full/Backup 00:00:34 20.1.1.1 ce0 0
R1#show bgp l2vpn evpn summary
BGP router identifier 1.1.1.1, local AS number 100
BGP table version is 1
1 BGP AS-PATH entries
0 BGP community entries
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd AD MACIP MCAST ESI PREFIX-ROUTE
2.2.2.2 4 100 193 191 1 0 0 01:21:07 0 0 0 0 0 0
3.3.3.3 4 100 227 229 1 0 0 01:36:27 0 0 0 0 0 0
 
Total number of neighbors 2
 
Total number of Established sessions 2
R2
 
R2#show run bgp
!
router bgp 100
bgp router-id 2.2.2.2
neighbor PG peer-group
neighbor PG remote-as 100
neighbor PG update-source lo
neighbor 1.1.1.1 peer-group PG
!
address-family l2vpn evpn
neighbor PG activate
exit-address-family
!
R2#show bgp neighbors
BGP neighbor is 1.1.1.1, remote AS 100, local AS 100, internal link
Member of peer-group PG for session parameters
BGP version 4, local router ID 2.2.2.2, remote router ID 1.1.1.1
BGP state = Established, up for 01:20:42
Last read 00:00:20, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family L2VPN EVPN: advertised and received
Received 190 messages, 0 notifications, 0 in queue
Sent 193 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
Update source is lo
For address family: L2VPN EVPN
BGP table version 1, neighbor version 1
Index 2, Offset 0, Mask 0x4
PG peer-group member
Community attribute sent to this neighbor (both)
Large Community attribute sent to this neighbor
0 accepted prefixes
Accepted AD:0 MACIP:0 MCAST:0 ESI:0 PREFIX:0
0 announced prefixes
 
Connections established 1; dropped 0
Local host: 2.2.2.2, Local port: 179
Foreign host: 1.1.1.1, Foreign port: 42981
Nexthop: 2.2.2.2
Nexthop global: ::
Nexthop local: ::
BGP connection: non shared network
 
R2#show ip ospf neighbor
 
Total number of full neighbors: 1
OSPF process 100 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
1.1.1.1 1 Full/DR 00:00:30 10.1.1.2 xe10 0
R2#sh bgp l2vpn evpn summary
BGP router identifier 2.2.2.2, local AS number 100
BGP table version is 1
0 BGP AS-PATH entries
0 BGP community entries
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd AD MACIP MCAST ESI PREFIX-ROUTE
1.1.1.1 4 100 192 195 1 0 0 01:21:28 0 0 0 0 0 0
 
Total number of neighbors 1
 
Total number of Established sessions 1
R3
 
R3#show run bgp
!
router bgp 100
bgp router-id 3.3.3.3
neighbor PG peer-group
neighbor PG remote-as 100
neighbor PG update-source lo
neighbor 1.1.1.1 peer-group PG
!
address-family l2vpn evpn
neighbor PG activate
exit-address-family
!
R3#show bgp neighbors
BGP neighbor is 1.1.1.1, remote AS 100, local AS 100, internal link
Member of peer-group PG for session parameters
BGP version 4, local router ID 3.3.3.3, remote router ID 1.1.1.1
BGP state = Established, up for 01:36:07
Last read 00:00:06, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family L2VPN EVPN: advertised and received
Received 228 messages, 0 notifications, 0 in queue
Sent 227 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
Update source is lo
For address family: L2VPN EVPN
BGP table version 1, neighbor version 1
Index 2, Offset 0, Mask 0x4
PG peer-group member
Community attribute sent to this neighbor (both)
Large Community attribute sent to this neighbor
0 accepted prefixes
Accepted AD:0 MACIP:0 MCAST:0 ESI:0 PREFIX:0
0 announced prefixes
 
Connections established 1; dropped 0
Local host: 3.3.3.3, Local port: 32857
Foreign host: 1.1.1.1, Foreign port: 179
Nexthop: 3.3.3.3
Nexthop global: ::
Nexthop local: ::
BGP connection: non shared network
R3#show ip os neighbor
 
Total number of full neighbors: 1
OSPF process 100 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
1.1.1.1 1 Full/DR 00:00:37 20.1.1.2 ce15 0
R3#sh bgp l2vpn evpn summary
BGP router identifier 3.3.3.3, local AS number 100
BGP table version is 1
0 BGP AS-PATH entries
0 BGP community entries
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd AD MACIP MCAST ESI PREFIX-ROUTE
1.1.1.1 4 100 232 231 1 0 0 01:37:55 0 0 0 0 0 0
 
Total number of neighbors 1
 
Total number of Established sessions 1