IPv6 - BGP (Border Gateway Protocol)

Border Gateway Protocol (BGP)

IPv6 Border Gateway Protocol (BGP) is an extension of the BGP protocol designed to support the IPv6 addressing scheme. BGP, a path vector protocol, is the primary routing protocol used to exchange routing and reachability information between autonomous systems on the Internet. IPv6 BGP operates similarly to its IPv4 counterpart, utilizing the same fundamental principles of BGP, such as the establishment of peer relationships, route advertisement, and path selection. It allows Internet Service Providers (ISPs) and large organizations to manage routing between their networks using the expanded IPv6 address space. IPv6 BGP plays a crucial role in enabling global IPv6 connectivity, facilitating the exchange of routing information and ensuring efficient and reliable routing across the IPv6 Internet. As with IPv4 BGP, careful configuration and management are essential to maintaining a stable and secure IPv6 BGP environment.

Lab:

Disclaimer

This Configuration Guide is designed to assist members to enhance their skills in particular technology area. While every effort has been made to ensure that all material is as complete and accurate as possible, the enclosed material is presented on an “as is” basis. Neither the authors nor Forum assume any liability or responsibility to any person or entity with respect to loss or damages incurred from the information contained in this guide. This configuration guide was developed by Forum. Any similarities between material presented in this configuration guide and any other material is completely coincidental.

Cisco IOS Software, 7200 Software (C7200-ADVENTERPRISEK9-M), Version 15.0(1)M9, RELEASE SOFTWARE (fc1)

R1 Router Config:

! 
ipv6 unicast-routing 
! 
interface Loopback0 
no ip address 
ipv6 address 2002:0:1:1::1/128 
ipv6 ospf 1 area 0 
! 
interface Loopback1 
no ip address 
ipv6 address 2002:0:1:2::1/128 
ipv6 ospf 1 area 0 
! 
interface Loopback2 
no ip address 
ipv6 address 2002:0:1:3::1/128 
ipv6 ospf 1 area 0 
! 
interface Serial1/0 
no ip address 
ipv6 address 2001:0:0:12::1/128 
ipv6 ospf 1 area 0 
no fair-queue 
serial restart-delay 0 
! 
router bgp 65100 
bgp router-id 1.1.1.1 
no bgp default ipv4-unicast 
bgp log-neighbor-changes 
neighbor 2002:0:2:1::2 remote-as 65000 
neighbor 2002:0:2:1::2 ebgp-multihop 5 
neighbor 2002:0:2:1::2 update-source 
Loopbac0 
address-family ipv6 
network 2002:0:1:2::1/128 
network 2002:0:1:3::1/128 
neighbor 2002:0:2:1::2 activate 
exit-address-family 
! 
ipv6 router ospf 1 
router-id 1.1.1.1 
log-adjacency-changes

R4 Router Config:

! 
ipv6 unicast-routing 
! 
interface Loopback0 
no ip address 
ipv6 address 2002:0:4:1::4/128 
ipv6 ospf 1 area 0 
! 
interface Loopback1 
no ip address 
ipv6 address 2002:0:4:2::4/128 
ipv6 ospf 1 area 0 
! 
interface Loopback2 
no ip address 
ipv6 address 2002:0:4:3::4/128 
ipv6 ospf 1 area 0 
! 
interface Serial1/0 
no ip address 
ipv6 address 2001:0:0:34::4/128 
ipv6 ospf 1 area 0 
serial restart-delay 0 
clock rate 64000 
! 
router bgp 65200 
bgp router-id 4.4.4.4 
no bgp default ipv4-unicast 
bgp log-neighbor-changes 
neighbor 2002:0:3:1::3 remote-as 65000 
neighbor 2002:0:3:1::3 ebgp-multihop 5 
neighbor 2002:0:3:1::3 update-source 
Loopback0 
address-family ipv6 
network 2002:0:4:2::4/128 
network 2002:0:4:3::4/128 
neighbor 2002:0:3:1::3 activate 
exit-address-family 
! 
ipv6 router ospf 1 
router-id 4.4.4.4 
log-adjacency-changes

R2 Router Config:

