Configuring BGP FRR
When a link fails, the packets on the link are discarded, and a routing loop might occur until BGP completes routing convergence based on the new network topology.
You can enable BGP fast reroute (FRR) to resolve this issue.
Figure 66: Network diagram for BGP FRR
After you configure FRR on Router B as shown in Figure 66, BGP generates a backup next hop Router C for the primary route. BGP uses ARP (for IPv4), echo-mode BFD (for IPv4), or ND (for IPv6) to detect the connectivity to Router D. When the link to Router D fails, BGP directs packets to the backup next hop. At the same time, BGP calculates a new optimal route, and forwards packets over the optimal route.
You can use the following methods to configure BGP FRR:
Method 1—Execute the pic command in BGP address family view. BGP calculates a backup next hop for each BGP route in the address family if there are two or more unequal-cost routes that reach the destination.
Method 2—Execute the fast-reroute route-policy command to use a routing policy in which a backup next hop is specified by using the command apply [ ipv6 ] fast-reroute backup-nexthop. The backup next hop calculated by BGP must be the same as the specified backup next hop. Otherwise, BGP does not generate a backup next hop for the primary route. You can also configure if-match clauses in the routing policy to identify the routes protected by FRR.
If both methods are configured, Method 2 takes precedence over Method 1.
BGP supports FRR for IPv4 and IPv6 unicast routes, but not for IPv4 and IPv6 multicast routes.
To configure BGP FRR (IPv4 unicast address family):
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. Configure the source address of echo packets. | bfd echo-source-ip ipv4-address | By default, no source address is specified for echo packets. This step is required when echo-mode BFD is used to detect the connectivity to the next hop of the primary route. Specify a source IP address that does not belong to any local network. For more information about this command, see High Availability Command Reference. |
3. Create a routing policy and enter routing policy view. | route-policy route-policy-name permit node node-number | By default, no routing policies exist. This step is required when Method 2 is used to enable BGP FRR. For more information about this command, see Layer 3—IP Routing Command Reference. |
4. Set the backup next hop for FRR. | apply fast-reroute backup-nexthop ipv4-address | By default, no backup next hop is set. This step is required when Method 2 is used to enable BGP FRR. For more information about this command, see Layer 3—IP Routing Command Reference. |
5. Return to system view. | quit | N/A |
6. Enter BGP instance view. | bgp as-number [ instance instance-name ] | N/A |
7. (Optional.) Use echo-mode BFD to detect the connectivity to the next hop of the primary route. | primary-path-detect bfd echo | By default, ARP is used to detect the connectivity to the next hop. |
8. (Optional.) Enter BGP-VPN instance view. | ip vpn-instance vpn-instance-name | N/A |
9. Enter BGP IPv4 unicast address family view or BGP-VPN IPv4 unicast address family view. | address-family ipv4 [ unicast ] | N/A |
10. Enable BGP FRR. |
| By default, BGP FRR is disabled. Method 1 might result in routing loops. Use it with caution. By default, no routing policy is applied. The apply fast-reroute backup-nexthop and apply ipv6 fast-reroute backup-nexthop commands can take effect in the applied routing policy. Other apply commands do not take effect. |
To configure BGP FRR (IPv6 unicast address family):
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. Create a routing policy and enter routing policy view. | route-policy route-policy-name permit node node-number | By default, no routing policies exist. This step is required when Method 2 is used to enable BGP FRR. For more information about this command, see Layer 3—IP Routing Command Reference. |
3. Set the backup next hop for FRR. | apply ipv6 fast-reroute backup-nexthop ipv6-address | By default, no backup next hop is set. This step is required when Method 2 is used to enable BGP FRR. For more information about this command, see Layer 3—IP Routing Command Reference. |
4. Return to system view. | quit | N/A |
5. Enter BGP instance view or BGP-VPN instance view. |
| N/A |
6. Enter BGP IPv6 unicast address family view or BGP-VPN IPv6 unicast address family view. | address-family ipv6 [ unicast ] | N/A |
7. Enable BGP FRR. |
| By default, BGP FRR is disabled. Method 1 might result in routing loops. Use it with caution. By default, no routing policy is applied. The apply fast-reroute backup-nexthop and apply ipv6 fast-reroute backup-nexthop commands can take effect in the applied routing policy. Other apply commands do not take effect. |