OcNOS-SP : Layer 3 Guide : Layer 3 Unicast Configuration Guide : BGP4+
BGP4+
This chapter contains basic BGP4+ configuration examples.
For details about the commands used in these examples, see the Border Gateway Protocol Command Reference.
Enable iBGP Peering Using a Global Address
This example shows the minimum configuration required to enable BGP on an interface. R1 and R2 are two routers belonging to the same Autonomous System (AS), AS200, connecting to network 3ffe:10::/48. First, specify the IPv6 global address, then define the routing process and AS number to which the routers belong. Configure a fixed Router ID, then, define BGP neighbors to start exchanging routing updates.
Topology
iBGP Peering
Configuration
R1
 
#configure terminal
Enter Configure mode.
(config)#interface eth1
Specify the interface (eth1) to configure.
(config-if)#ipv6 address 3ffe:10::10/48
Specify the IPv6 global address.
(config-if)#exit
Enter Configure mode.
(config)#router bgp 200
Define the routing process. The number 200 specifies the AS number of R2.
(config-router)#bgp router-id 10.10.10.11
Configure a fixed Router ID (10.10.10.11) for the BGP4+ routing process.
(config-router)#neighbor 3ffe:10::10 remote-as 200
Define the BGP neighbor (R1), and establish a TCP session by specifying the global IPv6 address (3ffe:10::10)and the AS number(200)of neighbor R1.
(config-router)#address-family ipv6
Enter Address Family mode for configuring routing sessions that use IPv6 address prefixes.
(config-router-af)#neighbor 3ffe:10::10 activate
Activate the neighbor R1(3ffe:10::10), and enable exchange of IPv6 address prefix types with this neighbor.
(config-router-af)#exit-address-family
Exit address family
(config-router)#commit
Commit the candidate configuration to the running configuration
R2
 
#configure terminal
Enter Configure mode.
(config)#interface eth1
Specify the interface (eth1) to configure.
(config-if)#ipv6 address 3ffe:10::11/48
Specify the IPv6 global address.
(config-if)#exit
Enter Configure mode.
(config)#router bgp 200
Define the routing process. The number 200 specifies the AS number of R2.
(config-router)#bgp router-id 10.10.10.11
Configure a fixed Router ID (10.10.10.11) for the BGP4+ routing process.
(config-router)#neighbor 3ffe:10::10 remote-as 200
Define the BGP neighbor (R1), and establish a TCP session by specifying the global IPv6 address (3ffe:10::10)and the AS number(200)of neighbor R1.
(config-router)#address-family ipv6
Enter Address Family mode for configuring routing sessions that use IPv6 address prefixes.
(config-router-af)#neighbor 3ffe:10::10 activate
Activate the neighbor R1(3ffe:10::10), and enable exchange of IPv6 address prefix types with this neighbor.
(config-router-af)#exit-address-family
Exit address family
(config-router)#commit
Commit the candidate configuration to the running configuration
Validation
show bgp ipv6 summary, show bgp ipv6 neighbors.
R1
 
#show bgp ipv6 summary
BGP router identifier 10.10.10.10, local AS number 200
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
3ffe:10::11 4 200 10 10 1 0 0 00:03:36 0
 
Total number of neighbors 1
 
Total number of Established sessions 1
 
#show bgp ipv6 neighbors
BGP neighbor is 3ffe:10::11, remote AS 200, local AS 200, internal link
BGP version 4, local router ID 10.10.10.10, remote router ID 10.10.10.11
BGP state = Established, up for 00:05:39
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 IPv6 Unicast: advertised and received
Received 15 messages, 0 notifications, 0 in queue
Sent 14 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
For address family: IPv6 Unicast
BGP table version 1, neighbor version 1
Index 1, Offset 0, Mask 0x2
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
 
Connections established 1; dropped 0
Local host: 3ffe:10::10, Local port: 44754
Foreign host: 3ffe:10::11, Foreign port: 179
Nexthop: 10.10.10.10
Nexthop global: 3ffe:10::10
Nexthop local: fe80::5054:ff:fe11:d4f5
BGP connection: shared network
R2
 
R2#show bgp ipv6 summary
BGP router identifier 10.10.10.11, local AS number 200
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
3ffe:10::10 4 200 31 32 1 0 0 00:12:53 0
 
Total number of neighbors 1
 
Total number of Established sessions 1
 
R2#show bgp ipv6 neighbors
BGP neighbor is 3ffe:10::10, remote AS 200, local AS 200, internal link
BGP version 4, local router ID 10.10.10.11, remote router ID 10.10.10.10
BGP state = Established, up for 00:15:29
Last read 00:00:19, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv6 Unicast: advertised and received
Received 37 messages, 0 notifications, 0 in queue
Sent 39 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
For address family: IPv6 Unicast
BGP table version 1, neighbor version 1
Index 1, Offset 0, Mask 0x2
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
 
Connections established 1; dropped 0
Local host: 3ffe:10::11, Local port: 179
Foreign host: 3ffe:10::10, Foreign port: 44754
Nexthop: 10.10.10.11
Nexthop global: 3ffe:10::11
Nexthop local: fe80::5054:ff:fe82:8dcc
BGP connection: shared network
Enable iBGP Peering Using Link-local Address
This example shows the minimum configuration required to enable iBGP on an interface. R1 and R2 are two routers belonging to the same AS, AS200, connecting to network fe80::/10. First, define the routing process and AS number to which the routers belong. Configure a fixed Router ID for the BGP4+ routing process, then, define BGP neighbors to start exchanging routing updates.
Topology
iBGP Peering Link-Local Address
Configuration
R1
 
#configure terminal
Enter Configure mode.
(config)#router bgp 200
Define the routing process. The number 200 specifies the AS number of R1.
(config-router)#bgp router-id 10.10.10.10
Configure a fixed Router ID (10.10.10.10) for the BGP4+ routing process.
(config-router)#neighbor fe80::2 remote-as 200
Define BGP neighbor (R2), and establish a TCP session by specifying the link-local address (fe80::2)and the AS number(200)of neighbor R2.
(config-router)#neighbor fe80::2 interface eth0
To specify a link-local neighbor, configure the interface name of the neighbor fe80::2.
(config-router)#address-family ipv6
Enter Address Family mode for configuring routing sessions that use IPv6 address prefixes.
(config-router-af)#neighbor fe80::2 activate
Activate the neighbor R2(fe80::2), and enable exchange of IPv6 address prefix types with this neighbor.
(config-router-af)#exit-address-family
Exit address family
(config-router)#commit
Commit the candidate configuration to the running configuration
R2
 
(config)#router bgp 200
Define the routing process. The number 200 specifies the AS number of R2.
(config-router)#bgp router-id 10.10.10.11
Configure a fixed Router ID (10.10.10.11) for the BGP4+ routing process.
(config-router)#neighbor fe80::1 remote-as 200
Define the BGP neighbor (R1), and establish a TCP session by specifying the link-local address R1(fe80::1) and the AS number(200)of neighbor R1.
(config-router)#neighbor fe80::1 interface eth1
To specify a link-local neighbor, configure the interface name of the neighbor fe80::1.
(config-router)#address-family ipv6
Enter Address Family mode for configuring routing sessions that use IPv6 address prefixes.
(config-router-af)#neighbor fe80::1 activate
Activate the neighbor R1(fe80:1), and enable exchange of IPv6 address prefix types with this neighbor.
(config-router-af)#exit-address-family
Exit address family
(config-router)#commit
Commit the candidate configuration to the running configuration
Validation
show bgp ipv6 summary, show bgp ipv6, show bgp ipv6 neighbors
R1
 
R1#show bgp ipv6 summary
BGP router identifier 10.10.10.10, local AS number 200
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
fe80::2 4 200 68 67 1 0 0 00:27:49 0
 
Total number of neighbors 1
 
