Network Requirements
- Set up EBGP neighbors between Device1 and Device2 and between Device1 and Device3, and set up IBGP neighbors between Device2 and Device3.
- Device1 learns EBGP route 2001:3::/64 both from Device2 and Device3, and Device1 selects to forward data to the network segment 2001:3::/64 through Device2.
- On Device1 and Device2, configure EBGP to coordinate with BFD. When the line between Device1 and Device2 becomes faulty, BFD can quickly detect the fault and notify BGP of the fault. Then Device1 selects to forward data to network segment 2001:3::/64 through Device3.
Network Topology
![Networking for configuring IPv6 BGP to coordinate with BFD](/storage/images/Document/Maipu/unicast-routing/config-ipv6-bgp-with-bgp.jpg)
Figure 13–7 Networking for configuring IPv6 BGP to coordinate with BFD
Configuration Steps
Step 1: Configure the IPv6 global unicast addresses of the interfaces. (Omitted)
Step 2: Configure OSPFv3 so that loopback routes are reachable between devices.
#Configure Device2.
Device2#configure terminal
Device2(config)#ipv6 router ospf 100
Device2(config-ospf6)#router-id 2.2.2.2
Device2(config-ospf6)#exit
Device2(config)# interface vlan3
Device2(config-if-vlan3)#ipv6 router ospf 100 area 0
Device2(config-if-vlan3)#exit
Device2(config)#interface loopback 0
Device2(config-if-loopback0)#ipv6 router ospf 100 area 0
Device2(config-if-loopback0)#exit
|
#Configure Device3.
Device3#configure terminal
Device3(config)#ipv6 router ospf 100
Device3(config-ospf6)#router-id 3.3.3.3
Device3(config-ospf6)#exit
Device3(config)#interface vlan3
Device3(config-if-vlan3)#ipv6 router ospf 100 area 0
Device3(config-if-vlan3)#exit
Device3(config)# interface loopback 0
Device3(config-if-loopback0)#ipv6 router ospf 100 area 0
Device3(config-if-loopback0)#exit
|
#View the route table of Device2.
Device2#show ipv6 route
Codes: C - Connected, L - Local, S - static, R - RIP, B - BGP, i-ISIS
U - Per-user Static route
O - OSPF, OE-OSPF External, M - Management
L ::1/128 [0/0]
via ::, 1w2d:09:31:22, lo0
LC 2::2/128 [0/0]
via ::, 00:10:10, loopback0
O 3::3/128 [110/1]
via fe80::201:7aff:fec0:525a, 00:00:12, vlan3
C 2001:1::/64 [0/0]
via ::, 00:10:54, vlan2
L 2001:1::2/128 [0/0]
via ::, 00:10:53, lo0
C 2001:3::/64 [0/0]
via ::, 00:10:17, vlan3
L 2001:3::2/128 [0/0]
via ::, 00:10:16, lo0
#View the route table of Device3.
Device3#show ipv6 route
Codes: C - Connected, L - Local, S - static, R - RIP, B - BGP, i-ISIS
U - Per-user Static route
O - OSPF, OE-OSPF External, M - Management
L ::1/128 [0/0]
via ::, 1w6d:03:50:38, lo0
O 2::2/128 [110/2]
via fe80::201:7aff:fe5e:6d2e, 00:02:40, vlan3
LC 3::3/128 [0/0]
via ::, 00:00:49, loopback0
C 2001:2::/64 [0/0]
via ::, 00:03:03, vlan2
L 2001:2::2/128 [0/0]
via ::, 00:03:02, lo0
C 2001:3::/64 [0/0]
via ::, 00:03:18, vlan3
L 2001:3::1/128 [0/0]
via ::, 00:03:17, lo0
According to the route table, Device2 and Device3 have learnt the routes of the loopback interfaces of each other.
Step 3: Configure an ACL and routing policy to set the metric of a route.
#Configure Device1.
Device1#configure terminal
Device1(config)#ipv6 access-list extended 7001
Device1(config-v6-list)#permit ipv6 2001:3::/64 any
Device1(config-v6-list)#commit
Device1(config-v6-list)#exit
Device1(config)#route-map SetMetric
Device1(config-route-map)#match ipv6 address 7001
Device1(config-route-map)#set metric 50
Device1(config-route-map)#exit
|
The routing policy that is configured on Device1 sets the metric of route 2001:3::/64 to 50.
Step 4: Configure the IPv6 BGP basic functions, and associate Device1 the routing policy.
#Configure Device1.
Device1(config)#router bgp 100
Device1(config-bgp)#bgp router-id 1.1.1.1
Device1(config-bgp)#address-family ipv6
Device1(config-bgp-af)#neighbor 2001:1::2 remote-as 200
Device1(config-bgp-af)#neighbor 2001:2::2 remote-as 200
Device1(config-bgp-af)#neighbor 2001:2::2 route-map SetMetric in
Device1(config-bgp-af)#exit-address-family
Device1(config-bgp)#exit
|
#Configure Device2.
Device2(config)#router bgp 200
Device2(config-bgp)#bgp router-id 2.2.2.2
Device2(config-bgp)#address-family ipv6
Device2(config-bgp-af)#neighbor 2001:1::1 remote-as 100
Device2(config-bgp-af)#neighbor 3::3 remote-as 200
Device2(config-bgp-af)#network 2001:3::/64
Device2(config-bgp-af)#exit-address-family
Device2(config-bgp)#neighbor 3::3 update-source loopback 0
Device2(config-bgp)#exit
|
#Configure Device3.
Device3(config)#router bgp 200
Device3(config-bgp)#bgp router-id 3.3.3.3
Device3(config-bgp)#address-family ipv6
Device3(config-bgp-af)#neighbor 2001:2::1 remote-as 100
Device3(config-bgp-af)#neighbor 2::2 remote-as 200
Device3(config-bgp-af)#network 2001:3::/64
Device3(config-bgp-af)#exit-address-family
Device3(config-bgp)#neighbor 2::2 update-source loopback 0
Device3(config-bgp)#exit
|
After a routing policy is configured on the peer, you need to reset the peer.
#On Device1, check the IPv6 BGP neighbor status.
Device1#show bgp ipv6 unicast summary
BGP router identifier 1.1.1.1, local AS number 100
BGP table version is 2
2 BGP AS-PATH entries 0
BGP community entries
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2001:1::2 4 200 7 6 2 0 0 00:04:00 1
2001:2::2 4 200 5 5 2 0 0 00:02:03 1
Total number of neighbors 2
#On Device2, check the IPv6 BGP neighbor status.
Device2#show bgp ipv6 unicast 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 MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
3::3 4 200 5 5 2 0 0 00:02:10 1
2001:1::1 4 100 6 7 2 0 0 00:04:38 0
Total number of neighbors 2
IPv6 BGP neighbors between Device1, Device2, and Device3 have been set up successfully.
Device1#show bgp ipv6 unicast
BGP table version is 2, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
[B]* 2001:3::/64 2001:2::2 50 0 200 i
[B]*> 2001:1::2 0 0 200 i
Device1#show ipv6 route
Codes: C - Connected, L - Local, S - static, R - RIP, B - BGP, i-ISIS
U - Per-user Static route
O - OSPF, OE-OSPF External, M - Management
L ::1/128 [0/0]
via ::, 1w2d:09:53:27, lo0
C 2001:1::/64 [0/0]
via ::, 00:24:05, vlan2
L 2001:1::1/128 [0/0]
via ::, 00:24:02, lo0
C 2001:2::/64 [0/0]
via ::, 00:25:21, vlan3
L 2001:2::1/128 [0/0]
via ::, 00:25:20, lo0
B 2001:3::/64 [20/0]
via 2001:1::2, 00:05:06, vlan2
According to the route table, route 2001:3::/64 of Device1 selects Device2 as the next-hop device.
Step 5: Configure IPv6 BGP to link with BFD.
#Configure Device1.
Device1(config)#router bgp 100
Device1(config-bgp)#address-family ipv6
Device1(config-bgp-af)#neighbor 2001:1::2 fall-over bfd
Device1(config-bgp-af)#exit-address-family
Device1(config-bgp)#exit
Device1(config)#interface vlan 2
Device1(config-if-vlan2)#bfd min-transmit-interval 500
Device1(config-if-vlan2)#bfd min-receive-interval 500
Device1(config-if-vlan2)#bfd multiplier 4
Device1(config-if-vlan2)#exit
|
#Configure Device2.
Device2(config)#router bgp 200
Device2(config-bgp)#address-family ipv6
Device2(config-bgp-af)#neighbor 2001:1::1 fall-over bfd
Device2(config-bgp-af)#exit-address-family
Device2(config-bgp)#exit
Device2(config)#interface vlan 2
Device2(config-if-vlan2)#bfd min-transmit-interval 500
Device2(config-if-vlan2)#bfd min-receive-interval 500
Device2(config-if-vlan2)#bfd multiplier 4
Device2(config-if-vlan2)#exit
|
BFD is enabled between EBGP neighbors Device1 and Device2, and the minimum transmit interval, minimum receive interval, and detection timeout multiple of the BFD control packets have been modified.
Step 6: Check the result.
#On Device1, query the BFD session status.
Device1#show bfd session ipv6
OurAddr NeighAddr State Holddown Interface
2001:1::1 2001:1::2 UP 2000 vlan2
#If the line between Device1 and Device2 becomes faulty, the route can quickly switch over to the backup line.
#View the route table of Device1.
Device1#show bgp ipv6 unicast
BGP table version is 3, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
[B]*> 2001:3::/64 2001:2::2 50 0 200 i
Device1#show ipv6 route
Codes: C - Connected, L - Local, S - static, R - RIP, B - BGP, i-ISIS
U - Per-user Static route
O - OSPF, OE-OSPF External, M - Management
L ::1/128 [0/0]
via ::, 1w2d:10:06:30, lo0
C 2001:1::/64 [0/0]
via ::, 00:37:08, vlan2
L 2001:1::1/128 [0/0]
via ::, 00:37:04, lo0
C 2001:2::/64 [0/0]
via ::, 00:38:24, vlan3
L 2001:2::1/128 [0/0]
via ::, 00:38:23, lo0
B 2001:3::/64 [20/0]
via 2001:2::2, 00:00:16, vlan3
The next hop of route 2001:3::/64 is Device3.