! 
ipv6 unicast-routing 
! 
interface Loopback0 
no ip address 
ipv6 address 2002:0:2:1::2/128 
ipv6 ospf 1 area 0 
! 
interface Loopback1 
no ip address 
ipv6 address 2002:0:2:2::2/128 
ipv6 ospf 1 area 0 
! 
interface Loopback2 
no ip address 
ipv6 address 2002:0:2:3::2/128 
ipv6 ospf 1 area 0 
! 
interface Serial1/0 
no ip address 
ipv6 address 2001:0:0:12::/64 eui-64 
ipv6 ospf 1 area 0 
no fair-queue 
serial restart-delay 0 
clock rate 64000 
! 
interface FastEthernet2/0 
no ip address 
duplex full 
speed 100 
ipv6 address 2001:0:0:23::/64 eui-64 
ipv6 ospf 1 area 0 
! 
router bgp 65000 
bgp router-id 2.2.2.2 
no bgp default ipv4-unicast 
bgp log-neighbor-changes 
neighbor 2001::23:C803:6FF:FEAF:38 
remote-as 65000 
neighbor 2002:0:1:1::1 remote-as 65100 
neighbor 2002:0:1:1::1 ebgp-multihop 5 
neighbor 2002:0:1:1::1 update-source 
Loopback0
address-family ipv6 
network 2002:0:2:2::2/128 
network 2002:0:2:3::2/128 
neighbor 2001::23:C803:6FF:FEAF:38 
activate 
neighbor 2002:0:1:1::1 activate 
exit-address-family 
! 
ipv6 router ospf 1 
router-id 2.2.2.2 
log-adjacency-changes 
!

R2 Router Config:

! 
ipv6 unicast-routing 
! 
interface Loopback0 
no ip address 
ipv6 address 2002:0:3:1::3/128 
ipv6 ospf 1 area 0 
! 
interface Loopback1 
no ip address 
ipv6 address 2002:0:3:2::3/128 
ipv6 ospf 1 area 0 
! 
interface Loopback2 
no ip address 
ipv6 address 2002:0:3:3::3/128 
ipv6 ospf 1 area 0 
! 
interface Serial1/0 
no ip address 
ipv6 address 2001:0:0:34::3/128 
ipv6 ospf 1 area 0 
no fair-queue 
serial restart-delay 0 
clock rate 64000 
! 
interface FastEthernet2/0 
no ip address 
duplex auto 
speed auto 
ipv6 address 2001:0:0:23::/64 eui-64 
ipv6 ospf 1 area 0 
! 
router bgp 65000 
bgp router-id 3.3.3.3 
no bgp default ipv4-unicast 
bgp log-neighbor-changes 
neighbor 2001::23:C802:6FF:FEAF:38 
remote-as 65000 
neighbor 2002:0:4:1::4 remote-as 65200 
neighbor 2002:0:4:1::4 ebgp-multihop 5 
neighbor 2002:0:4:1::4 update-source 
Loopback0
address-family ipv6 
network 2002:0:3:2::3/128 
network 2002:0:3:3::3/128 
neighbor 2001::23:C802:6FF:FEAF:38 
activate 
neighbor 2002:0:4:1::4 activate 
exit-address-family 
! 
ipv6 router ospf 1 
router-id 3.3.3.3 
log-adjacency-changes 
!

Note: R1(config-router)#neighbor FE80::C802:6FF:FEAF:0 remote-as 65000 % BGP(v6): Invalid scope. Unable to configure link-local peer. (In BGP Link local address can not be used by default for making BGP neighborship)

Verification:

R1#sh bgp ipv6 unicast neighbors 