Total number of Established sessions 1
R1#show bgp ipv6 neighbors
BGP neighbor is fe80::2, remote AS 200, local AS 200, internal link
BGP version 4, local router ID 10.10.10.10, remote router ID 10.10.10.11
BGP state = Established, up for 00:28:14
Last read 00:00:28, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv6 Unicast: advertised and received
Received 68 messages, 0 notifications, 0 in queue
Sent 68 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
For address family: IPv6 Unicast
BGP table version 1, neighbor version 1
Index 1, Offset 0, Mask 0x2
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
 
Connections established 1; dropped 0
Local host: fe80::5054:ff:fe11:d4f5, Local port: 179
Foreign host: fe80::2, Foreign port: 44058
Nexthop: 10.10.10.10
Nexthop global: 3ffe:10::10
Nexthop local: fe80::5054:ff:fe11:d4f5
BGP connection: shared network
R2
 
R2#show bgp ipv6 summary
BGP router identifier 10.10.10.11, local AS number 200
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
fe80::1 4 200 54 55 1 0 0 00:22:19 0
 
Total number of neighbors 1
 
Total number of Established sessions 1
 
R2#show bgp ipv6 neighbors
BGP neighbor is fe80::1 , remote AS 200, local AS 200, internal link
BGP version 4, local router ID 10.10.10.11, remote router ID 10.10.10.10
BGP state = Established, up for 00:22:59
Last read 00:00:13, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv6 Unicast: advertised and received
Received 55 messages, 0 notifications, 0 in queue
Sent 57 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
For address family: IPv6 Unicast
BGP table version 1, neighbor version 1
Index 1, Offset 0, Mask 0x2
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
 
Connections established 1; dropped 0
Local host: fe80::5054:ff:fe82:8dcc, Local port: 44058
Foreign host: fe80::1 , Foreign port: 179
Nexthop: 10.10.10.11
Nexthop global: 3ffe:10::11
Nexthop local: fe80::5054:ff:fe82:8dcc
BGP connection: shared network
Enable eBGP Peering Between Different Autonomous Systems
This example shows the minimum configuration required to enable eBGP on an interface, when the routers belong to different ASs. R1 and R2 are two routers in different ASs, AS200 and AS300 connecting to network 3ffe:10::/64.
Topology
BGP Peering - Different AS
Configuration
R1
 
#configure terminal
Enter Configure mode.
(config)#router bgp 200
Define the routing process. The number 200 specifies the AS number of R1.
(config-router)#bgp router-id 10.10.10.10
Configure a fixed Router ID (10.10.10.10) for the BGP4+ routing process.
(config-router)#neighbor 3ffe:10::11 remote-as 300
Define the BGP neighbor (R2), and establish a TCP session by specifying the IPv6 address (3ffe:10::11) and the AS number(300)of neighbor R2.
(config-router)#address-family ipv6
Enter Address Family mode for configuring routing sessions that use IPv6 address prefixes.
(config-router-af)#neighbor 3ffe:10::11 activate
Activate the neighbor R2(3ffe:10::11), and enable exchange of IPv6 address prefix types with this neighbor.
(config-router-af)#exit-address-family
Exit address family
(config-router)#commit
Commit the candidate configuration to the running configuration
R2
 
(config)#router bgp 300
Define the routing process. The number 300 specifies the AS number of R2.
(config-router)#bgp router-id 10.10.10.11
Configure a fixed Router ID (10.10.10.11) for the BGP4+ routing process.
(config-router)#neighbor 3ffe:10::10 remote-as 200
Define the BGP neighbor (R1), and establish a TCP session by specifying the IPv6 address (3ffe:10::10) and the AS number(200)of neighbor R1.
(config-router)#address-family ipv6
Enter Address Family mode for configuring routing sessions that use IPv6 address prefixes.
(config-router-af)#neighbor 3ffe:10::10 activate
Activate the neighbor R1(3ffe:10::10) and enable exchange of IPv6 address prefix types with this neighbor.
(config-router-af)#exit-address-family
Exit address family
(config-router)#commit
Commit the candidate configuration to the running configuration
Validation
show bgp ipv6 summary, show bgp ipv6 neighbors.
R1
 
R1#show bgp ipv6 summary
BGP router identifier 10.10.10.10, local AS number 200
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
3ffe:10::11 4 300 3 4 1 0 0 00:00:37 0
 
Total number of neighbors 1
Total number of Established sessions 1
 
R1#show bgp ipv6 neighbors
BGP neighbor is 3ffe:10::11, remote AS 300, local AS 200, external link
BGP version 4, local router ID 10.10.10.10, remote router ID 10.10.10.11
BGP state = Established, up for 00:01:42
Last read 00:00:04, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv6 Unicast: advertised and received
Received 6 messages, 0 notifications, 0 in queue
Sent 6 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 30 seconds
For address family: IPv6 Unicast
BGP table version 1, neighbor version 1
Index 1, Offset 0, Mask 0x2
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
 
Connections established 1; dropped 0
Local host: 3ffe:10::10, Local port: 179
Foreign host: 3ffe:10::11, Foreign port: 46240
Nexthop: 10.10.10.10
Nexthop global: 3ffe:10::10
Nexthop local: fe80::5054:ff:fe11:d4f5
BGP connection: shared network
R2
 
R2#show bgp ipv6 summary
BGP router identifier 10.10.10.11, local AS number 300
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
3ffe:10::10 4 200 2 2 1 0 0 00:00:24 0
 
Total number of neighbors 1
 
Total number of Established sessions 1
 
R2#show bgp ipv6 neighbors
BGP neighbor is 3ffe:10::10, remote AS 200, local AS 300, external link
BGP version 4, local router ID 10.10.10.11, remote router ID 10.10.10.10
BGP state = Established, up for 00:01:32
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 IPv6 Unicast: advertised and received
Received 5 messages, 0 notifications, 0 in queue
Sent 5 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 30 seconds
For address family: IPv6 Unicast
BGP table version 1, neighbor version 1
Index 1, Offset 0, Mask 0x2
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
 
Connections established 1; dropped 0
Local host: 3ffe:10::11, Local port: 46240
Foreign host: 3ffe:10::10, Foreign port: 179
Nexthop: 10.10.10.11
Nexthop global: 3ffe:10::11
Nexthop local: fe80::5054:ff:fe82:8dcc
BGP connection: shared network
Route-Map
Use route-maps to filter incoming updates from a BGP peer. In this example, a prefix list named myPrefixList on R1 is configured to deny entry of any routes with the IP address 3ffe:12::/32. To test the filter, R2 is configured to generate network prefixes 3ffe:11::/48 and 3ffe:12::/48. To verify, use the show bgp ipv6 command on R1; it displays R1 receiving only the 3ffe:11::/48 network prefix.
Topology
Route-Map
Configuration
R1
 
