- Table of Contents
-
- 06-Layer 3—IP Routing Configuration Guide
- 00-Preface
- 01-Basic IP routing configuration
- 02-Static routing configuration
- 03-RIP configuration
- 04-OSPF configuration
- 05-IS-IS configuration
- 06-EIGRP configuration
- 07-BGP configuration
- 08-Policy-based routing configuration
- 09-IPv6 static routing configuration
- 10-RIPng configuration
- 11-OSPFv3 configuration
- 12-IPv6 policy-based routing configuration
- 13-Routing policy configuration
- 14-DCN configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
09-IPv6 static routing configuration | 314.88 KB |
Configuring IPv6 static routing
Configuring an IPv6 static route
Configuring the next hop of an IPv6 static route as the gateway address
Configuring an IPv6 floating static route
Configuring BFD for IPv6 static routes
About BFD for IPv6 static routes
Restrictions and guidelines for BFD
Configuring BFD control packet mode
Configuring BFD echo packet mode
Configuring IPv6 static route FRR
Restrictions and guidelines for IPv6 static route FRR
Configuring IPv6 static route FRR to automatically select a backup next hop
Configuring BFD to detect next hop reachability for the primary link of IPv6 static route FRR
Allowing IPv6 static routes to inherit the SRv6 SID information of related routes in route recursion
Display and maintenance commands for IPv6 static routing
IPv6 static routing configuration examples
Example: Configuring basic IPv6 static route
Example: Configuring BFD for IPv6 static routes (direct next hop)
Example: Configuring BFD for IPv6 static routes (indirect next hop)
Example: Configuring IPv6 static route FRR
Configuring an IPv6 default route
Configuring IPv6 static routing
About IPv6 static routing
Static routes are manually configured and cannot adapt to network topology changes. If a fault or a topological change occurs in the network, the network administrator must modify the static routes manually. IPv6 static routing works well in a simple IPv6 network.
Configuring an IPv6 static route
1. Enter system view.
system-view
2. Configure an IPv6 static route.
Public network:
ipv6 route-static ipv6-address prefix-length interface-type interface-number [ next-hop-address ] [ permanent | track track-entry-number ] [ cost cost-value ] [ preference preference ] [ tag tag-value ] [ no-advertise ] [ description text ]
ipv6 route-static ipv6-address prefix-length { next-hop-address [ recursive-lookup longest-match ] | vpn-instance d-vpn-instance-name next-hop-address [ recursive-lookup longest-match ] } [ permanent | track track-entry-number ] [ cost cost-value | inherit-cost ] [ preference preference ] [ tag tag-value ] [ no-advertise ] [ description text ]
ipv6 route-static ipv6-address prefix-length vpn-instance d-vpn-instance-name [ cost cost-value ] [ preference preference ] [ tag tag-value ] [ no-advertise ] [ description text ]
ipv6 route-static ipv6-address prefix-length { remote-sid remote-sid locator-prefix-len [ recursive-lookup longest-match ] | srv6-policy { color color-value end-point ipv6 ipv6-address | name policy-name } [ sid sid ] } * [ cost cost-value ] [ preference preference ] [ tag tag-value ] [ no-advertise ] [ description text ]
By default, no IPv6 static route is configured.
The remote-sid and sid keywords are mutually exclusive. You cannot specify both of them.
VPN:
ipv6 route-static vpn-instance s-vpn-instance-name ipv6-address prefix-length interface-type interface-number [ next-hop-address ] [ permanent | track track-entry-number ] [ cost cost-value ] [ preference preference ] [ tag tag-value ] [ no-advertise ] [ description text ]
ipv6 route-static vpn-instance s-vpn-instance-name ipv6-address prefix-length { next-hop-address [ recursive-lookup longest-match ] [ public ] | vpn-instance d-vpn-instance-name next-hop-address [ recursive-lookup longest-match ] } [ permanent | track track-entry-number ] [ cost cost-value | inherit-cost ] [ preference preference ] [ tag tag-value ] [ no-advertise ] [ description text ]
ipv6 route-static vpn-instance s-vpn-instance-name ipv6-address prefix-length { public | vpn-instance d-vpn-instance-name } [ cost cost-value ] [ preference preference ] [ tag tag-value ] [ no-advertise ] [ description text ]
ipv6 route-static vpn-instance s-vpn-instance-name ipv6-address prefix-length { remote-sid remote-sid locator-prefix-len [ recursive-lookup longest-match ] | srv6-policy { color color-value end-point ipv6 ipv6-address | name policy-name } [ sid sid ] } * [ cost cost-value ] [ preference preference ] [ tag tag-value ] [ no-advertise ] [ description text ]
If a VPN instance has been specified as the destination VPN instance, you cannot specify the vpn-instance d-vpn-instance-name option when configuring a static route for the VPN instance by using this command.
A static route with a destination VPN instance specified supports only VXLAN tunnels.
If the action of an IPv6 PBR node specifies only the default next hop and default SRv6 TE policy for packets, follow these restrictions and guidelines when executing this command:
¡ You cannot configure static routes for the VPN instance in the match criteria of the IPv6 PBR node.
¡ The ipv6-address argument cannot specify the destination IPv6 address in the match criteria of the IPv6 PBR node.
For more information about IPv6 PBR, see "Configuring IPv6 PBR."
By default, no IPv6 static route is configured.
The remote-sid and sid keywords are mutually exclusive. You cannot specify both of them.
3. (Optional.) Set the default preference for IPv6 static routes.
ipv6 route-static default-preference default-preference
The default setting is 60.
Configuring the next hop of an IPv6 static route as the gateway address
About this task
The interface obtains the gateway address during IPv6 address autoconfiguration. This task enables the device to use the gateway address obtained by the interface as the next hop address of the IPv6 static route. If the gateway address changes, the device automatically changes the next hop address of the IPv6 static route to the changed gateway address. For more information about IPv6 address autoconfiguration, see IPv6 basics configuration and DHCPv6 configuration in Layer 3—IP Services Configuration Guide.
Restrictions and guidelines
If the interface fails to obtain the gateway address, the IPv6 static route with the interface as the output interface and the gateway address as the next hop does not take effect.
Procedure
1. Enter system view.
system-view
2. Configure an IPv6 static route with a gateway address as the next hop.
Public network:
ipv6 route-static ipv6-address prefix-length interface-type interface-number gateway [ bfd { { control-packet | echo-packet } [ bfd-source ipv6-address ] | static session-name } | track track-entry-number ] [ cost cost-value ] [ preference preference ] [ tag tag-value ] [ no-advertise ] [ description text ]
VPN:
ipv6 route-static vpn-instance s-vpn-instance-name ipv6-address prefix-length interface-type interface-number gateway [ bfd { { control-packet | echo-packet } [ bfd-source ipv6-address ] | static session-name } | track track-entry-number ] [ cost cost-value ] [ preference preference ] [ tag tag-value ] [ no-advertise ] [ description text ]
By default, the gateway address is not configured as the next hop of an IPv6 static route.
Configuring an IPv6 floating static route
About this task
An IPv6 floating static route can implement route backup to improve network reliability.
When an IPv6 static or dynamic route to a destination address already exists on the device, you can configure another IPv6 static route with lower priority as the backup route. This backup IPv6 static route is called an IPv6 floating static route. It is activated only when the primary route becomes unavailable. After the primary route recovers, the IPv6 floating static route becomes inactive, and data forwarding switches back to the primary route.
As shown in Figure 1, two links exist between Device A and Device B. On device A, configure a static route with next hop Device C and preference 60, and configure a static route with next hop Device D and preference 100. The static route with next hop Device D automatically becomes a floating static route.
Figure 1 Configuring a floating static route
Procedure
You can configure an IPv6 floating static route in either of the following ways:
· Configure different priorities for multiple IPv6 static routes to the same destination address. The route with lower priority automatically becomes the IPv6 floating static route.
· When an IPv6 route to a destination address already exists on the device, configure an IPv6 static route with a lower priority to the same destination address.
When you configure an IPv6 floating static route, set a larger priority value for the route than the priority value of the primary route. For more information, see "Configuring an IPv6 static route."
Deleting IPv6 static routes
About this task
To delete an IPv6 static route, use the undo ipv6 route-static command. To delete all IPv6 static routes including the default route, use the delete ipv6 static-routes all command.
Procedure
1. Enter system view.
system-view
2. Delete all IPv6 static routes, including the default route.
delete ipv6 [ vpn-instance vpn-instance-name ] static-routes all
CAUTION: This command might interrupt network communication and cause packet forwarding failure. Before executing the command, make sure you fully understand the potential impact on the network. |
Configuring BFD for IPv6 static routes
About BFD for IPv6 static routes
BFD provides a general purpose, standard, and medium- and protocol-independent fast failure detection mechanism. It can uniformly and quickly detect the failures of the bidirectional forwarding paths between two routers for protocols, such as routing protocols and MPLS. BFD for IPv6 static routes tests the reachability of the next hop for each IPv6 static route. If a next hop is unreachable, BFD deletes the associated IPv6 static route. This feature allows you to associate a BFD session with a static route, and use the BFD session state to monitor the state of the link associated with the IPv6 static route. When the BFD session detects a link failure (BFD session state is Down) on the IPv6 static route, BFD reports the failure to the system, and the system then removes this route from the IP routing table. When the BFD session detects that the previously failed link is re-established successfully (BFD session state is Up), BFD reports this event to the system, and the system then adds this route back to the IP routing table.
For more information about BFD, see High Availability Configuration Guide.
Restrictions and guidelines for BFD
When you configure BFD for IPv6 static routes, follow these restrictions and guidelines:
· If you specify a source IPv6 address for BFD packets on the local device, you must specify that IPv6 address as the next hop IPv6 address on the peer device.
· If you specify a non-P2P output interface and a direct next hop, specify the bfd-source ipv6-address option as a best practice. Make sure the source IPv6 address of BFD packets meets the following requirements:
¡ The address is the same as the IPv6 address of the output interface.
¡ The address is on the same network segment as the next hop IPv6 address of the same type.
For example, if the next hop IPv6 address is a link-local address, the source IPv6 address of BFD packets must also be a link-local address.
· Enabling BFD for a flapping route could worsen the situation.
Configuring BFD control packet mode
About this task
This mode uses BFD control packets to detect the status of a link bidirectionally at a millisecond level.
BFD control packet mode can be applied to IPv6 static routes with a direct next hop or with an indirect next hop.
Restrictions and guidelines for BFD control packet mode
If you use BFD control packet mode at the local end, you must use this mode also at the peer end.
Configuring BFD control packet mode for an IPv6 static route (direct next hop)
1. Enter system view.
system-view
2. Configure BFD control packet mode for an IPv6 static route.
ipv6 route-static [ vpn-instance s-vpn-instance-name ] ipv6-address prefix-length interface-type interface-number next-hop-address bfd { control-packet [ bfd-source ipv6-address | static session-name } [ cost cost-value ] ] [ preference preference ] [ tag tag-value ] [ description text ]
If the action of an IPv6 PBR node specifies only the default next hop and default SRv6 TE policy for packets, follow these restrictions and guidelines when executing this command:
¡ You cannot configure static routes for the VPN instance in the match criteria of the IPv6 PBR node.
¡ The ipv6-address argument cannot specify the destination IPv6 address in the match criteria of the IPv6 PBR node.
For more information about IPv6 PBR, see "Configuring IPv6 PBR."
By default, BFD control packet mode for an IPv6 static route is not configured.
3. (Optional.) Configure BFD session parameters for the IPv6 static route.
ipv6 route-static bfd interface-type interface-number next-hop-address [ source-ipv6 ipv6-address ] { detect-multiplier detect-multiplier | min-receive-interval min-receive-interval | min-transmit-interval min-transmit-interval } *
By default, no BFD session parameters are specifically configured for an IPv6 static route. The IPv6 static route uses the session parameters configured for the BFD module (common BFD session parameters).
Configuring BFD control packet mode for an IPv6 static route (indirect next hop)
1. Enter system view.
system-view
2. Configure BFD control packet mode for an IPv6 static route.
ipv6 route-static [ vpn-instance s-vpn-instance-name ] ipv6-address prefix-length [ vpn-instance d-vpn-instance-name ] { next-hop-address bfd { control-packet bfd-source ipv6-address | static session-name } } [ cost cost-value | inherit-cost ] [ preference preference ] [ tag tag-value ] [ description text ]
If a VPN instance has been specified as the destination VPN instance, you cannot specify the vpn-instance d-vpn-instance-name option when configuring a static route for the VPN instance by using this command.
A static route with a destination VPN instance specified supports only VXLAN tunnels.
If the action of an IPv6 PBR node specifies only the default next hop and default SRv6 TE policy for packets, follow these restrictions and guidelines when executing this command:
¡ You cannot configure static routes for the VPN instance in the match criteria of the IPv6 PBR node.
¡ The ipv6-address argument cannot specify the destination IPv6 address in the match criteria of the IPv6 PBR node.
For more information about IPv6 PBR, see "Configuring IPv6 PBR."
By default, BFD control packet mode for an IPv6 static route is not configured.
3. (Optional.) Configure BFD session parameters for the IPv6 static route.
ipv6 route-static bfd [ vpn-instance d-vpn-instance-name ] next-hop-address source-ipv6 ipv6-address { detect-multiplier detect-multiplier | min-receive-interval min-receive-interval | min-transmit-interval min-transmit-interval } *
If a VPN instance has been specified as the destination VPN instance, you cannot specify the vpn-instance d-vpn-instance-name option when configuring a static route for the VPN instance by using this command.
A static route with a destination VPN instance specified supports only VXLAN tunnels.
If the action of an IPv6 PBR node specifies only the default next hop and default SRv6 TE policy for packets, follow these restrictions and guidelines when executing this command:
¡ You cannot configure static routes for the VPN instance in the match criteria of the IPv6 PBR node.
¡ The ipv6-address argument cannot specify the destination IPv6 address in the match criteria of the IPv6 PBR node.
For more information about IPv6 PBR, see "Configuring IPv6 PBR."
By default, no BFD session parameters are specifically configured for an IPv6 static route. The IPv6 static route uses the session parameters configured for the BFD module (common BFD session parameters).
Configuring BFD echo packet mode
About this task
With BFD echo packet mode enabled for a static route, the output interface sends BFD echo packets to the destination device, which loops the packets back to test the link reachability.
Restrictions and guidelines
You do not need to configure BFD echo packet mode at the peer end.
Do not use BFD for a static route with the output interface in spoofing state.
Procedure
1. Enter system view.
system-view
2. (Optional.) Configure the source address of echo packets.
bfd echo-source-ipv6 ipv6-address
By default, the source address of echo packets is not configured.
As a best practice to avoid network congestion caused by excessive ICMPv6 redirect packets from the peer, use this command. Make sure the source IPv6 address is not on the subnet of any interfaces on the device.
The source IPv6 address of echo packets can only be the global unicast address.
For more information about this command, see High Availability Command Reference.
3. Configure BFD echo packet mode for an IPv6 static route.
ipv6 route-static [ vpn-instance s-vpn-instance-name ] ipv6-address prefix-length interface-type interface-number next-hop-address bfd { echo-packet [ bfd-source ipv6-address ] | static session-name } [ cost cost-value ] [ preference preference ] [ tag tag-value ] [ description text ]
If the action of an IPv6 PBR node specifies only the default next hop and default SRv6 TE policy for packets, follow these restrictions and guidelines when executing this command:
¡ You cannot configure static routes for the VPN instance in the match criteria of the IPv6 PBR node.
¡ The ipv6-address argument cannot specify the destination IPv6 address in the match criteria of the IPv6 PBR node.
For more information about IPv6 PBR, see "Configuring IPv6 PBR."
By default, BFD echo packet mode for an IPv6 static route is not configured.
The next hop IPv6 address must be a global unicast address.
4. (Optional.) Configure BFD session parameters for the IPv6 static route.
ipv6 route-static bfd interface-type interface-number next-hop-address [ source-ipv6 ipv6-address ] { detect-multiplier detect-multiplier | min-echo-receive-interval min-echo-receive-interval } *
By default, no BFD session parameters are specifically configured for an IPv6 static route. The IPv6 static route uses the session parameters configured for the BFD module (common BFD session parameters).
Configuring IPv6 static route FRR
About IPv6 static route FRR
A link or router failure on a path can cause packet loss. IPv6 static route fast reroute (FRR) enables fast rerouting to minimize the impact of link or node failures.
As shown in Figure 2, upon a link failure, packets are directed to the backup next hop to avoid traffic interruption. You can enable FRR to automatically select a backup next hop (which must be configured in advance).
Restrictions and guidelines for IPv6 static route FRR
Do not use IPv6 static route FRR and BFD (for an IPv6 static route) at the same time.
If the device has multiple optimal routes with the same preference, these routes form ECMP routes, and this feature cannot find the backup next hop for them.
Besides the configured IPv6 static route for FRR, the device must have another route to reach the destination. When the state of the primary link (with Layer 3 interfaces staying up) changes from bidirectional to unidirectional or down, IPv6 static route FRR quickly redirects traffic to the backup next hop. When the Layer 3 interfaces of the primary link are down, IPv6 static route FRR temporarily redirects traffic to the backup next hop. In addition, the device searches for another route to reach the destination and redirects traffic to the new path if a route is found. If no route is found, traffic interruption occurs.
Configuring IPv6 static route FRR to automatically select a backup next hop
About this task
If multiple static routes to the same destination address with different priorities exist on the device, you can use perform this task to enable the device to automatically obtain backup routes. Both the primary and backup routes will be issued to the forwarding table. The route with higher priority is the primary route, and the route with lower priority is the backup route.
Procedure
1. Enter system view.
system-view
2. Configure IPv6 static route FRR to automatically select a backup next hop.
ipv6 route-static fast-reroute auto
By default, IPv6 static route FRR is disabled from automatically selecting a backup next hop.
Configuring BFD to detect next hop reachability for the primary link of IPv6 static route FRR
About this task
By default, IPv6 static route FRR uses IPv6 ND to detect primary link failures. With this feature configured, the device automatically creates a BFD session of the IP FRR protocol type, and uses this BFD session to detect next hop reachability of the primary route. This can reduce the convergence time upon traffic switchover to the backup route next hop when the primary route next hop becomes unavailable.
Restrictions and guidelines
If you do not configure IPv6 static route FRR, or no reachable backup next hops are available for FRR, the device cannot establish a BFD session to detect the primary route next hop.
To use the BFD session in echo packet mode to detect next hop reachability of the primary route, you only need to configure the BFD echo packet mode on the local end.
The BFD session in control packet mode can be successfully established only through negotiation between the two ends. To use the BFD session in control packet mode to detect next hop reachability of the primary route, perform one of the following tasks:
· Configure the ipv6 route-static primary-path-detect bfd command on the peer device of the primary link. This method applies when FRR is configured for both ends of the primary link.
· Manually create a static BFD session on the peer device of the primary link, and configure the following settings for the static BFD session:
¡ Specify the source IP address for the static BFD session as the destination IP address of the BFD session automatically created on the local end.
¡ Specify the destination IP address for the static BFD session as the source IP address of the BFD session automatically created on the local end.
¡ Specify the remote discriminator for the static BFD session as the local discriminator of the BFD session automatically created on the local end.
The source IPv6 address of packets for an echo-packet-mode BFD session can only be a global unicast address. If the IPv6 next hop address of the primary link is not a global unicast address, as a best practice, use a control-packet-mode BFD session to detect next hop reachability for the primary link.
Procedure
1. Enter system view.
system-view
2. (Optional.) Configure the source IP address of BFD echo packets.
bfd echo-source-ipv6 ipv6-address
By default, the source IPv6 address of BFD echo packets is not configured.
This command is required for only the BFD session in echo packet mode.
As a best practice to avoid network congestion caused by excessive ICMPv6 redirect packets from the peer, use this command. Make sure the source IPv6 address is not on the subnet of any interfaces on the device.
You must specify a global unicast address as the source IPv6 address of BFD echo packets.
For more information about this command, see BFD commands in High Availability Command Reference.
3. Configure BFD to detect next hop reachability for the primary link of IPv6 static route FRR.
ipv6 route-static primary-path-detect bfd { ctrl | echo }
By default, BFD is not configured to detect next hop reachability for the primary link of IPv6 static route FRR. The IPv6 static route uses IPv6 ND to detect next hop reachability of the primary route.
Allowing IPv6 static routes to inherit the SRv6 SID information of related routes in route recursion
About this task
An IPv6 static route requires route recursion if its next hop is not directly connected. If the next hop recurses to an SRv6 BE or SRv6 TE policy path, the IPv6 static route does not inherit the SRv6 SID information of the related route by default. The device does not add SRv6 SID information to the packets matching this IPv6 static route.
After you configure this feature, if the next hop of the IPv6 static route recurses to an SRv6 BE or SRv6 TE policy path, the IPv6 static route inherits the SRv6 SID information of related route. The device will add SRv6 SID information and SRv6 encapsulation to the packets matching this IPv6 static route, and then forward the encapsulated packets in SRv6 BE mode or through the SRv6 TE policy.
For more information about SRv6 BE, see IP L3VPN over SRv6 configuration or public network IP over SRv6 configuration in Segment Routing Configuration Guide. For more information about SRv6 TE policies, see SRv6 TE policy configuration in Segment Routing Configuration Guide.
Procedure
1. Enter system view.
system-view
2. Allow IPv6 static routes to inherit the SRv6 SID information of related routes in route recursion.
ipv6 route-static recursive-lookup segment-routing-ipv6
By default, IPv6 static routes are not allowed to inherit the SRv6 SID information of related routes in route recursion.
Display and maintenance commands for IPv6 static routing
Execute display commands in any view.
Task |
Command |
Display IPv6 static route information. |
display ipv6 routing-table protocol static [ inactive | verbose ] |
Display IPv6 static route next hop information. |
display ipv6 route-static nib [ nib-id ] [ verbose ] |
Display IPv6 static routing table information. |
display ipv6 route-static routing-table [ vpn-instance vpn-instance-name ] [ ipv6-address prefix-length ] |
IPv6 static routing configuration examples
Example: Configuring basic IPv6 static route
Network configuration
As shown in Figure 3, configure IPv6 static routes so that hosts can reach each other.
Procedure
1. Configure IPv6 addresses for interfaces. (Details not shown.)
2. Configure IPv6 static routes:
# Configure the default IPv6 route on Router A.
<RouterA> system-view
[RouterA] ipv6 route-static :: 0 4::2
# Configure two IPv6 static routes on Router B.
<RouterB> system-view
[RouterB] ipv6 route-static 1:: 64 4::1
[RouterB] ipv6 route-static 3:: 64 5::1
# Configure the default IPv6 route on Router C.
<RouterC> system-view
[RouterC] ipv6 route-static :: 0 5::2
3. Configure the IPv6 addresses for all hosts and configure the default gateway of Host A, Host B, and Host C as 1::1, 2::1, and 3::1.
Verifying the configuration
# Display the IPv6 static route information on Router A.
[RouterA] display ipv6 routing-table protocol static
Summary Count : 1
Static Routing table Status : <Active>
Summary Count : 1
Destination: :: Protocol : Static
NextHop : 4::2 Preference: 60
Interface : XGE0/0/16 Cost : 0
Static Routing table Status : <Inactive>
Summary Count : 0
# Display the IPv6 static route information on Router B.
[RouterB] display ipv6 routing-table protocol static
Summary Count : 2
Static Routing table Status : <Active>
Summary Count : 2
Destination: 1::/64 Protocol : Static
NextHop : 4::1 Preference: 60
Interface : XGE0/0/15 Cost : 0
Destination: 3::/64 Protocol : Static
NextHop : 5::1 Preference: 60
Interface : XGE0/0/16 Cost : 0
Static Routing table Status : <Inactive>
Summary Count : 0
# Use the ping command to test reachability.
Ping6(56 data bytes) 4::1 --> 3::1, press CTRL_C to break
56 bytes from 3::1, icmp_seq=0 hlim=62 time=0.700 ms
56 bytes from 3::1, icmp_seq=1 hlim=62 time=0.351 ms
56 bytes from 3::1, icmp_seq=2 hlim=62 time=0.338 ms
56 bytes from 3::1, icmp_seq=3 hlim=62 time=0.373 ms
56 bytes from 3::1, icmp_seq=4 hlim=62 time=0.316 ms
--- Ping6 statistics for 3::1 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.316/0.416/0.700/0.143 ms
Example: Configuring BFD for IPv6 static routes (direct next hop)
Network configuration
As shown in Figure 4:
· Configure an IPv6 static route to subnet 120::/64 on Router A.
· Configure an IPv6 static route to subnet 121::/64 on Router B.
· Enable BFD for both routes.
· Configure an IPv6 static route to subnet 120::/64 and an IPv6 static route to subnet 121::/64 on Router C.
When the link between Router A and Router B through the Layer 2 switch fails, BFD can detect the failure immediately and inform Router A and Router B to communicate through Router C.
Table 1 Interface and IP address assignment
Device |
Interface |
IPv6 address |
Router A |
XGE0/0/15 |
12::1/64 |
Router A |
XGE0/0/16 |
10::102/64 |
Router B |
XGE0/0/15 |
12::2/64 |
Router B |
XGE0/0/16 |
13::1/64 |
Router C |
XGE0/0/15 |
10::100/64 |
Router C |
XGE0/0/16 |
13::2/64 |
Procedure
1. Configure IPv6 addresses for interfaces. (Details not shown.)
2. Configure IPv6 static routes and BFD:
# Configure IPv6 static routes on Router A, and enable BFD control packet mode for the IPv6 static route that traverses Ten-GigabitEthernet 0/0/15.
<RouterA> system-view
[RouterA] interface ten-gigabitethernet 0/0/15
[RouterA-Ten-GigabitEthernet0/0/15] bfd min-transmit-interval 500
[RouterA-Ten-GigabitEthernet0/0/15] bfd min-receive-interval 500
[RouterA-Ten-GigabitEthernet0/0/15] bfd detect-multiplier 9
[RouterA-Ten-GigabitEthernet0/0/15] quit
[RouterA] ipv6 route-static 120:: 64 ten-gigabitethernet 0/0/15 12::2 bfd control-packet
[RouterA] ipv6 route-static 120:: 64 10::100 preference 65
[RouterA] quit
# Configure IPv6 static routes on Router B, and enable BFD control packet mode for the IPv6 static route that traverses the Layer 2 switch.
<RouterB> system-view
[RouterB] interface ten-gigabitethernet 0/0/15
[RouterB-Ten-GigabitEthernet0/0/15] bfd min-transmit-interval 500
[RouterB-Ten-GigabitEthernet0/0/15] bfd min-receive-interval 500
[RouterB-Ten-GigabitEthernet0/0/15] bfd detect-multiplier 9
[RouterB-Ten-GigabitEthernet0/0/15] quit
[RouterB] ipv6 route-static 121:: 64 ten-gigabitethernet 0/0/15 12::1 bfd control-packet
[RouterB] ipv6 route-static 121:: 64 13::2 preference 65
[RouterB] quit
# Configure IPv6 static routes on Router C.
<RouterC> system-view
[RouterC] ipv6 route-static 120:: 64 13::1
[RouterC] ipv6 route-static 121:: 64 10::102
Verifying the configuration
# Display BFD sessions on Router A.
<RouterA> display bfd session
Total sessions: 1 Up sessions: 1 Init mode: Active
IPv6 session working in control packet mode:
Local discr: 513 Remote discr: 33
Source IP: 12::1
Destination IP: 12::2
Session state: Up Interface: XGE0/0/15
Hold time: 2012ms
The output shows that the BFD session has been created.
# Display IPv6 static routes on Router A.
<RouterA> display ipv6 routing-table protocol static
Summary Count : 1
Static Routing table Status : <Active>
Summary Count : 1
Destination: 120::/64 Protocol : Static
NextHop : 12::2 Preference: 60
Interface : XGE0/0/15 Cost : 0
Static Routing table Status : <Inactive>
Summary Count : 0
The output shows that Router A communicates with Router B through Ten-GigabitEthernet 0/0/15. The link over Ten-GigabitEthernet 0/0/15 fails.
# Display IPv6 static routes on Router A.
<RouterA> display ipv6 routing-table protocol static
Summary Count : 1
Static Routing table Status : <Active>
Summary Count : 1
Destination: 120::/64 Protocol : Static
NextHop : 10::100 Preference: 65
Interface : XGE0/0/16 Cost : 0
Static Routing table Status : <Inactive>
Summary Count : 0
The output shows that Router A communicates with Router B through Ten-GigabitEthernet 0/0/16.
Example: Configuring BFD for IPv6 static routes (indirect next hop)
Network configuration
As shown in Figure 5:
· Router A has a route to interface Loopback 1 (2::9/128) on Router B, and the output interface is Ten-GigabitEthernet 0/0/15.
· Router B has a route to interface Loopback 1 (1::9/128) on Router A, and the output interface is Ten-GigabitEthernet 0/0/15.
· Router D has a route to 1::9/128, and the output interface is Ten-GigabitEthernet 0/0/15. It also has a route to 2::9/128, and the output interface is Ten-GigabitEthernet 0/0/16.
Configure the following:
· Configure an IPv6 static route to subnet 120::/64 on Router A.
· Configure an IPv6 static route to subnet 121::/64 on Router B.
· Enable BFD for both routes.
· Configure an IPv6 static route to subnet 120::/64 and an IPv6 static route to subnet 121::/64 on both Router C and Router D.
When the link between Router A and Router B through Router D fails, BFD can detect the failure immediately and Router A and Router B can communicate through Router C.
Table 2 Interface and IP address assignment
Device |
Interface |
IPv6 address |
Router A |
XGE0/0/15 |
12::1/64 |
Router A |
XGE0/0/16 |
10::102/64 |
Router A |
Loop1 |
1::9/128 |
Router B |
XGE0/0/15 |
11::2/64 |
Router B |
XGE0/0/16 |
13::1/64 |
Router B |
Loop1 |
2::9/128 |
Router C |
XGE0/0/15 |
10::100/64 |
Router C |
XGE0/0/16 |
13::2/64 |
Router D |
XGE0/0/15 |
12::2/64 |
Router D |
XGE0/0/16 |
11::1/64 |
Procedure
1. Configure IPv6 addresses for interfaces. (Details not shown.)
2. Configure IPv6 static routes and BFD:
# Configure IPv6 static routes on Router A and enable BFD control packet mode for the IPv6 static route that traverses Router D.
<RouterA> system-view
[RouterA] bfd multi-hop min-transmit-interval 500
[RouterA] bfd multi-hop min-receive-interval 500
[RouterA] bfd multi-hop detect-multiplier 9
[RouterA] ipv6 route-static 120:: 64 2::9 bfd control-packet bfd-source 1::9
[RouterA] ipv6 route-static 120:: 64 10::100 preference 65
[RouterA] ipv6 route-static 2::9 128 12::2
[RouterA] quit
# Configure IPv6 static routes on Router B and enable BFD control packet mode for the IPv6 static route that traverses Router D.
<RouterB> system-view
[RouterB] bfd multi-hop min-transmit-interval 500
[RouterB] bfd multi-hop min-receive-interval 500
[RouterB] bfd multi-hop detect-multiplier 9
[RouterB] ipv6 route-static 121:: 64 1::9 bfd control-packet bfd-source 2::9
[RouterB] ipv6 route-static 121:: 64 13::2 preference 65
[RouterB] ipv6 route-static 1::9 128 11::1
[RouterB] quit
# Configure IPv6 static routes on Router C.
<RouterC> system-view
[RouterC] ipv6 route-static 120:: 64 13::1
[RouterC] ipv6 route-static 121:: 64 10::102
# Configure IPv6 static routes on Router D.
<RouterD> system-view
[RouterD] ipv6 route-static 120:: 64 11::2
[RouterD] ipv6 route-static 121:: 64 12::1
[RouterD] ipv6 route-static 2::9 128 11::2
[RouterD] ipv6 route-static 1::9 128 12::1
Verifying the configuration
# Display BFD sessions on Router A.
<RouterA> display bfd session
Total sessions: 1 Up sessions: 1 Init mode: Active
IPv6 session working in control packet mode:
Local discr: 513 Remote discr: 33
Source IP: 1::9
Destination IP: 2::9
Session state: Up Interface: N/A
Hold time: 2012ms
The output shows that the BFD session has been created.
# Display IPv6 static routes on Router A.
<RouterA> display ipv6 routing-table protocol static
Summary Count : 1
Static Routing table Status : <Active>
Summary Count : 1
Destination: 120::/64 Protocol : Static
NextHop : 2::9 Preference: 60
Interface : XGE0/0/15 Cost : 0
Static Routing table Status : <Inactive>
Summary Count : 0
The output shows that Router A communicates with Router B through Ten-GigabitEthernet 0/0/15. The link over Ten-GigabitEthernet 0/0/15 fails.
# Display IPv6 static routes on Router A.
<RouterA> display ipv6 routing-table protocol static
Summary Count : 1
Static Routing table Status : <Active>
Summary Count : 1
Destination: 120::/64 Protocol : Static
NextHop : 10::100 Preference: 65
Interface : XGE0/0/16 Cost : 0
Static Routing table Status : <Inactive>
Summary Count : 0
The output shows that Router A communicates with Router B through Ten-GigabitEthernet 0/0/16.
Example: Configuring IPv6 static route FRR
Network configuration
As shown in Figure 6, configure IPv6 static routes on Router A, Router B, and Router C, and configure IPv6 static route FRR. When Link A becomes unidirectional, traffic can be switched to Link B immediately.
Table 3 Interface and IP address assignment
Device |
Interface |
IP address |
Router A |
XGE0/0/15 |
13::1/64 |
Router A |
XGE0/0/16 |
12::1/64 |
Router A |
Loopback 0 |
1::9/128 |
Router B |
XGE0/0/15 |
23::2/64 |
Router B |
XGE0/0/16 |
12::2/64 |
Router B |
Loopback 0 |
2::9/128 |
Router C |
XGE0/0/15 |
13::3/64 |
Router C |
XGE0/0/16 |
23::3/64 |
Procedure
1. Configure IPv6 addresses for interfaces. (Details not shown.)
2. Configure IPv6 static route FRR to automatically select a backup next hop:
# Configure IPv6 static routes on Router A, and configure IPv6 static route FRR to automatically select a backup next hop.
<RouterA> system-view
[RouterA] ipv6 route-static 2::9 128 ten-gigabitethernet 0/0/16 12::2
[RouterA] ipv6 route-static 2::9 128 ten-gigabitethernet 0/0/15 13::3 preference 70
[RouterA] ipv6 route-static 23:: 64 ten-gigabitethernet 0/0/16 12::2
[RouterA] ipv6 route-static 23:: 64 ten-gigabitethernet 0/0/15 13::3 preference 70
[RouterA] ipv6 route-static fast-reroute auto
# Configure IPv6 static routes on Router B, and configure IPv6 static route FRR to automatically select a backup next hop.
<RouterB> system-view
[RouterB] ipv6 route-static 1::9 128 ten-gigabitethernet 0/0/16 12::1
[RouterB] ipv6 route-static 1::9 128 ten-gigabitethernet 0/0/15 23::3 preference 70
[RouterB] ipv6 route-static 13:: 64 ten-gigabitethernet 0/0/16 12::1
[RouterB] ipv6 route-static 13:: 64 ten-gigabitethernet 0/0/15 23::3 preference 70
[RouterB] ipv6 route-static fast-reroute auto
3. Configure IPv6 static routes on Router C.
<RouterC> system-view
[RouterC] ipv6 route-static 1::9 128 ten-gigabitethernet 0/0/15 13::1
[RouterC] ipv6 route-static 2::9 128 ten-gigabitethernet 0/0/16 23::2
Verifying the configuration
# Display route 2::9/128 on Router A to view the backup next hop information.
[RouterA] display ipv6 routing-table 2::9 verbose
Summary Count : 1
Destination: 2::9/128
Protocol: Static
Process ID: 0
SubProtID: 0x1 Age: 00h09m12s
FlushedAge: 15h28m49s
Cost: 0 Preference: 60
IpPre: N/A QosLocalID: N/A
Tag: 0 State: Active Adv
OrigTblID: 0x0 OrigVrf: default-vrf
TableID: 0xa OrigAs: 0
NibID: 0x21000002 LastAs: 0
AttrID: 0xffffffffffffffff
BkAttrID: 0xffffffffffffffff Neighbor: ::
Flags: 0x10040 OrigNextHop: 12::2
Label: NULL RealNextHop: 12::2
BkLabel: NULL BkNextHop: 13::3
SRLabel: NULL Interface: Ten-GigabitEthernet0/0/16
BkSRLabel: NULL BkInterface: Ten-GigabitEthernet0/0/15
Tunnel ID: Invalid IPInterface: Ten-GigabitEthernet0/0/16
BkTunnel ID: Invalid BkIPInterface: Ten-GigabitEthernet0/0/15
InLabel: NULL ColorInterface: N/A
SIDIndex: NULL BkColorInterface: N/A
FtnIndex: 0x0 TunnelInterface: N/A
TrafficIndex: N/A BkTunnelInterface: N/A
Connector: N/A PathID: 0x0
UserID: 0x0 SRTunnelID: Invalid
SID Type: N/A NID: Invalid
FlushNID: Invalid BkNID: Invalid
BkFlushNID: Invalid StatFlags: 0x0
SID: N/A
BkSID: N/A
CommBlockLen: 0 Priority: Critical
MemberPort: N/A ExtFlags: 0x0
UCMIndex: 0x0 UserVLAN: 65535
UCMMTU: 0 BrasHash: 0
SessionID: 0 UserGroupID: 0
IsoGroupID: 0 BkIsoGroupID: 0
# Display route 1::9/128 on Router B to view the backup next hop information.
[RouterB] display ipv6 routing-table 1::9 verbose
Summary Count : 1
Destination: 1::9/128
Protocol: Static
Process ID: 0
SubProtID: 0x1 Age: 00h09m57s
FlushedAge: 15h28m49s
Cost: 0 Preference: 60
IpPre: N/A QosLocalID: N/A
Tag: 0 State: Active Adv
OrigTblID: 0x0 OrigVrf: default-vrf
TableID: 0xa OrigAs: 0
NibID: 0x21000002 LastAs: 0
AttrID: 0xffffffffffffffff
BkAttrID: 0xffffffffffffffff Neighbor: ::
Flags: 0x10040 OrigNextHop: 12::1
Label: NULL RealNextHop: 12::1
BkLabel: NULL BkNextHop: 23::3
SRLabel: NULL Interface: Ten-GigabitEthernet0/0/16
BkSRLabel: NULL BkInterface: Ten-GigabitEthernet0/0/15
Tunnel ID: Invalid IPInterface: Ten-GigabitEthernet0/0/16
BkTunnel ID: Invalid BkIPInterface: Ten-GigabitEthernet0/0/15
InLabel: NULL ColorInterface: N/A
SIDIndex: NULL BkColorInterface: N/A
FtnIndex: 0x0 TunnelInterface: N/A
TrafficIndex: N/A BkTunnelInterface: N/A
Connector: N/A PathID: 0x0
UserID: 0x0 SRTunnelID: Invalid
SID Type: N/A NID: Invalid
FlushNID: Invalid BkNID: Invalid
BkFlushNID: Invalid StatFlags: 0x0
SID: N/A
BkSID: N/A
CommBlockLen: 0 Priority: Critical
MemberPort: N/A ExtFlags: 0x0
UCMIndex: 0x0 UserVLAN: 65535
UCMMTU: 0 BrasHash: 0
SessionID: 0 UserGroupID: 0
IsoGroupID: 0 BkIsoGroupID: 0
Configuring an IPv6 default route
A default IPv6 route is used to forward packets that match no entry in the routing table.
A default IPv6 route can be configured in either of the following ways:
· The network administrator can configure a default route with a destination prefix of ::/0. For more information, see "Configuring IPv6 static routing."
· Some dynamic routing protocols can generate a default IPv6 route. For example, an upstream router running OSPFv3 can generate a default IPv6 route and advertise it to other routers. These routers install the default IPv6 route with the next hop being the upstream router. For more information, see the respective chapters on those routing protocols in this configuration guide.
As shown in Figure 7, Device B is the next hop for packets from Device A to Device C, Device D, and Device E. You can configure a default route on Device A to replace the three IPv6 static routes from Device A to Device C, Device D, and Device E.
The next hop address, destination address, and prefix length of the IPv6 default route configured on Device A are 1::2, ::, and 0, respectively.
Figure 7 Configuring a default route