OSPFv3 FRR configuration example
Network requirements
As shown in Figure 111, Switch A, Switch B, and Switch C reside in the same OSPFv3 domain. Configure OSPFv3 FRR so that when Link A fails, traffic is immediately switched to Link B.
Figure 111: Network diagram
Table 27: Interface and IP address assignment
Device | Interface | IP address | Device | Interface | IP address |
---|---|---|---|---|---|
Switch A | Vlan-int100 | 1::1/64 | Switch B | Vlan-int101 | 3::1/64 |
Vlan-int200 | 2::1/64 | Vlan-int200 | 2::2/64 | ||
Loop0 | 10::1/128 | Loop0 | 20::1/128 | ||
Switch C | Vlan-int100 | 1::2/64 | |||
Vlan-int101 | 3::2/64 |
Configuration procedure
Configure IPv6 addresses and subnet masks for interfaces on the switches. (Details not shown.)
Configure OSPFv3 on the switches to ensure that Switch A, Switch B, and Switch C can communicate with each other at the network layer. (Details not shown.)
Configure OSPFv3 FRR to automatically calculate the backup next hop:
You can enable OSPFv3 FRR to either calculate a backup next hop by using the LFA algorithm, or specify a backup next hop by using a routing policy.
(Method 1.) Enable OSPFv3 FRR to calculate the backup next hop by using the LFA algorithm:
# Configure Switch A.
<SwitchA> system-view [SwitchA] ospfv3 1 [SwitchA-ospfv3-1] fast-reroute lfa [SwitchA-ospfv3-1] quit
# Configure Switch B.
<SwitchB> system-view [SwitchB] ospfv3 1 [SwitchB-ospfv3-1] fast-reroute lfa [SwitchB-ospfv3-1] quit
(Method 2.) Enable OSPFv3 FRR to designate a backup next hop by using a routing policy:
# Configure Switch A.
<SwitchA> system-view [SwitchA] ipv6 prefix-list abc index 10 permit 10:: 128 [SwitchA] route-policy frr permit node 10 [SwitchA-route-policy-frr-10] if-match ipv6 address prefix-list abc [SwitchA-route-policy-frr-10] apply ipv6 fast-reroute backup-interface vlan-interface 100 backup-nexthop 1::2/64 [SwitchA-route-policy-frr-10] quit [SwitchA] ospfv3 1 [SwitchA-ospfv3-1] fast-reroute route-policy frr [SwitchA-ospfv3-1] quit
# Configure Switch B.
<SwitchB> system-view [SwitchB] ipv6 prefix-list abc index 10 permit 20:: 128 [SwitchB] route-policy frr permit node 10 [SwitchB-route-policy-frr-10] if-match ipv6 address prefix-list abc [SwitchB-route-policy-frr-10] apply ipv6 fast-reroute backup-interface vlan-interface 101 backup-nexthop 3::2/64 [SwitchB-route-policy-frr-10] quit [SwitchB] ospfv3 1 [SwitchB-ospfv3-1] fast-reroute route-policy frr [SwitchB-ospfv3-1] quit
Verifying the configuration
# Display the route 20::1/128 on Switch A to view the backup next hop information.
[SwitchA] display ipv6 routing-table 20::1 128 verbose Summary count : 1 Destination: 20::1/128 Protocol: O_INTRA Process ID: 1 SubProtID: 0x1 Age: 00h03m45s Cost: 6 Preference: 10 IpPre: N/A QosLocalID: N/A Tag: 0 State: Active Adv OrigTblID: 0x0 OrigVrf: default-vrf TableID: 0xa OrigAs: 0 NibID: 0x23000005 LastAs: 0 AttrID: 0xffffffff Neighbor: :: Flags: 0x10041 OrigNextHop: FE80::7685:45FF:FEAD:102 Label: NULL RealNextHop: FE80::7685:45FF:FEAD:102 BkLabel: NULL BkNextHop: FE80::34CD:9FF:FE2F:D02 Tunnel ID: Invalid Interface: Vlan-interface200 BkTunnel ID: Invalid BkInterface: Vlan-interface100 FtnIndex: 0x0 TrafficIndex: N/A Connector: N/A
# Display the route 10::1/128 on Switch B to view the backup next hop information.
[SwitchB] display ipv6 routing-table 10::1 128 verbose Summary count : 1 Destination: 10::1/128 Protocol: O_INTRA Process ID: 1 SubProtID: 0x1 Age: 00h03m10s Cost: 1 Preference: 10 IpPre: N/A QosLocalID: N/A Tag: 0 State: Active Adv OrigTblID: 0x0 OrigVrf: default-vrf TableID: 0xa OrigAs: 0 NibID: 0x23000006 LastAs: 0 AttrID: 0xffffffff Neighbor: :: Flags: 0x10041 OrigNextHop: FE80::34CC:E8FF:FE5B:C02 Label: NULL RealNextHop: FE80::34CC:E8FF:FE5B:C02 BkLabel: NULL BkNextHop: FE80::7685:45FF:FEAD:102 Tunnel ID: Invalid Interface: Vlan-interface200 BkTunnel ID: Invalid BkInterface: Vlan-interface101 FtnIndex: 0x0 TrafficIndex: N/A Connector: N/A