#configure terminal
Enter Configure mode.
(config)Interface eth1
Specify the interface (eth1) to configure
(config)Ipv6 address 3ffe:10::10/64
Specify the IPv6 global address
(config)Exit
Enter Configure mode
(config)#ipv6 prefix-list myPrefixList
Create an entry in the prefix-list. myPrefixList is the name of the map that is created
(config-ipv6-prefix-list)#seq 5 deny 3ffe:12::/32 ge 48 le 64
Here 5 and 10 specify the sequence number or position of this specific route map. deny specifies the packets are to be rejected. permit specifies the packets are to be allowed. 48 and 64 are the minimum and maximum prefix lengths, respectively, to be matched.
(config-ipv6-prefix-list)#seq 10 permit any
Create another entry in the myPrefixList map. 10 specifies the sequence number or position of this specific route map. permit any specifies accept all packets of any length.
(config-ipv6-prefix-list)#exit
Exit the prefix-list mode
(config)#route-map myPrefixList permit 1
Enter Route-map mode.
(config-route-map)#match ipv6 address prefix-list myPrefixList
Set the match criteria. In this case, if the route-map name matches myPrefixList, the packets from the first sequence will be denied.
(config-route-map)#exit
Exit Route-map mode, and return to Configure mode.
(config)#commit
Commit the candidate configuration to the running configuration
(config)#router bgp 10
Define the routing process. The number 10 specifies the AS number of R1.
(config-router)#bgp router-id 192.168.10.10
Configure a fixed Router ID (192.168.10.10) for the BGP4+ routing process.
(config-router)#neighbor 3ffe:10:11 remote-as 11
Define the BGP neighbor (R2), and establish a TCP session by specifying the IPv6 address (3ffe:10::11)and the AS number(11)of neighbor R2.
(config-router-af)#exit
Exit from router BGP mode.
(config)#commit
Commit the candidate configuration to the running configuration.
(config-router)#address-family ipv6
Enter Address Family mode for configuring routing sessions that use IPv6 address prefixes.
(config-router-af)#neighbor 3ffe:10::11 activate
Activate the neighbor R2(3ffe:10::11), and enable exchange of IPv6 address prefix types with this neighbor.
(config-router-af)#neighbor 3ffe:10::11 route-map myPrefixList in
Apply the route-map myPrefixList to all incoming routes.
(config-router-af)#exit-address-family
Exit Address Family mode, and return to Router mode.
(config-router-af)#exit
Exit Router mode, and return to Configure mode.
(config)#commit
Commit the candidate configuration to the running configuration.
R2
 
#configure terminal
Enter Configure mode.
(config)Interface eth1
Specify the interface (eth1) to configure
(config)Ipv6 address 3ffe:10::11/64
Specify the IPv6 global address
(config)Exit
Enter Configure mode
(config)#router bgp 11
Define the routing process. The number 11 specifies the AS number of R2.
(config-router)#bgp router-id 192.168.10.11
Configure a fixed Router ID (192.168.10.11) for the BGP4+ routing process.
(config-router)#neighbor 3ffe:10::10 remote-as 10
Define the BGP neighbor (R1), and establish a TCP session by specifying the IPv6 address (3ffe:10::10)and the AS number(10)of neighbor R1.
(config-router)#address-family ipv6
Enter Address Family mode for configuring routing sessions that use IPv6 address prefixes.
(config-router-af)#network 3ffe:11::/48
Announce the IPv6 network prefix (3ffe:11::/48).
(config-router-af)#network 3ffe:12::/48
Announce the IPv6 network prefix (3ffe:12::/48).
(config-router-af)#neighbor 3ffe:10::10 activate
Activate the neighbor R1(3ffe:10::10), and enable exchange of IPv6 address prefix types with this neighbor.
(config-router-af)#exit-address-family
Exit Address Family mode, and return to Router mode.
(config)#commit
Commit the candidate configuration to the running configuration.
Validation
show bgp ipv6 summary, show bgp ipv6 neighbors, show bgp ipv6, show bgp ipv6 prefix-list.
R1
 
R1#show ipv6 bgp summary
BGP router identifier 192.168.10.10, local AS number 10
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
3ffe:10::11 4 11 140 306 1 0 0 00:10:44 0
 
Total number of neighbors 1
 
Total number of Established sessions 1
 
 
 
R1#show bgp ipv6 neighbors
BGP neighbor is 3ffe:10::11, remote AS 11, local AS 10, external link
BGP version 4, local router ID 192.168.10.10, remote router ID 192.168.10.11
BGP state = Established, up for 00:11:02
Last read 00:00:23, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv6 Unicast: advertised and received
Received 140 messages, 0 notifications, 0 in queue
Sent 194 messages, 113 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 30 seconds
For address family: IPv6 Unicast
BGP table version 1, neighbor version 1
Index 1, Offset 0, Mask 0x2
Community attribute sent to this neighbor (both)
Inbound path policy configured
Route map for incoming advertisements is *myPrefixList
0 accepted prefixes
0 announced prefixes
 
Connections established 1; dropped 0
Local host: 3ffe:10::10, Local port: 179
Foreign host: 3ffe:10::11, Foreign port: 46796
Nexthop: 192.168.10.10
Nexthop global: 3ffe:10::10
Nexthop local: fe80::5054:ff:fe11:d4f5
BGP connection: shared network
Last Reset: 00:11:06, due to OPEN Message Error (Notification sent)
Notification Error Message: (OPEN Message Error/Bad Peer AS.)
R2
 
R1#show bgp ipv6 neighbors
BGP neighbor is 3ffe:10::11, remote AS 11, local AS 10, external link
BGP version 4, local router ID 192.168.10.10, remote router ID 192.168.10.11
BGP state = Established, up for 00:11:02
Last read 00:00:23, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv6 Unicast: advertised and received
Received 140 messages, 0 notifications, 0 in queue
Sent 194 messages, 113 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 30 seconds
For address family: IPv6 Unicast
BGP table version 1, neighbor version 1
Index 1, Offset 0, Mask 0x2
Community attribute sent to this neighbor (both)
Inbound path policy configured
Route map for incoming advertisements is *myPrefixList
0 accepted prefixes
0 announced prefixes
 
Connections established 1; dropped 0
Local host: 3ffe:10::10, Local port: 179
Foreign host: 3ffe:10::11, Foreign port: 46796
Nexthop: 192.168.10.10
Nexthop global: 3ffe:10::10
Nexthop local: fe80::5054:ff:fe11:d4f5
BGP connection: shared network
Last Reset: 00:11:06, due to OPEN Message Error (Notification sent)
Notification Error Message: (OPEN Message Error/Bad Peer AS.)
Route Reflector
Use Route Reflectors to reduce the iBGP mesh inside an AS. In this example, R2, R5, and R4 would have to maintain a full mesh among themselves, but by making R5 the Route Reflector, R2 (Client1) has an iBGP session with RR only, and not with R4 (Client 2). The routes learned from R2 are advertised to the other clients, and to iBGP peers outside the cluster; the iBGP routes learned from iBGP peers outside the cluster are advertised to the R2. This reduces the iBGP peer connections in AS1.
Topology
BGP4+ Route Reflector
Configuration
RR (R5)
 
#configure terminal
Enter Configure mode.
(config)#router bgp 1
Define the routing process. The number 1 specifies the AS number of R5 (RR).
(config-router)#bgp router-id 10.10.10.10
Configure a fixed Router ID (10.10.10.10) for the BGP4+ routing process.
(config-router)#neighbor 3ffe:10::50 remote-as 1
Define the BGP neighbor (R2), and establish a TCP session by specifying the IPv6 address (3ffe:10::50)and the AS number(1)of neighbor R2.
(config-router)#neighbor 3ffe:11::50 remote-as 1
Define the BGP neighbor (R4), and establish a TCP session by specifying the IPv6 address (3ffe:11::50)and the AS number(1) of neighbor R4.
(config-router)#address-family ipv6
Enter Address Family mode for configuring routing sessions that use IPv6 address prefixes.
(config-router-af)#neighbor 3ffe:10::50 activate
Activate the neighbor R2(3ffe:10::50), and enable exchange of IPv6 address prefix types with this neighbor.
(config-router-af)#neighbor 3ffe:10::50 route-reflector-client
Configure R5 as the Route-Reflector (RR) and neighbor R2 as its client.
(config-router-af)#neighbor 3ffe:11::50 activate
Activate the neighbor R4(3ffe:11::50), and enable exchange of IPv6 address prefix types with this neighbor.
(config-router-af)#neighbor 3ffe:11::50 route-reflector-client
Configure R5 as the Route-Reflector (RR) and neighbor R4 as its client.
(config-router-af)#exit-address-family
Exit address family
(config-router)#commit
Commit the candidate configuration to the running configuration.
RR Client 1 (R2)
 
