IPv6 - BGP Multi Homed
BGP Multi Homed
IPv6 BGP (Border Gateway Protocol) Multi-Homed refers to a networking scenario in which a network or an autonomous system (AS) is connected to the Internet through multiple service providers. In a multi-homed IPv6 BGP environment, the network is associated with more than one BGP router or service provider. This configuration provides increased reliability, load balancing, and redundancy. BGP plays a crucial role in this setup, allowing the network to advertise its IPv6 address space to multiple service providers, and the providers, in turn, propagate these routes throughout the Internet. Multi-homing with IPv6 BGP is commonly employed by large enterprises, data centers, or service providers to enhance network resilience, optimize traffic distribution, and ensure continuous Internet connectivity, even if one of the service providers experiences a connectivity issue. Effective management of BGP attributes and policies is essential in a multi-homed IPv6 BGP environment to control inbound and outbound traffic flows across the diverse Internet connections.
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
ipv6 cef
!
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
!
interface Serial1/1
ipv6 address 2001:0:0:13::1/64
serial restart-delay 0
!
router bgp 65100
bgp router-id 1.1.1.1
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 2001:0:0:13::3 remote-as 65000
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
Loopback0
!
address-family ipv6
no synchronization
network 2002:0:1:2::1/128
network 2002:0:1:3::1/128
neighbor 2001:0:0:13::3 activate
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
ipv6 cef
!
interface Loopback0
no ip address
ipv6 address 2002:0:4:1::4/128
!
interface Loopback1
no ip address
ipv6 address 2002:0:4:2::4/128
!
interface Loopback2
no ip address
ipv6 address 2002:0:4:3::4/128
!
interface Serial1/0
no ip address
ipv6 address 2001:0:0:34::4/128
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
no synchronization
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 route 2001:0:0:34::3/128 Serial1/0
ipv6 route 2002:0:3:1::3/128 Serial1/0
!
R2 Router Config:
!
ipv6 unicast-routing
ipv6 cef
!
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:CFF:FE78: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
no synchronization
network 2002:0:2:2::2/128
network 2002:0:2:3::2/128
neighbor 2001::23:C803:CFF:FE78: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
!
R3 Router Config:
!
ipv6 unicast-routing
ipv6 cef
!
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
no fair-queue
serial restart-delay 0
clock rate 64000
!
interface Serial1/1
no ip address
ipv6 address 2001:0:0:13::3/64
serial restart-delay 0
!
interface FastEthernet2/0
mac-address ca03.0c78.0038
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:0:0:13::1 remote-as 65100
neighbor 2001::23:C802:CFF:FE78: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
no synchronization
network 2002:0:3:2::3/128
network 2002:0:3:3::3/128
neighbor 2001:0:0:13::1 activate
neighbor 2001::23:C802:CFF:FE78:38
activate
neighbor 2001::23:C802:CFF:FE78:38
next-hop-self
neighbor 2002:0:4:1::4 activate
exit-address-family
!
ipv6 route 2001:0:0:34::4/128 Serial1/0
ipv6 route 2002:0:4:1::4/128 Serial1/0
!
ipv6 router ospf 1
router-id 3.3.3.3
log-adjacency-changes
!
Note 1: In above topology OSPFv3 has been run over R1, R2 and R3 within same area AREA 0.
Note 2: Static routes has been used between R3 and R4 for reachability.
Verification:
Observation 1:
R1#sh bgp ipv6 unicast
BGP table version is 15, 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 2001:0:0:13::3 0 0 65000 i
* 2002:0:2:1::2 0 0 65000 i
*> 2002:0:2:3::2/128 2001:0:0:13::3 0 0 65000 i
* 2002:0:2:1::2 0 0 65000 i
*> 2002:0:3:2::3/128 2001:0:0:13::3 0 0 65000 i
* 2002:0:2:1::2 0 0 65000 i
*> 2002:0:3:3::3/128 2001:0:0:13::3 0 0 65000 i
* 2002:0:2:1::2 0 0 65000 i
*> 2002:0:4:2::4/128 2001:0:0:13::3 0 0 65000 65200 i
* 2002:0:2:1::2 0 0 65000 65200 i
*> 2002:0:4:3::4/128 2001:0:0:13::3 0 0 65000 65200 i
* 2002:0:2:1::2 0 0 65000 65200 i
In above MP-BGP table R1 has learnt the following routes 2002:0:1:2::1/128 2002:0:1:3::1/128 2002:0:2:2::2/128 2002:0:2:3::2/128 2002:0:3:2::3/128 2002:0:3:3::3/128 2002:0:4:2::4/128 2002:0:4:3::4/128 from two neighbors 2001:0:0:13::3 and 2002:0:2:1::2 and both are valid paths.
But path with next hop 2001:0:0:13::3 are best because those are learnt via neighbor which is only one hop away. [R1(config-router)#neighbor 2002:0:2:1::2 ebgp-multihop 5 – this command is used for BGP neighbors who are more than 1 hop away from each other.]
Observation 2:
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
* i 2002:0:1:2::1/128 2001::23:C803:CFF:FE78:38 0 100 0 65100 i
*> 2002:0:1:1::1 0 0 65100 i
* i2002:0:1:3::1/128 2001::23:C803:CFF:FE78:38 0 100 0 65100 i
*> 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
*>i 2002:0:3:2::3/128 2001::23:C803:CFF:FE78:38 0 100 0 i
*>i 2002:0:3:3::3/128 2001::23:C803:CFF:FE78:38 0 100 0 i
*>i 2002:0:4:2::4/128 2001::23:C803:CFF:FE78:38 0 100 0 65200 i
*>i 2002:0:4:3::4/128 2001::23:C803:CFF:FE78:38 0 100 0 65200 i
R2#sh ipv6 route
IPv6 Routing Table – default – 17 entries
Codes: C – Connected, L – Local, S – Static, U – Per-user Static route
B – BGP, HA – Home Agent, MR – Mobile Router, R – RIP
I1 – ISIS L1, I2 – ISIS L2, IA – ISIS interarea, IS – ISIS summary
D – EIGRP, EX – EIGRP external, ND – Neighbor Discovery
O – OSPF Intra, OI – OSPF Inter, OE1 – OSPF ext 1, OE2 – OSPF ext 2
ON1 – OSPF NSSA ext 1, ON2 – OSPF NSSA ext 2
C 2001:0:0:12::/64 [0/0]
via Serial1/0, directly connected
O 2001:0:0:12::1/128 [110/64]
via FE80::C801:5FF:FEFA:0, Serial1/0
L 2001::12:C802:5FF:FEFA:0/128 [0/0]
via Serial1/0, receive
C 2001:0:0:23::/64 [0/0]
via FastEthernet2/0, directly connected
L 2001::23:C802:CFF:FE78:38/128 [0/0]
via FastEthernet2/0, receive
O 2002:0:1:1::1/128 [110/64]
via FE80::C801:5FF:FEFA:0, Serial1/0
B 2002:0:1:2::1/128 [20/0]
via 2002:0:1:1::1
B 2002:0:1:3::1/128 [20/0]
via 2002:0:1:1::1
LC 2002:0:2:1::2/128 [0/0]
via Loopback0, receive
LC 2002:0:2:2::2/128 [0/0]
via Loopback1, receive
LC 2002:0:2:3::2/128 [0/0]
via Loopback2, receive
O 2002:0:3:1::3/128 [110/1]
via FE80::C803:CFF:FE78:38, FastEthernet2/0
O 2002:0:3:2::3/128 [110/1]
via FE80::C803:CFF:FE78:38, FastEthernet2/0
O 2002:0:3:3::3/128 [110/1]
via FE80::C803:CFF:FE78:38, FastEthernet2/0
B 2002:0:4:2::4/128 [200/0]
via 2001::23:C803:CFF:FE78:38
B 2002:0:4:3::4/128 [200/0]
via 2001::23:C803:CFF:FE78:38
L FF00::/8 [0/0]
via Null0, receive
While comparing BGP table and Routing Table for IPv6 we can notice:
- Routes 2002:0:3:2::3/128, 2002:0:3:3::3/128 are learnt through iBGP and are valid & best still those routes are not installed in routing table because AD value for routes learnt from iBGP is 200 whereas AD value learnt form OSPF is
- Hence those routes learnt via OSPF are installed in routing table.
- Similarly, routes 2001:0:1:2::1/128 and 2001:0:1:3::1/128 are learnt via iBGP and eBGP, but via eBGP are best due to lower AD value for eBGP