BGP neighbor is 2002:0:2:1::2, remote AS 65000, external link (IPv6 address of peer with which neighborship has 
been formed, AS no. to which neigbor belongs, whether link is in other AS or same AS [external link – eBGP 
neighbor, internal link – iBGP neighbor])
BGP version 4, remote router ID 2.2.2.2 (version of BGP, peer router ID)
Session state = Established, up for 00:06:22 (Neigborship state with peer [Established-neighborship successfully 
formed, Active-I am sending BGP hello waiting for peer response, Idle-I am trying to establish TCP connection with 
peer)
Last read 00:00:51, last write 00:00:10, hold time is 180, keepalive interval is 60 seconds (hold time=Dead Timer, 
keepalive interval=Hello Timer)
——-<output omitted>———–
R2#sh bgp ipv6 unicast neighbors

BGP neighbor is 2001::23:C803:6FF:FEAF:38, remote AS 65000, internal link 
BGP version 4, remote router ID 3.3.3.3 
Session state = Established, up for 00:05:10 
Last read 00:00:46, last write 00:00:16, hold time is 180, keepalive interval is 60 seconds 
——-<output omitted>———–
BGP neighbor is 2002:0:1:1::1, remote AS 65100, external link 
BGP version 4, remote router ID 1.1.1.1 
BGP state = Established, up for 00:02:31 
Last read 00:00:46, last write 00:00:26, hold time is 180, keepalive interval is 60 seconds 
——-<output omitted>———–
R3#sh bgp ipv6 unicast neighbors

BGP neighbor is 2001::23:C802:6FF:FEAF:38, remote AS 65000, internal link 
BGP version 4, remote router ID 2.2.2.2 
Session state = Established, up for 00:05:10 
Last read 00:00:16, last write 00:00:46, hold time is 180, keepalive interval is 60 seconds 
——-<output omitted>———–
BGP neighbor is 2002:0:4:1::4, remote AS 65200, external link 
BGP version 4, remote router ID 4.4.4.4 
BGP state = Established, up for 00:03:57 
Last read 00:00:24, last write 00:00:02, hold time is 180, keepalive interval is 60 seconds 
——-<output omitted>———–
R4#sh bgp ipv6 unicast neighbors

BGP neighbor is 2002:0:3:1::3, remote AS 65000, external link 
BGP version 4, remote router ID 3.3.3.3 
Session state = Established, up for 00:04:24 
Last read 00:00:43, last write 00:00:48, hold time is 180, keepalive interval is 60 seconds 
——-<output omitted>———–
R1#sh bgp ipv6 unicast 

BGP table version is 9, local router ID is 1.1.1.1 
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal, 
r RIB-failure, S Stale

Origin codes: i – IGP, e – EGP, ? – incomplete 
Network                  Next Hop        Metric      LocPrf      Weight      Path 
*> 2002:0:1:2::1/128     ::                0                     32768       i 
*> 2002:0:1:3::1/128     ::                0                     32768       i 
*> 2002:0:2:2::2/128     2002:0:2:1::2     0                       0         65000 i 
*> 2002:0:2:3::2/128     2002:0:2:1::2     0                       0         65000 i 
*> 2002:0:3:2::3/128     2002:0:2:1::2     0                       0         65000 i 
*> 2002:0:3:3::3/128     2002:0:2:1::2     0                       0         65000 i 
*> 2002:0:4:2::4/128     2002:0:2:1::2     0                       0         65000 65200 i 
*> 2002:0:4:3::4/128     2002:0:2:1::2     0                       0         65000 65200 i 

(Network: Announced network on router or network received via BGP neighbor ; Next Hop: IPv6 address to which a packet received for this network should be forwarded ; Metic: MED attribue of BGP ; LocPrf: local preference attribute of BGP ; Weight: weight attribute of BGP ; Path: AS numbers from where the route has passed before coming to this router)

R2#sh bgp ipv6 unicast 

BGP table version is 9, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
r RIB-failure, S Stale

Origin codes: i – IGP, e – EGP, ? – incomplete

Network                    Next Hop                   Metric     LocPrf      Weight      Path  
*> 2002:0:1:2::1/128       2002:0:1:1::1                 0                      0        65100 i 
*> 2002:0:1:3::1/128       2002:0:1:1::1                 0                      0        65100 i 
*> 2002:0:2:2::2/128       ::                            0                    32768        i 
*> 2002:0:2:3::2/128       ::                            0                    32768        i 
*>i2002:0:3:2::3/128       2001::23:C803:6FF:FEAF:38     0         100          0          i 
*>i2002:0:3:3::3/128       2001::23:C803:6FF:FEAF:38     0         100          0          i 
*>i2002:0:4:2::4/128       2002:0:4:1::4                 0         100          0        65200 i 
*>i2002:0:4:3::4/128       2002:0:4:1::4                 0         100          0        65200 i
R3#sh bgp ipv6 unicast 

BGP table version is 9, local router ID is 3.3.3.3 
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal, 
r RIB-failure, S Stale 
Origin codes: i – IGP, e – EGP, ? – incomplete 

Network                    Next Hop                   Metric     LocPrf      Weight      Path 
*>i2002:0:1:2::1/128       2002:0:1:1::1                0         100          0         65100 i 
*>i2002:0:1:3::1/128       2002:0:1:1::1                0         100          0         65100 i 
*>i2002:0:2:2::2/128       2001::23:C802:6FF:FEAF:38    0         100          0           i 
*>i2002:0:2:3::2/128       2001::23:C802:6FF:FEAF:38    0         100          0           i 
*> 2002:0:3:2::3/128       ::                           0                    32768         i 
*> 2002:0:3:3::3/128       ::                           0                    32768         i 
*> 2002:0:4:2::4/128       2002:0:4:1::4                0                      0         65200 i 
*> 2002:0:4:3::4/128       2002:0:4:1::4                0                      0         65200 i 
R4#sh bgp ipv6 unicast

BGP table version is 9, local router ID is 4.4.4.4 
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal, 
r RIB-failure, S Stale 
Origin codes: i – IGP, e – EGP, ? – incomplete 

Network                  Next Hop        Metric      LocPrf      Weight     Path 
*> 2002:0:1:2::1/128     2002:0:3:1::3     0                       0        65000 65100 i 
*> 2002:0:1:3::1/128     2002:0:3:1::3     0                       0        65000 65100 i 
*> 2002:0:2:2::2/128     2002:0:3:1::3     0                       0        65000 i 
*> 2002:0:2:3::2/128     2002:0:3:1::3     0                       0        65000 i 
*> 2002:0:3:2::3/128     2002:0:3:1::3     0                       0        65000 i 
*> 2002:0:3:3::3/128     2002:0:3:1::3     0                       0        65000 i 
*> 2002:0:4:2::4/128     ::                0                     32768       i 
*> 2002:0:4:3::4/128     ::                0                     32768       i

Verification of basic BGP Rules

e-BGP neighbors should be directly connected

Changes on R1:

R1(config)#router bgp 65100 
R1(config-router)#no neigh 2002:0:2:1::2 ebgp-multihop 5 

(#neigh 2002:0:2:1::2 ebgp-multihop 5 increases TTL value for e-BGP by 5; By default TTL value in IP header for e-BGP is 1. So neighbors should be only one hop away or directly connected.)

Verification:

R1#sh bgp ipv6 unicast neigh

BGP neighbor is 2002:0:2:1::2, remote AS 65000, external link 
BGP version 4, remote router ID 0.0.0.0 
BGP state = Idle

(Neighborship stuck in Idle state i.e. TCP session can not be formed, there must be some error in my configurations)

R2#sh bgp ipv6 unicast neighbors 

BGP neighbor is 2001::23:C803:6FF:FEAF:38, remote AS 65000, internal link 
BGP version 4, remote router ID 0.0.0.0 
BGP state = Active 

(Neighborship stuck in Active state i.e. Link is up, sending BGP keepalives but none received from neighbor)

i-BGP neighbors need not to be directly connected
Changes on R2: 

R2(config)#router bgp 65000 
R2(config-router)#no neighbor 2001::23:C803:6FF:FEAF:38 remote-as 65000
R2(config-router)#neighbor 2002:0:3:1::3 remote-as 65000 
R2(config-router)#neighbor 2002:0:3:1::3 update-source Loopback0 
R2(config-router)#address-family ipv6 
R2(config-router-af)#neighbor 2002:0:3:1::3 activate 
Changes on R3: 
R3(config)#router bgp 65000 
R3(config-router)#neighbor 2001::23:C802:6FF:FEAF:38 remote-as 65000
R3(config-router)#neighbor 2002:0:2:1::2 remote-as 65000 
R3(config-router)#address-family ipv6 
R3(config-router-af)#neighbor 2002:0:2:1::2 activate

Verification:

R2#sh bgp ipv6 unicast neighbors

BGP neighbor is 2002:0:3:1::3, remote AS 65000, internal link 
BGP version 4, remote router ID 3.3.3.3
BGP state = Established, up for 00:02:16 
Last read 00:00:26, last write 00:00:21, hold time is 180, keepalive interval is 60 seconds
R3#sh bgp ipv6 unicast neighbors

BGP neighbor is 2002:0:2:1::2, remote AS 65000, internal link 
BGP version 4, remote router ID 2.2.2.2 
BGP state = Established, up for 00:01:09 
Last read 00:00:11, last write 00:00:17, hold time is 180, keepalive interval is 60 seconds 

(On router R3, even we do not need to tell which source to use, R3 just replies by source IP which has been addressed by R2 in its keepalive.)