(config)#router bgp 1
Define the routing process. The number 1 specifies the AS number of R2 (RR Client 1).
(config-router)#bgp router-id 10.10.10.50
Configure a fixed Router ID (10.10.10.50) for the BGP4+ routing process.
(config-router)#neighbor 3ffe:10::10 remote-as 1
Define the BGP neighbor (R5), and establish a TCP session by specifying the IPv6 address (3ffe:10::10) and the AS number(1) of neighbor R5.
(config-router)#address-family ipv6
Enter Address Family mode for configuring routing sessions that use IPv6 address prefixes.
(config-router-af)#neighbor 3ffe:10::10 activate
Activate the neighbor (3ffe:10::10), and enable exchange of IPv6 address prefix types with this neighbor.
(config-router-af)#exit-address-family
Exit address family
(config-router)#commit
Commit the candidate configuration to the running configuration.
RR Client 2 (R4)
 
(config)#router bgp 1
Define the routing process. The number 1 specifies the AS number of R4 (RR Client 2).
(config-router)#bgp router-id 10.10.11.50
Configure a fixed Router ID (10.10.11.50) for the BGP4+ routing process.
(config-router)#neighbor 3ffe:11::10 remote-as 1
Define the BGP neighbor (R5), and establish a TCP session by specifying the IPv6 address (3ffe:11::10) and the AS number(1) of the neighbor.
(config-router)#address-family ipv6
Enter Address Family mode for configuring routing sessions that use IPv6 address prefixes.
(config-router-af)#neighbor 3ffe:11::10 activate
Activate the neighbor (3ffe:11::10), and enable exchange of IPv6 address prefix types with this neighbor.
(config-router-af)#exit-address-family
Exit address family
(config-router)#commit
Commit the candidate configuration to the running configuration.
Validation
show bgp ipv6 summary, show bgp ipv6 neighbors
Confederations
In this example, AS1 contains three Confederated Autonomous Systems--AS 1000, AS 1001 and AS 1002. To any outside AS, the overall Confederation is a single AS, AS1. Confederation eBGP is run between R2 and R5, and between R5 and R7. R2 is configured so that its local AS is 1000. Its peer connection to R5 is set up like any other eBGP session. The bgp confederation identifier command informs the router that it is a member of a Confederation and passes the Confederation ID. The bgp confederation peers command lists the member AS to which R2 is connected. The same command tells the BGP process that the eBGP connection is a Confederation eBGP, rather than a normal eBGP.
Topology
BGP4+ Confederations
Configuration
R2
 
#configure terminal
Enter Configure mode.
(config)#router bgp 1000
Define the routing process. The number 1000 specifies the AS number of R2.
(config-router)#bgp router-id 10.10.10.2
Configure a fixed Router ID (10.10.10.2) for the BGP4+ routing process.
(config-router)#bgp confederation identifier 1
Specify the BGP Confederation Identifier (1). To others, the group will appear as a single AS, and the identifier as its AS number.
(config-router)#bgp confederation peers 1001
Specify AS 1001 as s confederation peer, making it a member of the Confederation.
(config-router)#bgp confederation peers 1002
Specify AS 1002 as s confederation peer, making it a member of the Confederation.
(config-router)#neighbor 3ffe:10::5 remote-as 1001
Define the BGP neighbor (R5), and establish a TCP session by specifying the IPv6 address (3ffe:10::5) and the AS number(1001)of neighbor R5.
(config-router)#neighbor 3ffe:9::1 remote-as 1000
Define the BGP neighbor (R1), and establish a TCP session by specifying the IPv6 address (3ffe:9::1) and the AS number(1000)of neighbor R1.
(config-router)#neighbor 3ffe:7::3 remote-as 1000
Define the BGP neighbor (R3), and establish a TCP session by specifying the IPv6 address (3ffe:7::3)and the AS number(1000)of neighbor R3.
(config-router)#address-family ipv6
Enter Address Family mode for configuring routing sessions that use IPv6 address prefixes.
(config-router-af)#neighbor 3ffe:10::5 activate
Activate neighbor R5(3ffe:10::5), and enable exchange of IPv6 address prefix types with this neighbor.
(config-router-af)#neighbor 3ffe:9::1 activate
Activate neighbor R1(3ffe:9::1), and enable exchange of IPv6 address prefix types with this neighbor.
(config-router-af)#neighbor 3ffe:7::3 activate
Activate neighbor R3(3ffe:7::3), and enable exchange of IPv6 address prefix types with this neighbor.
(config-router-af)#exit-address-family
Exit address family
(config-router)#commit
Commit the candidate configuration to the running configuration.
R5
 
(config)#router bgp 1001
Define the routing process. The number 1001 specifies the AS number of R5.
(config-router)#bgp router-id 10.10.10.5
Configure a fixed Router ID (10.10.10.5) for the BGP4+ routing process.
(config-router)#bgp confederation identifier 1
Specify the BGP Confederation Identifier (1). To others, the group will appear as a single AS, and the identifier as its AS number.
(config-router)#bgp confederation peers 1000
Specify AS 1000 as s confederation peer, making it a member of the Confederation.
(config-router)#bgp confederation peers 1002
Specify AS 1002 as s confederation peer, making it a member of the Confederation.
(config-router)#neighbor 3ffe:10::2 remote-as 1000
Define the BGP neighbor (R2), and establish a TCP session by specifying the IPv6 address (3ffe:10::2)and the AS number(1000)of neighbor R2.
(config-router)#neighbor 3ffe:11::7 remote-as 1002
Define the BGP neighbor (R7), and establish a TCP session by specifying the IPv6 address (3ffe:11::7)and the AS number(1002)of neighbor R7.
(config-router)#neighbor 3ffe:12::4 remote-as 1001
Define the BGP neighbor (R4), and establish a TCP session by specifying the IPv6 address (3ffe:12::4)and the AS number(1001)of neighbor R4.
(config-router)#neighbor 3ffe:13::6 remote-as 1001
Define the BGP neighbor (R6), and establish a TCP session by specifying the IPv6 address (3ffe:13::6)and the AS number(1001)of neighbor R6.
(config-router)#address-family ipv6
Enter Address Family mode for configuring routing sessions that use IPv6 address prefixes.
(config-router-af)#neighbor 3ffe:10::2 activate
Activate the neighbor R2(3ffe:10::2), and enable exchange of IPv6 address prefix types with this neighbor.
(config-router-af)#neighbor 3ffe:11::7 activate
Activate the neighbor R7(3ffe:11::7), and enable exchange of IPv6 address prefix types with this neighbor.
(config-router-af)#neighbor 3ffe:12::4 activate
Activate the neighbor R4(3ffe:12::4), and enable exchange of IPv6 address prefix types with this neighbor.
(config-router-af)#neighbor 3ffe:13::6 activate
Activate the neighbor R6(3ffe:13::6), and enable exchange of IPv6 address prefix types with this neighbor.
(config-router-af)#exit-address-family
Exit address family
(config-router)#commit
Commit the candidate configuration to the running configuration.
R7
 
(config)#router bgp 1002
Define the routing process. The number 1002 specifies the AS number of R7.
(config-router)#bgp router-id 10.10.11.7
Configure a fixed Router ID (10.10.11.7) for the BGP4+ routing process.
(config-router)#bgp confederation identifier 1
Specify BGP Confederation Identifier (1). To others, the group will appear as a single AS, and the identifier as its AS number.
(config-router)#bgp confederation peers 1000
Specify AS 1000 as s confederation peer, making it a member of the Confederation.
(config-router)#bgp confederation peers 1001
Specify AS 1001 as s confederation peer, making it a member of the Confederation.
(config-router)#neighbor 3ffe:11::5 remote-as 1001
Define the BGP neighbor (R5), and establish a TCP session by specifying the IPv6 address (3ffe:11::5)and the AS number(1001)of neighbor R5.
(config-router)#neighbor 3ffe:15::8 remote-as 1002
Define the BGP neighbor (R8), and establish a TCP session by specifying the IPv6 address (3ffe:15::8)and the AS number(1002)of neighbor R8.
(config-router)#address-family ipv6
Enter Address Family mode for configuring routing sessions that use IPv6 address prefixes.
(config-router-af)#neighbor 3ffe:11::5 activate
Activate the neighbor R5(3ffe:11::5), and enable exchange of IPv6 address prefix types with this neighbor.
(config-router-af)#neighbor 3ffe:15::8 activate
Activate the neighbor R8(3ffe:15::8), and enable exchange of IPv6 address prefix types with this neighbor.
(config-router-af)#exit-address-family
Exit address family
(config-router)#commit
Commit the candidate configuration to the running configuration.
Validation
show bgp ipv6 summary, show bgp ipv6 neighbors
BGP4+ Graceful Restart
Using BGP+ graceful restart, the data-forwarding plane of a router can continue to process and forward packets, even if the control plane (which is responsible for determining best paths) fails.
Topology
BGP4+ Graceful Restart
Configuration
R1
 
