BGP Peer Groups for Address-Family IPv4 Labeled Unicast
Topology
Figure 10-106: BGP Peer-Groups with IPv4 Labeled-Unicast Members
R1
(config)# interface lo | Enter interface mode for Loopback |
(config-if)#ip address 1.1.1.1/32 secondary | Configure ip address for Loopback interface |
(config-if)#ip address 11.11.11.11/32 secondary | Configure ip address for Loopback interface |
(config-if)#exit | Exit interface mode |
(config)#router bgp 200 | Define the routing process. The number 200 specifies the AS number of R1. |
(config-router)#neighbor ABC peer-group | Create a peer group named ABC. |
(config-router)#neighbor ABC remote-as 200 | Assign options to the peer group named ABC. |
(config-router)#neighbor 2.2.2.2 peer-group ABC | Define neighbor 2.2.2.2 (R2) as a peer group member. |
(config-router)#neighbor 3.3.3.3 peer-group ABC | Define neighbor 3.3.3.3 (R3) as a peer group member. |
(config-router)#address-family ipv4 labeled-unicast | Enter address-family ipv4 labeled-unicast mode |
(config-router-af)#neighbor ABC activate | Activate the peer-group ABC for address-family ipv4 labeled-unicast |
(config-router-af)#neighbor ABC route-reflector-client | Configure the peer-group ABC to be route-reflector-client |
(config-router-af)# exit-address-family | Exit address-family ipv4 labeled-unicast mode |
(config-router)#address-family ipv4 unicast | Enter address-family ipv4 unicast mode |
(config-router-af)#network 1.1.1.1/32 | Advertise the network 1.1.1.1/32 |
(config-router-af)#network 11.11.11.11/32 | Advertise the network 11.11.11.11/32 |
(config-router-af)# exit-address-family | Exit address-family ipv4 unicast mode |
(config-router)#allocate-label all | Allocate labels for all IPv4 prefixes advertised |
(config-router)#exit | Exit router bgp mode |
R2
#configure terminal | Enter configure mode. |
(config)#router bgp 200 | Define the routing process. The number 200 specifies the AS number of R2. |
(config-router)#neighbor 2.2.2.1 remote-as 200 | Create a TCP connection with neighbor 2.2.2.1 of AS 200. |
config-router)#allocate-label all | Allocate labels for all IPv4 prefixes advertised |
(config-router)#address-family ipv4 labeled-unicast | Enter address-family ipv4 labeled-unicast mode |
(config-router-af)#neighbor 2.2.2.1 activate | Activate the neighbor R1 for address-family ipv4 labeled-unicast |
(config-router-af)# exit-address-family | Exit address-family ipv4 labeled-unicast mode |
(config-router)# exit | Exit router bgp mode |
R3
#configure terminal | Enter configure mode. |
(config)#router bgp 200 | Define the routing process. The number 200 specifies the AS number of R3. |
(config-router)#neighbor 3.3.3.1 remote-as 200 | Create a TCP connection with neighbor 3.3.3.1 of AS 200. |
config-router)#allocate-label all | Allocate labels for all IPv4 prefixes advertised |
(config-router)#address-family ipv4 labeled-unicast | Enter address-family ipv4 labeled-unicast mode |
(config-router-af)#neighbor 3.3.3.1 activate | Activate the neighbor R1 for address-family ipv4 labeled-unicast |
(config-router-af)# exit-address-family | Exit address-family ipv4 labeled-unicast mode |
(config-router)# exit | Exit router bgp mode |
Validation
R1
R1#show ip bgp labeled-unicast summary
BGP router identifier 10.12.65.126, local AS number 200
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
2.2.2.2 4 200 18 22 1 0 0 00:00:57 0
3.3.3.3 4 200 18 20 1 0 0 00:00:01 0
Total number of neighbors 2
Total number of Established sessions 2
R1#
R1#show bgp neighbors
BGP neighbor is 2.2.2.2, remote AS 200, local AS 200, internal link
Member of peer-group ABC for session parameters
BGP version 4, local router ID 10.12.65.126, remote router ID 10.12.65.123
BGP state = Established, up for 00:01:05
Last read 00:00:14, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Unicast: advertised and received
Address family IPv4 Labeled-Unicast: advertised and received
Received 16 messages, 2 notifications, 0 in queue
Sent 20 messages, 2 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 11, neighbor version 11
Index 0, Offset 0, Mask 0x1
ABC peer-group member
Community attribute sent to this neighbor (both)
0 accepted prefixes
2 announced prefixes
For address family: IPv4 Labeled-Unicast
BGP table version 1, neighbor version 1
Index 2, Offset 0, Mask 0x4
ABC peer-group member
Route-Reflector Client
Community attribute sent to this neighbor (both)
0 accepted prefixes
2 announced prefixes
Connections established 5; dropped 4
Local host: 2.2.2.1, Local port: 51667
Foreign host: 2.2.2.2, Foreign port: 179
Nexthop: 2.2.2.1
Nexthop global: ::
Nexthop local: ::
BGP connection: non shared network
Last Reset: 00:01:10, due to BGP Notification received
Notification Error Message: (Cease/Other Configuration Change.)
BGP neighbor is 3.3.3.3, remote AS 200, local AS 200, internal link
Member of peer-group ABC for session parameters
BGP version 4, local router ID 10.12.65.126, remote router ID 10.12.65.121
BGP state = Established, up for 00:00:09
Last read 00:00:10, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Unicast: advertised and received
Address family IPv4 Labeled-Unicast: advertised and received
Received 16 messages, 2 notifications, 0 in queue
Sent 20 messages, 2 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 11, neighbor version 11
Index 1, Offset 0, Mask 0x2
ABC peer-group member
Community attribute sent to this neighbor (both)
0 accepted prefixes
2 announced prefixes
For address family: IPv4 Labeled-Unicast
BGP table version 1, neighbor version 1
Index 3, Offset 0, Mask 0x8
ABC peer-group member
Route-Reflector Client
Community attribute sent to this neighbor (both)
0 accepted prefixes
2 announced prefixes
Connections established 5; dropped 4
Local host: 3.3.3.1, Local port: 41732
Foreign host: 3.3.3.3, Foreign port: 179
Nexthop: 3.3.3.1
Nexthop global: ::
Nexthop local: ::
BGP connection: non shared network
Last Reset: 00:00:19, due to BGP Notification received
Notification Error Message: (Cease/Other Configuration Change.)
R1#
R2
R2#show ip bgp
BGP table version is 3, local router ID is 10.12.65.123
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
l - labeled, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*>il 1.1.1.1/32 2.2.2.1 0 100 0 i
* i 2.2.2.1 0 100 0 i
*>il 11.11.11.11/32 2.2.2.1 0 100 0 i
* i 2.2.2.1 0 100 0 i
Total number of prefixes 2
R2#
R2#show ip bgp 1.1.1.1/32
BGP routing table entry for 1.1.1.1/32
Paths: (2 available, best #1, table Default-IP-Routing-Table)
Not advertised to any peer
Local
2.2.2.1 from 2.2.2.1 (10.12.65.126)
Origin IGP, metric 0, localpref 100 valid, internal, best, source safi: 4
Last update: Tue Aug 25 10:01:05 2020
Local
2.2.2.1 from 2.2.2.1 (10.12.65.126)
Origin IGP, metric 0, localpref 100 valid, internal, source safi: 1
Last update: Tue Aug 25 10:01:05 2020
R2#
R2#show ip bgp 11.11.11.11/32
BGP routing table entry for 11.11.11.11/32
Paths: (2 available, best #1, table Default-IP-Routing-Table)
Not advertised to any peer
Local
2.2.2.1 from 2.2.2.1 (10.12.65.126)
Origin IGP, metric 0, localpref 100 valid, internal, best, source safi: 4
Last update: Tue Aug 25 10:01:05 2020
Local
2.2.2.1 from 2.2.2.1 (10.12.65.126)
Origin IGP, metric 0, localpref 100 valid, internal, source safi: 1
Last update: Tue Aug 25 10:01:05 2020
R2#
R2#show ip bgp labeled-unicast
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, S - stale
Network Next Hop In Label Out Label
*>i 1.1.1.1/32 2.2.2.1 - 24320
*>i 11.11.11.11/32 2.2.2.1 - 24321
R2#
R3
R3#show ip bgp labeled-unicast
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, S - stale
Network Next Hop In Label Out Label
*>i 1.1.1.1/32 3.3.3.1 - 24320
*>i 11.11.11.11/32 3.3.3.1 - 24321
R3#
Peer group members inherit the properties of Outbound Policies configured for Peer-group under Address-family ipv4 Labeled-Unicast
R1
#configure terminal | Enter configure mode. |
(config)# ip access-list permit-1 | Configure access-list to permit 1.1.1.1/32 |
(config-ip-acl)# permit any 1.1.1.1/32 any | Configure a permit statement in the acl to permit 1.1.1.1/32 |
(config-ip-acl)#exit | Exit ip access-list mode |
(config)# route-map permit-only-1 | Configure route-map |
(config-route-map)# match ip address permit- 1 | Configure a match statement in the route-map to match the access-list permit-1 |
(config-route-map)#exit | Exit route-map mode |
(config)#router bgp 200 | Define the routing process. The number 200 specifies the AS number of R1. |
(config-router)#no allocate-label all | Unconfiguring allocate label all |
config-router)# allocate-label route-map permit-only-1 | Allocate labels to the route map |
(config-router)#address-family ipv4 labeled- unicast | Enter address-family ipv4 labeled-unicast mode |
(config-router-af)# neighbor ABC route-map permit-only-1 out | Configure the peer-group ABC with route-map in the outbound direction |
(config-router-af)#exit | Exit address-family mode |
(config-router)#exit | Exit router bgp mode |
(config# exit | Exit configure terminal mode |
#clear ip bgp peer-group ABC ipv4 labeled- unicast soft out | Do outbound soft reset for the peer-group ABC for the policy to take affect for the labelled-unicast peer-group members |
Validation
R1
R1#show bgp neighbors
BGP neighbor is 2.2.2.2, remote AS 200, local AS 200, internal link
Member of peer-group ABC for session parameters
BGP version 4, local router ID 10.12.65.126, remote router ID 10.12.65.123
BGP state = Established, up for 00:14:24
Last read 00:00:22, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Unicast: advertised and received
Address family IPv4 Labeled-Unicast: advertised and received
Received 46 messages, 2 notifications, 0 in queue
Sent 53 messages, 2 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 11, neighbor version 11
Index 0, Offset 0, Mask 0x1
ABC peer-group member
Community attribute sent to this neighbor (both)
0 accepted prefixes
2 announced prefixes
For address family: IPv4 Labeled-Unicast
BGP table version 1, neighbor version 1
Index 2, Offset 0, Mask 0x4
ABC peer-group member
Route-Reflector Client
Community attribute sent to this neighbor (both)
Outbound path policy configured
Route map for outgoing advertisements is *permit-only-1
0 accepted prefixes
1 announced prefixes
Connections established 5; dropped 4
Local host: 2.2.2.1, Local port: 51667
Foreign host: 2.2.2.2, Foreign port: 179
Nexthop: 2.2.2.1
Nexthop global: ::
Nexthop local: ::
BGP connection: non shared network
Last Reset: 00:14:29, due to BGP Notification received
Notification Error Message: (Cease/Other Configuration Change.)
BGP neighbor is 3.3.3.3, remote AS 200, local AS 200, internal link
Member of peer-group ABC for session parameters
BGP version 4, local router ID 10.12.65.126, remote router ID 10.12.65.121
BGP state = Established, up for 00:13:28
Last read 00:00:21, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Unicast: advertised and received
Address family IPv4 Labeled-Unicast: advertised and received
Received 47 messages, 2 notifications, 0 in queue
Sent 53 messages, 2 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 11, neighbor version 11
Index 1, Offset 0, Mask 0x2
ABC peer-group member
Community attribute sent to this neighbor (both)
0 accepted prefixes
2 announced prefixes
For address family: IPv4 Labeled-Unicast
BGP table version 1, neighbor version 1
Index 3, Offset 0, Mask 0x8
ABC peer-group member
Route-Reflector Client
Community attribute sent to this neighbor (both)
Outbound path policy configured
Route map for outgoing advertisements is *permit-only-1
0 accepted prefixes
1 announced prefixes
Connections established 5; dropped 4
Local host: 3.3.3.1, Local port: 41732
Foreign host: 3.3.3.3, Foreign port: 179
Nexthop: 3.3.3.1
Nexthop global: ::
Nexthop local: ::
BGP connection: non shared network
Last Reset: 00:13:38, due to BGP Notification received
Notification Error Message: (Cease/Other Configuration Change.)
R1#
R2
R2#show ip bgp labeled-unicast
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, S - stale
Network Next Hop In Label Out Label
*>i 1.1.1.1/32 2.2.2.1 - 24320
R2#
R3
R3#show ip bgp labeled-unicast
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, S - stale
Network Next Hop In Label Out Label
*>i 1.1.1.1/32 3.3.3.1 - 24320
R3#
Peer-group-members inherit the properties of Inbound Policies configured for Peer-group under Address-family ipv4 Labeled-Unicast
Follow the configuration of R1,R2,R3 in the previous section with the following configuration
R2
#configure terminal | Enter configure mode. |
(config)# interface lo | Enter interface mode for Loopback interface |
(config-if)#ip address 100.1.1.1/24 secondary | Configure IP address for Loopback interaface |
(config-if)#interface eth3 | Enter interface mode for interface eth3 |
(config-if)#ip address 22.1.1.1/24 | Configure IP address for interface eth3 |
(config-if)#exit | Exit interface mode |
(config)#router bgp 200 | Enter router bgp mode |
(config-router)#address-family ipv4 unicast | Enter address-family ipv4 unicast mode |
(config-router-af)#network 22.1.1.0/24 | Advertise the network of eth3 in BGP |
(config-router-af)#network 100.1.1.0/24 | Advertise the network of Loopback in BGP |
(config-router-af)#exit-address-family | Exit address-family mode |
(config-router)#allocate-label all | Allocate labels for all IPv4 prefixes advertised |
(config-router)#exit | Exit router bgp mode |
R3
#configure terminal | Enter configure mode. |
(config)# interface lo | Enter interface mode for Loopback interface |
(config-if)#ip address 100.1.1.2/24 secondary | Configure IP address for Loopback interaface |
(config-if)#interface eth3 | Enter interface mode for interface eth3 |
(config-if)#ip address 22.1.1.2/24 | Configure IP address for interface eth3 |
(config-if)#exit | Exit interface mode |
(config)#router bgp 200 | Enter router bgp mode |
(config-router)#address-family ipv4 unicast | Enter address-family ipv4 unicast mode |
(config-router-af)#network 22.1.1.0/24 | Advertise the network of eth3 in BGP |
(config-router-af)#network 100.1.1.0/24 | Advertise the network of Loopback in BGP |
(config-router-af)#exit-address-family | Exit address-family mode |
(config-router)#allocate-label all | Allocate labels for all IPv4 prefixes advertised |
(config-router)#exit | Exit router bgp mode |
R1
#configure terminal | Enter configure mode. |
(config)#ip access-list permit-22 | Configure access-list to permit 22.1.1.0/24 |
(config-ip-acl)# permit any 22.1.1.0/24 any | Configure a permit statement to permit 22.1.1.0/24 |
(config-ip-acl)#exit | Exit ip access-list mode |
(config)#route-map permit-only-22 | Configure route-map |
(config-route-map)#match ip address permit- 22 | Configure match statement in route-map to match the access- list permit-22 |
(config-route-map)#exit | Exit route-map mode |
(config)#router bgp 200 | Enter BGP router mode |
(config-router)#address-family ipv4 labeled- unicast | Enter the address-family ipv4 labeled-unicast mode |
(config-router-af)#neighbor ABC route-map permit-only-22 in | Configure the peer-group ABC with route-map in the inbound direction under address-family ipv4 labeled-unicast |
(config-router-af)# neighbor ABC activate | Activate PEER-GROUP in the address family |
(config-router-af)#exit-address-family | Exit address-family ipv4 labeled-unicast mode |
(config-router)#exit | Exit router bgp mode |
(config)# exit | Exit configure terminal mode |
#clear ip bgp peer-group ABC ipv4 labeled- unicast soft in | Do inbound soft reset for the peer-group ABC for the policy to take affect for the labelled-unicast peer-group members |
Validation
R1
R1#show ip bgp labeled-unicast
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, S - stale
Network Next Hop In Label Out Label
*> 1.1.1.1/32 0.0.0.0 24320 -
*> 11.11.11.11/32 0.0.0.0 24321 -
*>i 22.1.1.0/24 3.3.3.3 24322 24320
* i 2.2.2.2 - 24320
*>i 100.1.1.0/24 3.3.3.3 24323 -
R1#
R1#show bgp neighbors
BGP neighbor is 2.2.2.2, remote AS 200, local AS 200, internal link
Member of peer-group ABC for session parameters
BGP version 4, local router ID 10.12.65.126, remote router ID 10.12.65.123
BGP state = Established, up for 00:45:38
Last read 00:00:03, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Unicast: advertised and received
Address family IPv4 Labeled-Unicast: advertised and received
Received 123 messages, 2 notifications, 0 in queue
Sent 126 messages, 2 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 14, neighbor version 14
Index 0, Offset 0, Mask 0x1
ABC peer-group member
Community attribute sent to this neighbor (both)
2 accepted prefixes
2 announced prefixes
For address family: IPv4 Labeled-Unicast
BGP table version 3, neighbor version 3
Index 2, Offset 0, Mask 0x4
ABC peer-group member
Route-Reflector Client
Community attribute sent to this neighbor (both)
Inbound path policy configured
Outbound path policy configured
Route map for incoming advertisements is *permit-only-22
Route map for outgoing advertisements is *permit-only-1
1 accepted prefixes
1 announced prefixes
Connections established 5; dropped 4
Local host: 2.2.2.1, Local port: 51667
Foreign host: 2.2.2.2, Foreign port: 179
Nexthop: 2.2.2.1
Nexthop global: ::
Nexthop local: ::
BGP connection: non shared network
Last Reset: 00:45:43, due to BGP Notification received
Notification Error Message: (Cease/Other Configuration Change.)
BGP neighbor is 3.3.3.3, remote AS 200, local AS 200, internal link
Member of peer-group ABC for session parameters
BGP version 4, local router ID 10.12.65.126, remote router ID 10.12.65.121
BGP state = Established, up for 00:44:42
Last read 00:00:22, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Unicast: advertised and received
Address family IPv4 Labeled-Unicast: advertised and received
Received 124 messages, 2 notifications, 0 in queue
Sent 127 messages, 2 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 14, neighbor version 14
Index 1, Offset 0, Mask 0x2
ABC peer-group member
Community attribute sent to this neighbor (both)
2 accepted prefixes
2 announced prefixes
For address family: IPv4 Labeled-Unicast
BGP table version 3, neighbor version 3
Index 3, Offset 0, Mask 0x8
ABC peer-group member
Route-Reflector Client
Community attribute sent to this neighbor (both)
Inbound path policy configured
Outbound path policy configured
Route map for incoming advertisements is *permit-only-22
Route map for outgoing advertisements is *permit-only-1
1 accepted prefixes
1 announced prefixes
Connections established 5; dropped 4
Local host: 3.3.3.1, Local port: 41732
Foreign host: 3.3.3.3, Foreign port: 179
Nexthop: 3.3.3.1
Nexthop global: ::
Nexthop local: ::
BGP connection: non shared network
Last Reset: 00:44:52, due to BGP Notification received
Notification Error Message: (Cease/Other Configuration Change.)
R1#