BFD for IPv6 BGP configuration example
Network requirements
As shown in Figure 77, configure OSPFv3 as the IGP in AS 200.
Establish two IBGP connections between Switch A and Switch C. When both paths operate correctly, Switch C uses the path Switch A<—>Switch B<—>Switch C to exchange packets with network 1200::0/64.
Configure BFD over the path. When the path fails, BFD can quickly detect the failure and notify it to IPv6 BGP. Then, the path Switch A<—>Switch D<—>Switch C takes effect immediately.
Figure 77: Network diagram
Table 18: Interface and IP address assignment
Device | Interface | IP address | Device | Interface | IP address |
---|---|---|---|---|---|
Switch A | Vlan-int100 | 3000::1/64 | Switch C | Vlan-int101 | 3001::3/64 |
Vlan-int200 | 2000::1/64 | Vlan-int201 | 2001::3/64 | ||
Switch B | Vlan-int100 | 3000::2/64 | Switch D | Vlan-int200 | 2000::2/64 |
Vlan-int101 | 3001::2/64 | Vlan-int201 | 2001::2/64 |
Configuration procedure
Configure IPv6 addresses for interfaces. (Details not shown.)
Configure OSPFv3 so that Switch A and Switch C can reach each other. (Details not shown.)
Configure IPv6 BGP on Switch A:
# Establish two IBGP connections to Switch C.
<SwitchA> system-view [SwitchA] bgp 200 [SwitchA-bgp] router-id 1.1.1.1 [SwitchA-bgp] peer 3001::3 as-number 200 [SwitchA-bgp] peer 2001::3 as-number 200 [SwitchA-bgp] address-family ipv6 [SwitchA-bgp-ipv6] peer 3001::3 enable [SwitchA-bgp-ipv6] peer 2001::3 enable [SwitchA-bgp-ipv6] quit
# Create IPv6 ACL 2000 to permit 1200::0/64 to pass.
[SwitchA] acl ipv6 number 2000 [SwitchA-acl6-basic-2000] rule permit source 1200:: 64 [SwitchA-acl6-basic-2000] quit
# Create two route policies, apply_med_50 and apply_med_100. Policy apply_med_50 sets the MED for route 1200::0/64 to 50. Policy apply_med_100 sets that to 100.
[SwitchA] route-policy apply_med_50 permit node 10 [SwitchA-route-policy-apply_med_50-10] if-match ipv6 address acl 2000 [SwitchA-route-policy-apply_med_50-10] apply cost 50 [SwitchA-route-policy-apply_med_50-10] quit [SwitchA] route-policy apply_med_100 permit node 10 [SwitchA-route-policy-apply_med_100-10] if-match ipv6 address acl 2000 [SwitchA-route-policy-apply_med_100-10] apply cost 100 [SwitchA-route-policy-apply_med_100-10] quit
# Apply routing policy apply_med_50 to routes outgoing to peer 3001::3, and apply routing policy apply_med_100 to routes outgoing to peer 2001::3.
[SwitchA] bgp 200 [SwitchA-bgp] address-family ipv6 unicast [SwitchA-bgp-ipv6] peer 3001::3 route-policy apply_med_50 export [SwitchA-bgp-ipv6] peer 2001::3 route-policy apply_med_100 export [SwitchA-bgp-ipv6] quit
# Enable BFD for peer 3001::3.
[SwitchA-bgp] peer 3001::3 bfd [SwitchA-bgp] quit
Configure IPv6 BGP on Switch C:
# Establish two IBGP connections to Switch A.
<SwitchC> system-view [SwitchC] bgp 200 [SwitchC-bgp] router-id 3.3.3.3 [SwitchC-bgp] peer 3000::1 as-number 200 [SwitchC-bgp] peer 2000::1 as-number 200 [SwitchC-bgp] address-family ipv6 [SwitchC-bgp-ipv6] peer 3000::1 enable [SwitchC-bgp-ipv6] peer 2000::1 enable [SwitchC-bgp-ipv6] quit
# Enable BFD for peer 3001::1.
[SwitchC-bgp] peer 3000::1 bfd [SwitchC-bgp] quit [SwitchC] quit
Verifying the configuration
# Display detailed BFD session information on Switch C.
<SwitchC> display bfd session verbose Total Session Num: 1 Up Session Num: 1 Init Mode: Active IPv6 Session Working Under Ctrl Mode: Local Discr: 513 Remote Discr: 513 Source IP: 3001::3 Destination IP: 3000::1 Session State: Up Interface: N/A Min Tx Inter: 500ms Act Tx Inter: 500ms Min Rx Inter: 500ms Detect Inter: 2500ms Rx Count: 13 Tx Count: 14 Connect Type: Indirect Running Up for: 00:00:05 Hold Time: 2243ms Auth mode: None Detect Mode: Async Slot: 0 Protocol: BGP6 Diag Info: No Diagnostic
The output shows that a BFD session has been established between Switch A and Switch C.
# Display BGP peer information on Switch C.
<SwitchC> display bgp peer ipv6 BGP local router ID: 3.3.3.3 Local AS number: 200 Total number of peers: 2 Peers in established state: 2 Peer AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State 2000::1 200 8 8 0 0 00:04:45 Established 3000::1 200 5 4 0 0 00:01:53 Established
The output shows that Switch C has established two BGP connections with Switch A, and both connections are in Established state.
# Display route 1200::0/64 on Switch C.
<SwitchC> display ipv6 routing-table 1200::0 64 verbose Summary Count : 1 Destination: 1200::/64 Protocol: BGP4+ Process ID: 0 SubProtID: 0x1 Age: 00h01m07s Cost: 50 Preference: 255 Tag: 0 State: Active Adv OrigTblID: 0x1 OrigVrf: default-vrf TableID: 0xa OrigAs: 0 NBRID: 0x25000001 LastAs: 0 AttrID: 0x1 Neighbor: 3000::1 Flags: 0x10060 OrigNextHop: 3000::1 Label: NULL RealNextHop: FE80::20C:29FF:FE4A:3873 BkLabel: NULL BkNextHop: N/A Tunnel ID: Invalid Interface: Vlan-interface101 BkTunnel ID: Invalid BkInterface: N/A
The output shows that Switch C communicates with network 1200::0/64 through the path Switch C<—>Switch B<—>Switch A.
# Break down the path Switch C<—>Switch B<—>Switch A and then display route 1200::0/64 on Switch C.
<SwitchC> display ipv6 routing-table 1200::0 64 verbose Summary Count : 1 Destination: 1200::/64 Protocol: BGP4+ Process ID: 0 SubProtID: 0x1 Age: 00h00m57s Cost: 100 Preference: 255 Tag: 0 State: Active Adv OrigTblID: 0x1 OrigVrf: default-vrf TableID: 0xa OrigAs: 0 NBRID: 0x25000000 LastAs: 0 AttrID: 0x0 Neighbor: 2000::1 Flags: 0x10060 OrigNextHop: 2000::1 Label: NULL RealNextHop: FE80::20C:29FF:FE40:715 BkLabel: NULL BkNextHop: N/A Tunnel ID: Invalid Interface: Vlan-interface201 BkTunnel ID: Invalid BkInterface: N/A
The output shows that Switch C communicates with network 1200::0/64 through the path Switch C<—>Switch D<—>Switch A.