#configure terminal
Enter Configure mode.
(config)#interface lo
Enter to the interface mode.
(config-if)#ipv6 address 4000::1/64
Assign ipv6 address to loopback interface.
(config-if)#exit
Exit from interface mode.
(config)#interface xe9
Enter to the interface mode.
(config-if)#ipv6 address 4ffe::119/64
Configure ipv6 address.
(config-if)#exit
Exit from interface mode.
(config)#router bgp 100
Assign the ASN value (100) to the router.
(config-router)# bgp router-id 1.1.1.1
Configuring bgp router id.
(config-router)#bgp graceful-restart
Enable BGP graceful restart support.
(config-router)#neighbor 4ffe::120 remote-as 200
Specify the neighbor’s IP address (4ffe::120) and the ASN value of the neighbor (200).
(config-router)#address-family ipv6 unicast
Exchange the IPv6 capabilities, and switch the mode to the IPv6 address family.
(config-router-af)#network 4000::/64
Advertising ipv6 address.
(config-router-af)#neighbor 4ffe::120 activate
Specify the neighbor’s IPv6 address(4ffe::120), and activate the neighbor.
(config-router-af)#neighbor 4ffe::120 capability graceful-restart
Specify the neighbor’s IPv6 address (4ffe::120) for which the graceful restart capability is supported.
(config-router-af)#exit-address-family
Exit address family
(config-router)#commit
Commit the candidate configuration to the running configuration.
R2
 
#configure terminal
Enter Configure mode
(config)#interface xe9
Enter to the interface mode
(config-if)#ipv6 address 4ffe::119/64
Configure ipv6 address.
(config-if)#exit
Exit from interface mode.
(config)#router bgp 200
Assign the ASN value (200) to the router.
(config-router)# bgp router-id 2.2.2.2
Configuring bgp router id.
(config-router)#bgp graceful-restart
Enable BGP graceful restart support.
(config-router)#bgp graceful-restart restart-time 120
Configure the maximum time (120) required for neighbor(s) to restart.
(config-router)#bgp graceful-restart stalepath-time 120
Configure the maximum time (120) to retain stale paths from the restarting neighbor(s).
(config-router)#neighbor 4ffe::119 remote-as 100
Specify the neighbor’s IP address (4ffe::119) and the ASN value of the neighbor (100).
(config-router)#address-family ipv6 unicast
Exchange the IPv6 capabilities, and switch the mode to the IPv6 address family.
(config-router-af)#neighbor 4ffe::119 activate
Specify the neighbor’s IPv6 address(4ffe::119), and activate the neighbor.
(config-router-af)#neighbor 4ffe::119 capability graceful-restart
Specify the neighbor’s IPv6 address (4ffe::119) for which the graceful restart capability is supported.
(config-router-af)#exit-address-family
Exit address family
(config-router)#commit
Commit the candidate configuration to the running configuration.
Validation
R1
#show bgp ipv6 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
4ffe::120 4 200 8 11 1 0 0 00:01:02 0
 
Total number of neighbors 1
 
Total number of Established sessions 1
 
#show ip bgp neighbors
BGP neighbor is 4ffe::120, remote AS 200, local AS 100, external link
BGP version 4, local router ID 1.1.1.1, remote router ID 2.2.2.2
BGP state = Established, up for 00:01:31
Last read 00:00:17, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv6 Unicast: advertised and received
Received 9 messages, 0 notifications, 0 in queue
Sent 12 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 30 seconds
For address family: IPv6 Unicast
BGP table version 1, neighbor version 1
Index 1, Offset 0, Mask 0x2
AF-dependant capabilities:
Graceful restart: advertised, received
Forwarding states are being preserved
Community attribute sent to this neighbor (both)
0 accepted prefixes
1 announced prefixes
 
Connections established 2; dropped 1
Graceful-restart Status:
Remote restart-time is 90 sec
 
Local host: 4ffe::119, Local port: 179
Foreign host: 4ffe::120, Foreign port: 58264
Nexthop: 1.1.1.1
Nexthop global: 4ffe::119
Nexthop local: fe80::eac5:7aff:fe8b:a827
BGP connection: shared network
 
#show bgp ipv6
BGP table version is 1, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, a add-path, * valid, > best, i - internal,
l - labeled, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
Network Next Hop Metric LocPrf Weight Path
*> 4000::/64 :: 0 100 32768 i
 
Total number of prefixes 1
 
#show ipv6 route database bgp
IP Route Table for VRF "default"
 
#show ipv6 route database
IPv6 Routing Table
Codes: K - kernel route, C - connected, S - static, D- DHCP, R - RIP,
O - OSPF, IA - OSPF inter area, E1 - OSPF external type 1,
E2 - OSPF external type 2, E - EVPN N1 - OSPF NSSA external type 1,
N2 - OSPF NSSA external type 2, i - IS-IS, B - BGP,
v - vrf leaked
> - selected route, * - FIB route,p - stale info
Timers: Uptime
 
IP Route Table for VRF "default"
C *> ::1/128 via ::, lo, 10:38:02
C *> 4000::/64 via ::, lo, 00:25:40
C *> 4ffe::/64 via ::, xe9, 00:49:30
C *> fe80::/64 via ::, xe9, 02:06:22
C fe80::/64 via ::, xe5, 05:16:16
C fe80::/64 via ::, xe12, 05:33:37
C fe80::/64 via ::, xe11, 05:33:37
C fe80::/64 via ::, ce1, 10:38:02
 
#show ipv6 route
IPv6 Routing Table
Codes: K - kernel route, C - connected, S - static, D- DHCP, R - RIP,
O - OSPF, IA - OSPF inter area, E1 - OSPF external type 1,
E2 - OSPF external type 2, E - EVPN N1 - OSPF NSSA external type 1,
N2 - OSPF NSSA external type 2, i - IS-IS, B - BGP,
v - vrf leaked
Timers: Uptime
 
IP Route Table for VRF "default"
C ::1/128 via ::, lo, 10:38:34
C 4000::/64 via ::, lo, 00:26:12
C 4ffe::/64 via ::, xe9, 00:50:02
C fe80::/64 via ::, xe9, 02:06:54
R2
 
#show bgp ipv6 summary
BGP router identifier 2.2.2.2, local AS number 200
BGP table version is 2
1 BGP AS-PATH entries
0 BGP community entries
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd
4ffe::119 4 100 14 14 2 0 0 00:05:08 1
 
Total number of neighbors 1
 
Total number of Established sessions 1
#show ip bgp neighbors
BGP neighbor is 4ffe::119, remote AS 100, local AS 200, external link
BGP version 4, local router ID 2.2.2.2, remote router ID 1.1.1.1
BGP state = Established, up for 00:06:16
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 IPv6 Unicast: advertised and received
Received 17 messages, 0 notifications, 0 in queue
Sent 17 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 30 seconds
For address family: IPv6 Unicast
BGP table version 2, neighbor version 2
Index 1, Offset 0, Mask 0x2
AF-dependant capabilities:
Graceful restart: advertised, received
 
Community attribute sent to this neighbor (both)
1 accepted prefixes
0 announced prefixes
 
Connections established 1; dropped 0
Graceful-restart Status:
Remote restart-time is 90 sec
 
Local host: 4ffe::120, Local port: 58264
Foreign host: 4ffe::119, Foreign port: 179
Nexthop: 2.2.2.2
Nexthop global: 4ffe::120
Nexthop local: fe80::82a2:35ff:fe7e:8833
BGP connection: shared network
 
#show bgp ipv6
BGP table version is 2, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, a add-path, * valid, > best, i - internal,
l - labeled, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
Network Next Hop Metric LocPrf Weight Path
*> 4000::/64 4ffe::119(fe80::eac5:7aff:fe8b:a827)
0 100 0 100 i
 
Total number of prefixes 1
 
#show ipv6 route database bgp
IP Route Table for VRF "default"
B *> 4000::/64 [20/0] via fe80::eac5:7aff:fe8b:a827, xe9, 00:06:53
 
 
#show ipv6 route database
IPv6 Routing Table
Codes: K - kernel route, C - connected, S - static, D- DHCP, R - RIP,
O - OSPF, IA - OSPF inter area, E1 - OSPF external type 1,
E2 - OSPF external type 2, E - EVPN N1 - OSPF NSSA external type 1,
N2 - OSPF NSSA external type 2, i - IS-IS, B - BGP,
v - vrf leaked
> - selected route, * - FIB route,p - stale info
Timers: Uptime
 
IP Route Table for VRF "default"
C *> ::1/128 via ::, lo, 02:11:57
B *> 4000::/64 [20/0] via fe80::eac5:7aff:fe8b:a827, xe9, 00:08:19
C *> 4ffe::/64 via ::, xe9, 00:50:24
C *> fe80::/64 via ::, xe13, 00:05:07
C fe80::/64 via ::, ce1, 02:11:57
C fe80::/64 via ::, ce0, 02:11:57
C fe80::/64 via ::, xe23, 02:11:57
C fe80::/64 via ::, xe22, 02:11:57
C fe80::/64 via ::, xe21, 02:11:57
C fe80::/64 via ::, xe20, 02:11:57
C fe80::/64 via ::, xe15, 02:11:57
C fe80::/64 via ::, xe9, 02:11:57
C fe80::/64 via ::, xe6, 02:11:57
 
#show ipv6 route
IPv6 Routing Table
Codes: K - kernel route, C - connected, S - static, D- DHCP, R - RIP,
O - OSPF, IA - OSPF inter area, E1 - OSPF external type 1,
E2 - OSPF external type 2, E - EVPN N1 - OSPF NSSA external type 1,
N2 - OSPF NSSA external type 2, i - IS-IS, B - BGP,
v - vrf leaked
Timers: Uptime
 
IP Route Table for VRF "default"
C ::1/128 via ::, lo, 02:14:13
B 4000::/64 [20/0] via fe80::eac5:7aff:fe8b:a827, xe9, 00:10:35
C 4ffe::/64 via ::, xe9, 00:52:40
C fe80::/64 via ::, xe13, 00:07:23
Performing BGP Graceful Restart
#write memory
Building configuration...
[OK]
#restart bgp graceful
%Warning : BGP process will stop and needs to restart manually,
You may lose bgp configuration,if not saved
Proceed for graceful restart? (y/n):y
2019 Feb 22 16:08:20.149 : OcNOS : BGP : CRITI : [BGP_OPR_NEIGH_STATE_DOWN_2]: Neighbour [4ffe::119] Session down as GR configured/unconfigured
2019 Feb 22 16:08:20.149 : OcNOS : BGP : CRITI : [BGP_OPR_NEIGH_STATE_DOWN_2]: Neighbour [4ffe::119] Session down due to config deletion
2019 Feb 22 16:08:20.153 : OcNOS : CML : CRITI : Module bgpd disconnected with CML
%% Managed module is down or crashed
2019 Feb 22 16:08:20.153 : OcNOS : CML : CRITI : Module bgpd disconnected with CML
 
#show ipv6 route
IPv6 Routing Table
Codes: K - kernel route, C - connected, S - static, D- DHCP, R - RIP,
O - OSPF, IA - OSPF inter area, E1 - OSPF external type 1,
E2 - OSPF external type 2, E - EVPN N1 - OSPF NSSA external type 1,
N2 - OSPF NSSA external type 2, i - IS-IS, B - BGP,
v - vrf leaked
Timers: Uptime
 
IP Route Table for VRF "default"
C ::1/128 via ::, lo, 02:18:54
B 4000::/64 [20/0] via fe80::eac5:7aff:fe8b:a827, xe9, 00:15:16
C 4ffe::/64 via ::, xe9, 00:57:21
C fe80::/64 via ::, xe13, 00:12:04
 
#show ipv6 route database
IPv6 Routing Table
Codes: K - kernel route, C - connected, S - static, D- DHCP, R - RIP,
O - OSPF, IA - OSPF inter area, E1 - OSPF external type 1,
E2 - OSPF external type 2, E - EVPN N1 - OSPF NSSA external type 1,
N2 - OSPF NSSA external type 2, i - IS-IS, B - BGP,
v - vrf leaked
> - selected route, * - FIB route,p - stale info
Timers: Uptime
 
IP Route Table for VRF "default"
C *> ::1/128 via ::, lo, 02:19:23
B *>p 4000::/64 [20/0] via fe80::eac5:7aff:fe8b:a827, xe9, 00:15:45
C *> 4ffe::/64 via ::, xe9, 00:57:50
C *> fe80::/64 via ::, xe13, 00:12:33
C fe80::/64 via ::, ce1, 02:19:23
C fe80::/64 via ::, ce0, 02:19:23
C fe80::/64 via ::, xe23, 02:19:23
C fe80::/64 via ::, xe22, 02:19:23
C fe80::/64 via ::, xe21, 02:19:23
C fe80::/64 via ::, xe20, 02:19:23
C fe80::/64 via ::, xe15, 02:19:23
C fe80::/64 via ::, xe9, 02:19:23
C fe80::/64 via ::, xe6, 02:19:23
Restarting the BGP Daemon
#start-shell
bash-5.0$ su
Password:
root@OcNOS:/home/ocnos# cd /usr/local/sbin/
root@OcNOS:/usr/local/sbin# ./bgpd -d
Configure BGP4+ Distance
Administrative distance in BGP+ can be configured for a specific address family.
This example shows configuring the BGP administrative distance for the IPv6 address family.
Topology
BGP4+ Distance
Configuration
R1
 
#configure terminal
Enter Configure mode.
(config)#router bgp 100
Assign the ASN value (100) to the router.
(config-router)#neighbor 4ffe::120 remote-as 100
Specify the neighbor's IP address and ASN value.
(config-router)#address-family ipv6 unicast
Enter IPv6 Address-Family mode.
(config-router-af)#neighbor 4ffe::120 activate
Activate the IPv6 neighbor.
(config-router-af)#network 8ffe::132/64
Specify the network to be advertised by the BGP routing process.
(config-router-af)#exit-address-family
Exit Address Family mode, and return to Router mode.
(config-router)#commit
Commit the candidate configuration to the running configuration.
R2
 
#configure terminal
Enter Configure mode.
(config)#router bgp 100
Assign the ASN value (100) to the router.
(config-router)#neighbor 4ffe::121 remote-as 100
Specify the neighbor’s IP address and ASN value.
(config-router)#neighbor 5ffe::115 remote-as 200
Specify the neighbor’s IP address and the ASN value of another neighbor.
(config-router)#address-family ipv6 unicast
Enter IPv6 Address-Family mode.
(config-router-af)#aggregate-address 2ffe::102/32 summary-only
Configure an IPv6 non-AS-set aggregate route on R2. The local distance will be applied to this route.
(config-router-af)#neighbor 4ffe::121 activate
Activate the IPv6 neighbor.
(config-router-af)#neighbor 5ffe::115 activate
Activate the IPv6 neighbor.
(config-router-af)#distance bgp 12 13 11
Configure the administrative distance for external, internal, and local routes received in IPv6 Address-Family mode.
(config-router-af)#exit-address-family
Exit Address Family mode, and return to Router mode.
(config-router)#commit
Commit the candidate configuration to the running configuration.
R3
 
#configure terminal
Enter Configure mode.
(config)#router bgp 100
Assign the ASN value (100) to the router.
(config-router)#neighbor 5ffe::114 remote-as 100
Specify the neighbor's IP address and ASN value.
(config-router)#address-family ipv6 unicast
Enter IPv6 Address-Family mode.
(config-router)#network 7ffe::99/64
Specify the network to be advertised by the BGP routing process.
 
(config-router-af)#neighbor 5ffe::114 activate
Activate the IPv6 neighbor.
(config-router-af)#exit-address-family
Exit Address Family mode, and return to Router mode.
(config-router)#commit
Commit the candidate configuration to the running configuration.
Validation
show bgp ipv6 summary, show ip bgp neighbors, show ipv6 route database bgp, show ipv6 route database, show ipv6 route, show bgp ipv6
BGP4+ Graceful Reset
The graceful restart mechanism for BGP+ session reset (the BGP+ daemon is not restarted) is used so that any changes in network configuration do not affect packet forwarding. The bgp graceful-restart graceful-reset CLI invokes graceful restart when a configuration change forces a peer reset. Graceful restart is invoked only when these CLI configuration changes force a peer reset.
Topology
BGP4+ Graceful Reset
Configuration
R1
 
#configure terminal
Enter Configure mode.
(config)#router bgp 100
Assign the ASN value (100) to the router.
(config-router)#bgp graceful-restart
Enable BGP graceful restart support.
(config-router)#bgp graceful-restart graceful-reset
Configure to invoke graceful restart when a configuration change forces a peer reset.
(config-router)#neighbor 4ffe::120 remote-as 200
Specify the neighbor’s IP address (4ffe::120) and the ASN value of the neighbor (200).
(config-router)#address-family ipv6 unicast
Exchange the IPv6 capabilities, and switch the mode to the IPv6 address family.
(config-router-af)#neighbor 4ffe::120 activate
Specify the neighbor’s IPv6 address(4ffe::120), and activate the neighbor.
(config-router-af)#neighbor 4ffe::120 capability graceful-restart
Specify the neighbor’s IPv6 address (4ffe::120) for which the graceful restart capability is supported.
(config-router-af)#exit-address-family
Exit Address Family mode, and return to Router mode.
(config-router)#commit
Commit the candidate configuration to the running configuration.
R2
 
#configure terminal
Enter Configure mode.
(config)#router bgp 200
Assign the ASN value (200) to the router.
(config-router)#bgp graceful-restart
Enable BGP graceful restart support.
(config-router)#bgp graceful-restart graceful-reset
Configure to invoke graceful restart when a configuration change forces a peer reset.
(config-router)#neighbor 4ffe::119 remote-as 100
Specify the neighbor’s IP address (4ffe::119) and the ASN value of the neighbor (100).
(config-router)#address-family ipv6 unicast
Exchange the IPv6 capabilities, and switch the mode to the IPv6 address family.
(config-router-af)#neighbor 4ffe::119 activate
Specify the neighbor’s IPv6 address(4ffe::119), and activate the neighbor.
(config-router-af)#neighbor 4ffe::119 capability graceful-restart
Specify the neighbor’s IPv6 address (4ffe::119) for which the graceful restart capability is supported.
(config-router-af)#exit-address-family
Exit Address Family mode, and return to Router mode.
(config-router)#commit
Commit the candidate configuration to the running configuration.
Validation
show bgp ipv6 summary, show ip bgp neighbors, show bgp ipv6, show ipv6 route database bgp, show ipv6 route database, show ipv6 route
VPNv4 NLRI with IPv6 Nexthop
Multi-protocol BGP (MP-BGP) specifies that the set of usable next-hop address families is determined by the Address Family Identifier (AFI) and the Subsequent Address Family Identifier (SAFI). Historically the AFI/SAFI definitions for the IPv4 address family only have provisions for advertising a Next Hop address that belongs to the IPv4 protocol when advertising IPv4 or VPN-IPv4 Network Layer Reachability Information (NLRI).
The extensions necessary to allow advertising IPv4 NLRI or VPN-IPv4 NLRI with a Next Hop address that belongs to the IPv6 protocol. This comprises an extension of the AFI/SAFI definitions to allow the address of the Next Hop for IPv4 NLRI or VPN-IPv4 NLRI to also belong to the IPv6 Protocol. The encoding of the Next Hop to determine which of the protocols the address actually belongs to, and a new BGP Capability allowing MP-BGP Peers to dynamically discover whether they can exchange IPv4 NLRI and VPN-IPv4 NLRI with an IPv6 Next Hop.
Topology
VPNv4 NLRI with IPv6 Nexthop
Configuration
R1
 
#configure terminal
Enter Configure mode.
(config)# ip vrf VRF1
Create a VRF, vrf1.
(config-vrf)#rd 100:10
Configure a route distinguisher value.
(config-vrf)#route-target both 100:10
Configure a route target both value to VRF.
(config-vrf)#exit
Exit from VRF configuration mode.
(config)#interface eth1
Enter Interface configuration mode.
(config-if)#ip vrf forwarding VRF1
Configure the interface to a VRF.
(config-if)#ip address 30.30.30.30/24
Assign an IP address to the interface.
(config-if)#ipv6 address 2ffe::10/64
Assign an IPV6 address to the interface.
(config-if)#exit
Exit from interface configuration mode.
(config)#ip route vrf VRF1 50.50.50.0/24 eth1
Create a VRF static route.
(config)#interface eth2 Enter
Interface configuration mode.
(config-if)#ipv6 address 3ffe::10/64
Assign an IPV6 address to the interface.
(config-if)#exit
Exit from interface configuration 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 a fixed Router ID (1.1.1.1) for the BGP4+ routing process.
(config-router)#neighbor 2.2.2.2 remote-as 200
Define BGP neighbors, and establish a TCP session. 2.2.2.2 is the IP address of the neighbor (R1), and 200 is the neighbor’s AS number.
(config-router)#neighbor 3ffe::11 remote-as 200
Define the BGP neighbor (R2), and establish a TCP session by specifying the IPv6 address (3ffe::11)and the AS number(200)of neighbor R2.
(config-router)#address-family vpnv4
unicast
Enter Address Family mode for configuring routing sessions that use IPv6 address prefixes.
(config-router-af)#neighbor 2.2.2.2
activate
Activate the neighbor R2(2.2.2.2), and enable exchange of IP address prefix types with this neighbor.
(config-router-af)#neighbor 3ffe::11 allow-ebgp-vpn
Apply allow-ebgp-vpn to allow an eBGP neighbor to be a VPN peer.
(config-router-af)#neighbor 3ffe::11 activate
Activate the neighbor R2(3ffe::11), and enable exchange of IPv6 address prefix types with this neighbor.
(config-router-af)#neighbor 3ffe::11 capability extended-nexthop-encode
Enable capability to encode IPv6 nexthop in VPNv4 NLRI.
(config-router-af)#exit-address-family
Exit Address Family mode, and return to Router mode.
(config-router)#address-family ipv4 vrf
VRF1
Enter IPv4 VRF address family.
(config-router-af)#redistribute static
Redistribute static into the IPv4 VRF address family.
(config-router-af)#exit-address-family
Exit Address Family mode, and return to Router mode.
(config-router)#exit
Exit Router mode, and return to Configure mode.
(config)#commit
Apply commit.
(config)#exit
Exit the config mode.
R2
 
#configure terminal
Enter Configure mode.
(config)# ip vrf VRF1
Create a VRF, vrf1.
(config-vrf)#rd 100:10
Configure a route distinguisher value.
(config-vrf)#route-target both 100:10
Configure a route target both value to VRF.
(config-vrf)#exit
Exit from VRF configuration mode.
(config)#interface eth1
Enter Interface configuration mode.
(config-if)#ip vrf forwarding VRF1
Configure the interface to a VRF.
(config-if)#ip address 40.40.40.40/24
Assign an IP address to the interface.
(config-if)#ipv6 address 4ffe::10/64
Assign an IPV6 address to the interface.
(config-if)#exit
Exit from interface configuration mode.
(config)#ip route vrf VRF1 66.66.66.0/24 eth1
Create a VRF static route.
(config)#interface eth2
Enter Interface configuration mode.
(config-if)#ipv6 address 3ffe::11/64
Assign an IPV6 address to the interface.
(config-if)#exit
Exit from interface configuration mode.
(config)#router bgp 200 Define the routing process.
The number 200 specifies the AS number of R1.
(config-router)#bgp router-id 2.2.2.2
Configure a fixed Router ID (2.2.2.2) for the BGP4+ routing process.
(config-router)#neighbor 1.1.1.1 remote-as 100
Define BGP neighbors, and establish a TCP session. 1.1.1.1 is the IP address of the neighbor (R1), and 100 is the neighbor’s AS number.
(config-router)#neighbor 3ffe::10 remote-as 100
Define the BGP neighbor (R2), and establish a TCP session by specifying the IPv6 address (3ffe::10)and the AS number(100)of neighbor R2.
(config-router)#address-family vpnv4
unicast
Enter Address Family mode for configuring routing sessions that use IPv6 address prefixes.
(config-router-af)#neighbor 1.1.1.1
activate
Activate the neighbor R2(1.1.1.1), and enable exchange of IP address prefix types with this neighbor.
(config-router-af)#neighbor 3ffe::10 allow- ebgp-vpn
Apply allow-ebgp-vpn to allow an eBGP neighbor to be a VPN peer.
(config-router-af)#neighbor 3ffe::10 activate
Activate the neighbor R2(3ffe::10), and enable exchange of IPv6 address prefix types with this neighbor.
(config-router-af)#neighbor 3ffe::10 capability extended-nexthop-encode
Enable capability to encode IPv6 nexthop in VPNv4 NLRI.
(config-router-af)#exit-address-family
Exit Address Family mode, and return to Router mode.
(config-router)#address-family ipv4 vrf
VRF1
Enter IPv4 VRF address family.
(config-router-af)#redistribute static
Redistribute static into the IPv4 VRF address family.
(config-router-af)#exit-address-family
Exit Address Family mode, and return to Router mode.
(config-router)#exit
Exit Router mode, and return to Configure mode.
(config)#commit
Apply commit.
(config)#exit
Exit the config mode.
Validation
R1
 
#show running-config router bgp
router bgp 100
bgp router-id 1.1.1.1
neighbor 2.2.2.2 remote-as 200
neighbor 3ffe::11 remote-as 200
!
address-family vpnv4 unicast
neighbor 2.2.2.2 activate
neighbor 3ffe::11 allow-ebgp-vpn
neighbor 3ffe::11 activate
neighbor 3ffe::11 capability extended-nexthop-encode
exit-address-family
!
address-family ipv4 vrf vrf1
redistribute static
exit-address-family
#sh ip bgp neighbors
BGP neighbor is 3ffe::11, remote AS 200, local AS 100, external link
BGP version 4, local router ID 1.1.1.1, remote router ID 2.2.2.2
BGP state = Established, up for 00:04:59
Last read 00:00:16, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family VPNv4 Unicast: advertised and received
Address family IPv4 Unicast: advertised and received
Received 167 messages, 1 notifications, 0 in queue
Sent 166 messages, 1 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 30 seconds
For address family: VPNv4 Unicast
BGP table version 1, neighbor version 1
Index 3, Offset 0, Mask 0x8
Extended Nexthop Encoding: advertised and received
NEXT_HOP is always this router
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
Connections established 1; dropped 0
Local host: 3ffe::10, Local port: 60148
Foreign host: 3ffe::11, Foreign port: 179
Nexthop: 2.2.2.2
Nexthop global: 3ffe::10
Nexthop local: fe80::ba6a:97ff:fee0:61be
BGP connection: shared network
Last Reset: 00:05:04, due to Configuration Change (Cease Notification sent)
Notification Error Message: (Cease/Other Configuration Change.)
 
#sh ip bgp vpnv4 all
Status codes: s suppressed, d damped, h history, a add-path, * valid, > best, i
- internal, l - labeled
S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 100:10 (Default for VRF vrf1)
*> 55.55.55.0/24 0.0.0.0 0 100 32768 ?
*> 66.66.66.0/24 0.0.0.0 0 100 0 ?
Announced routes count = 2
Accepted routes count = 0
Route Distinguisher: 100:10
* i 55.55.55.0/24 3ffe::11 0 100 0 ?
* i 66.66.66.0/24 3ffe::11 0 100 0 ?
Announced routes count = 0
Accepted routes count = 2
 
#sh ip bgp vpnv4 all summary
BGP router identifier 2.2.2.2, 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/Dow
n State/PfxRcd
2.2.2.2 4 400 0 0 0 0 0 never
Idle
 
3ffe::11 4 400 163 163 1 0 0 00:00:04
2
Total number of neighbors 2
 
Total number of Established sessions 1
R2
 
#show running-config router bgp
router bgp 200
bgp router-id 2.2.2.2
neighbor 1.1.1.1 remote-as 100
neighbor 3ffe::10 remote-as 100
!
address-family vpnv4 unicast
neighbor 1.1.1.1 activate
neighbor 3ffe::10 allow-ebgp-vpn
neighbor 3ffe::10 activate
neighbor 3ffe::10 capability extended-nexthop-encode
exit-address-family
!
address-family ipv4 vrf vrf1
redistribute static
exit-address-family
#sh ip bgp neighbors
BGP neighbor is 3ffe::10, remote AS 100, local AS 200, external link
BGP version 4, local router ID 2.2.2.2, remote router ID 1.1.1.1
BGP state = Established, up for 00:04:59
Last read 00:00:16, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family VPNv4 Unicast: advertised and received
Address family IPv4 Unicast: advertised and received
Received 167 messages, 1 notifications, 0 in queue
Sent 166 messages, 1 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 30 seconds
For address family: VPNv4 Unicast
BGP table version 1, neighbor version 1
Index 3, Offset 0, Mask 0x8
Extended Nexthop Encoding: advertised and received
NEXT_HOP is always this router
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
Connections established 1; dropped 0
Local host: 3ffe::11, Local port: 60148
Foreign host: 3ffe::10, Foreign port: 179
Nexthop: 1.1.1.1
Nexthop global: 3ffe::11
Nexthop local: fe80::ba6a:97ff:fee0:61ab
BGP connection: shared network
Last Reset: 00:05:04, due to Configuration Change (Cease Notification sent)
Notification Error Message: (Cease/Other Configuration Change.)
#sh ip bgp vpnv4 all
Status codes: s suppressed, d damped, h history, a add-path, * valid, > best, i
- internal, l - labeled
S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 100:10 (Default for VRF vrf1)
*> 55.55.55.0/24 0.0.0.0 0 100 32768 ?
*> 66.66.66.0/24 0.0.0.0 0 100 0 ?
Announced routes count = 2
Accepted routes count = 0
Route Distinguisher: 100:10
* i 55.55.55.0/24 3ffe::10 0 100 0 ?
* i 66.66.66.0/24 3ffe::10 0 100 0 ?
Announced routes count = 0
Accepted routes count = 2
 
#sh ip bgp vpnv4 all summary
BGP router identifier 1.1.1.1, 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/Dow
n State/PfxRcd
1.1.1.1 4 400 0 0 0 0 0 never
Idle
 
3ffe::10 4 400 163 163 1 0 0 00:00:04
2
Total number of neighbors 2
 
Total number of Established sessions 1