- Table of Contents
-
- 07-Layer 3—IP Routing Command Reference
- 00-Preface
- 01-Basic IP routing commands
- 02-Static routing commands
- 03-RIP commands
- 04-OSPF commands
- 05-IS-IS commands
- 06-EIGRP commands
- 07-BGP commands
- 08-Policy-based routing commands
- 09-IPv6 static routing commands
- 10-RIPng commands
- 11-OSPFv3 commands
- 12-IPv6 policy-based routing commands
- 13-Routing policy commands
- 14-DCN commands
- Related Documents
-
Title | Size | Download |
---|---|---|
09-IPv6 static routing commands | 141.86 KB |
display ipv6 route-static routing-table
ipv6 route-static default-preference
ipv6 route-static fast-reroute auto
ipv6 route-static primary-path-detect bfd echo
ipv6 route-static recursive-lookup segment-routing-ipv6
ipv6 route-static vpn-instance
IPv6 static routing commands
delete ipv6 static-routes all
Use delete ipv6 static-routes all to delete all IPv6 static routes.
Syntax
delete ipv6 [ vpn-instance vpn-instance-name ] static-routes all
Views
System view
Predefined user roles
network-admin
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, the command deletes all IPv6 static routes for the public network.
Usage guidelines
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. |
When you use this command, the system will prompt you to confirm the operation before deleting all the IPv6 static routes.
Examples
# Delete all IPv6 static routes.
<Sysname> system-view
[Sysname] delete ipv6 static-routes all
This will erase all IPv6 static routes and their configurations, you must reconfigure all static routes.
Are you sure?[Y/N]:y
Related commands
ipv6 route-static
display ipv6 route-static nib
Use display ipv6 route-static nib to display IPv6 static route next hop information.
Syntax
display ipv6 route-static nib [ nib-id ] [ verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
nib-id: Specifies a NIB by its ID, a hexadecimal string in the range of 1 to ffffffff.
verbose: Displays detailed IPv6 static route next hop information. If you do not specify this keyword, the command displays brief IPv6 static route next hop information.
Examples
# Display brief IPv6 static route next hop information.
<Sysname> display ipv6 route-static nib
Total number of nexthop(s): 35
NibID: 0x21000000 Sequence: 0
Type: 0x41 Flushed: Yes
Age: 00h01m50s
UserKey0: 0x0 VrfNthp: 0
UserKey1: 0x0 Nexthop: 2::3
IFIndex: 0x0 LocalAddr: ::
MemberPort: 0x0
TopoNthp: Invalid ExtType: 0x0
Color: 0 COFlag: 0x0
SIDIndex: 0x0 SRPName:
OriNexthop: ::
NibID: 0x21000001 Sequence: 1
Type: 0x41 Flushed: Yes
Age: 00h01m50s
UserKey0: 0x0 VrfNthp: 0
UserKey1: 0x0 Nexthop: 3::4
IFIndex: 0x0 LocalAddr: ::
MemberPort: 0x0
TopoNthp: Invalid ExtType: 0x0
Color: 0 COFlag: 0x0
SIDIndex: 0x0 SRPName:
OriNexthop: ::
Table 1 Command output
Field |
Description |
NibID |
ID of the NIB. |
Sequence |
Sequence number of the NIB. |
Type |
Type of the NIB. |
Flushed |
Indicates whether the route with the NIB has been flushed to the FIB. |
Age |
Time when the next hop information was updated most recently. |
UserKey0 |
Reserved data 1. |
UserKey1 |
Reserved data 2. |
VrfNthp |
Index of the VPN instance to which the next hop belongs. This field displays 0 if the next hop is on the public network. |
Nexthop |
Next hop address. |
IFIndex |
Interface index |
LocalAddr |
Local interface address. |
MemberPort |
Index of a member port in an aggregation group. |
NewUK0 |
New reserved data 1. This field is not displayed if this attribute is not available. |
NewUK1 |
New reserved data 2. This field is not displayed if this attribute is not available. |
NewUK2 |
New reserved data 3. This field is not displayed if this attribute is not available. |
NewUK3 |
New reserved data 4. This field is not displayed if this attribute is not available. |
NewUK4 |
New reserved data 5. This field is not displayed if this attribute is not available. |
NewUK5 |
New reserved data 6. This field is not displayed if this attribute is not available. |
NewUK6 |
New reserved data 7. This field is not displayed if this attribute is not available. |
NewUK7 |
New reserved data 8. This field is not displayed if this attribute is not available. |
NewUK8 |
New reserved data 9. This field is not displayed if this attribute is not available. |
NewUK9 |
New reserved data 10. This field is not displayed if this attribute is not available. |
NewUK10 |
New reserved data 11. This field is not displayed if this attribute is not available. |
NewUK11 |
New reserved data 12. This field is not displayed if this attribute is not available. |
NewUK12 |
New reserved data 13. This field is not displayed if this attribute is not available. |
TopoNthp |
This field is not supported in the current software version. Index of the topology that contains the next hop. This field displays 0 if the next hop is on the public network. This field displays Invalid if the next hop is on an IPv6 network, because the router does not support non-base topologies. |
ExtType |
NIB extension type. |
Color |
Color extended community attribute. |
COFlag |
Flag of the color extended community attribute. |
SIDIndex |
SID index value. |
SRPName |
SR-MPLS TE policy name. |
OriNexthop |
Original next hop address of the route. If the route is obtained from a BGP UPDATE message, the address is the next hop IP address in the BGP UPDATE message. |
# Display detailed IPv6 static route next hop information.
<Sysname> display ipv6 route-static nib verbose
Total number of nexthop(s): 35
NibID: 0x21000000 Sequence: 0
Type: 0x41 Flushed: Yes
Age: 00h01m50s
UserKey0: 0x0 VrfNthp: 0
UserKey1: 0x0 Nexthop: 2::3
IFIndex: 0x0 LocalAddr: ::
MemberPort: 0x0
TopoNthp: Invalid ExtType: 0x0
Color: 0 COFlag: 0x0
SIDIndex: 0x0 SRPName:
OriNexthop: ::
RefCnt: 1 FlushRefCnt: 0
Flag: 0x12 Version: 1
ExtFlag: 0x0
1 nexthop(s):
PrefixIndex: 0 OrigNexthop: 2::3
RelyDepth: 2 RealNexthop: ::
Interface: NULL0 LocalAddr: ::
TunnelCnt: 0 Vrf: default-vrf
TunnelID: N/A Topology:
Weight: 0 Flags: 0x0
SRPolicyNID: 4294967295 SRInterface:
ColorWeight: 0 Locator: N/A
MemberPort: N/A
NibID: 0x21000001 Sequence: 1
Type: 0x41 Flushed: Yes
Age: 00h01m50s
UserKey0: 0x0 VrfNthp: 0
UserKey1: 0x0 Nexthop: 3::4
IFIndex: 0x0 LocalAddr: ::
MemberPort: 0x0
TopoNthp: Invalid ExtType: 0x0
Color: 0 COFlag: 0x0
SIDIndex: 0x0 SRPName:
OriNexthop: ::
RefCnt: 1 FlushRefCnt: 0
Flag: 0x12 Version: 1
ExtFlag: 0x0
1 nexthop(s):
PrefixIndex: 0 OrigNexthop: 3::4
RelyDepth: 1 RealNexthop: ::
Interface: XGE3/1/1 LocalAddr: ::
TunnelCnt: 0 Vrf: default-vrf
TunnelID: N/A Topology:
Weight: 0 Flags: 0x0
SRPolicyNID: 4294967295 SRInterface:
ColorWeight: 0 Locator: N/A
MemberPort: N/A
...
Table 2 Command output
Field |
Description |
NibID |
ID of the NIB. |
Sequence |
Sequence number of the NIB. |
Type |
Type of the NIB. |
Flushed |
Indicates whether the route with the NIB has been flushed to the FIB. |
Age |
Time when the next hop information was updated most recently. |
UserKey0 |
Reserved data 1. |
UserKey1 |
Reserved data 2. |
VrfNthp |
Index of the VPN instance to which the next hop belongs. This field displays 0 if the next hop is on the public network. |
Nexthop |
Next hop address. |
IFIndex |
Interface index |
LocalAddr |
Local interface address. |
MemberPort |
Index of a member port in an aggregation group. |
NewUK0 |
New reserved data 1. This field is not displayed if this attribute is not available. |
NewUK1 |
New reserved data 2. This field is not displayed if this attribute is not available. |
NewUK2 |
New reserved data 3. This field is not displayed if this attribute is not available. |
NewUK3 |
New reserved data 4. This field is not displayed if this attribute is not available. |
NewUK4 |
New reserved data 5. This field is not displayed if this attribute is not available. |
NewUK5 |
New reserved data 6. This field is not displayed if this attribute is not available. |
NewUK6 |
New reserved data 7. This field is not displayed if this attribute is not available. |
NewUK7 |
New reserved data 8. This field is not displayed if this attribute is not available. |
NewUK8 |
New reserved data 9. This field is not displayed if this attribute is not available. |
NewUK9 |
New reserved data 10. This field is not displayed if this attribute is not available. |
NewUK10 |
New reserved data 11. This field is not displayed if this attribute is not available. |
NewUK11 |
New reserved data 12. This field is not displayed if this attribute is not available. |
NewUK12 |
New reserved data 13. This field is not displayed if this attribute is not available. |
TopoNthp |
This field is not supported in the current software version. Index of the topology that contains the next hop. This field displays 0 if the next hop is on the public network. This field displays Invalid if the next hop is on an IPv6 network, because the router does not support non-base topologies. |
ExtType |
NIB extension type. |
Color |
Color extended community attribute. |
COFlag |
Flag of the color extended community attribute. |
SIDIndex |
SID index value. |
SRPName |
SR-MPLS TE policy name. |
OriNexthop |
Original next hop address of the route. If the route is obtained from a BGP UPDATE message, the address is the next hop IP address in the BGP UPDATE message. |
RefCnt |
Reference count of the next hop. |
FlushRefCnt |
Reference count of the next hop that is flushed to the FIB. |
Flag |
Flag of the next hop. |
Version |
Version of the next hop. |
ExtFlag |
Extended flag of the next hop. |
x nexthop(s) |
Number of next hops. |
Tnl-Policy |
Tunnel policy. |
PrefixIndex |
Prefix index of the next hop for an ECMP route. |
Vrf |
VPN instance name. For the public network, this field displays default-vrf. |
OrigNexthop |
Original next hop. |
RealNexthop |
Real next hop. |
Interface |
Output interface. |
localAddr |
Local interface address. |
RelyDepth |
Recursion depth. |
TunnelCnt |
Number of tunnels after route recursion. |
TunnelID |
ID of the tunnel after route recursion. |
Topology |
This field is not supported in the current software version. Topology name. This field is blank for IPv6, because IPv6 does not support non-base topologies. |
Weight |
ECMP route weight. This field displays 0 for non-ECMP routes. |
Flags |
Flags of the detailed next hop. |
SRPolicyNID |
NIB ID of the route obtained from an SR-MPLS TE policy through route recursion. |
SRInterface |
Output interface of the route obtained from the SR-MPLS TE policy through route recursion. |
ColorWeight |
Weight value of the color attribute in the SR-MPLS TE policy. |
Locator |
IPv6 prefix of the locator to which the SID belongs. If no locator is available, this field displays N/A. |
MemberPort |
Number of a member port in an aggregation group. If this attribute is not available, this field displays N/A. |
display ipv6 route-static routing-table
Use display ipv6 route-static routing-table to display IPv6 static routing table information.
Syntax
display ipv6 route-static routing-table [ vpn-instance vpn-instance-name ] [ ipv6-address prefix-length ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, the command displays IPv6 static routing table information for the public network.
ipv6-address: Specifies the destination IPv6 address.
prefix-length: Specifies the prefix length in the range of 0 to 128.
Examples
# Display IPv6 static routing table information.
<Sysname> display ipv6 route-static routing-table
Total number of routes: 5
Status: * - valid
*Destination: 1::1/128
NibID: 0x21000000 NextHop: 2::2
MainNibID: N/A BkNextHop: N/A
BkNibID: N/A Interface: Ten-GigabitEthernet3/1/1
TableID: 0xa BkInterface: N/A
Flag: 0x80d0a BfdSrcIp: N/A
DbIndex: 0x3 BfdIfIndex: 0x0
Type: Normal BfdVrfIndex: 0
TrackIndex: 0xffffffff Label: NULL
Preference: 60 vrfIndexDst: 0
BfdMode: N/A vrfIndexNH: 0
Permanent: 0 Tag: 0
BfdStatic: bfd01
*Destination: 1::1234/128
NibID: 0x21000000 NextHop: 2::2
MainNibID: N/A BkNextHop: N/A
BkNibID: N/A Interface: NULL0
TableID: 0xa BkInterface: N/A
Flag: 0x80d0a BfdSrcIp: N/A
DbIndex: 0x1 BfdIfIndex: 0x0
Type: Normal BfdVrfIndex: 0
TrackIndex: 0xffffffff Label: NULL
Preference: 60 vrfIndexDst: 0
BfdMode: N/A vrfIndexNH: 0
Permanent: 0 Tag: 0
...
Table 3 Command output
Field |
Description |
Destination |
Destination address/prefix. |
NibID |
ID of the NIB. |
MainNibID |
ID of the primary next hop for static route FRR. |
BkNibID |
ID of the backup next hop for static route FRR. |
NextHop |
Next hop address. |
BkNextHop |
Backup next hop address. |
Interface |
Output interface of the route. |
BkInterface |
Backup output interface. |
TableID |
ID of the table to which the route belongs. |
DbIndex |
Index of the database to which the route belongs. |
Type |
Route type: · Normal. · DHCP. · NAT. |
BfdSrcIp |
Source IPv6 address of the indirect BFD session. |
BfdIfIndex |
Index of the interface where BFD is enabled. |
BfdVrfIndex |
Index of the VPN instance where BFD is enabled. This field displays 0 if BFD is enabled for the public network. |
BfdMode |
BFD session mode: · N/A—No BFD session is configured. · Ctrl—Control packet mode. · Echo—Echo packet mode. |
TrackIndex |
NQA Track index. |
vrfIndexDst |
Index of the VPN instance to which the destination belongs. For the public network, this field displays 0. |
vrfIndexNH |
Index of the VPN instance to which the next hop belongs. For the public network, this field displays 0. |
Permanent |
Permanent static route flag. 1 indicates a permanent static route. |
BfdStatic |
Name of the static BFD session associated with the route. This field is not displayed if no static BFD session has been associated with the route. |
ipv6 route-static
Use ipv6 route-static to configure an IPv6 static route.
Use undo ipv6 route-static to remove an IPv6 static route.
Syntax
ipv6 route-static ipv6-address prefix-length { interface-type interface-number [ next-hop-address ] [ bfd { { control-packet | echo-packet } [ bfd-source ipv6-address ] | static session-name } | permanent | track track-entry-number ] | [ vpn-instance d-vpn-instance-name ] next-hop-address [ bfd { control-packet bfd-source ipv6-address | static session-name } | permanent | track track-entry-number ] } [ preference preference ] [ tag tag-value ] [ no-advertise ] [ description text ]
undo ipv6 route-static ipv6-address prefix-length [ interface-type interface-number [ next-hop-address ] | [ vpn-instance d-vpn-instance-name ] next-hop-address | srv6-policy { color color-value end-point ipv6 ipv6-address | name policy-name } ] [ preference preference ]
ipv6 route-static ipv6-address prefix-length { remote-sid remote-sid locator-prefix-len | srv6-policy { color color-value end-point ipv6 ipv6-address | name policy-name } [ sid sid ] } * [ preference preference ] [ tag tag-value ] [ no-advertise ] [ description text ]
undo ipv6 route-static ipv6-address prefix-length [ remote-sid remote-sid locator-prefix-len | srv6-policy { color color-value end-point ipv6 ipv6-address | name policy-name } ] * [ preference preference ]
ipv6 route-static ipv6-address prefix-length vpn-instance d-vpn-instance-name [ preference preference ] [ tag tag-value ] [ no-advertise ] [ description text ]
undo ipv6 route-static ipv6-address prefix-length [ vpn-instance d-vpn-instance-name ]
Default
No IPv6 static route is configured.
Views
System view
Predefined user roles
network-admin
Parameters
ipv6-address prefix-length: Specifies the IPv6 address and prefix length.
interface-type interface-number: Specifies an output interface by its type and number. If the output interface is an NBMA interface or broadcast interface and not a point-to-point (P2P) interface, the next hop address must be specified.
next-hop-address: Specifies the next hop IPv6 address.
bfd: Enables BFD to detect reachability of the static route's next hop. For more information about BFD, see High Availability Configuration Guide.
control-packet: Specifies the BFD control packet mode.
bfd-source ipv6-address: Specifies the source IPv6 address of BFD packets.
echo-packet: Specifies the BFD echo packet mode.
static session-name: Associates the IPv6 static route with a static BFD session. The session-name argument represents the static BFD session name, a case-sensitive string of 1 to 64 characters. If you specify a nonexistent static BFD session, you must create the static BFD session to have the configuration take effect.
permanent: Specifies the IPv6 route as a permanent IPv6 static route. After you specify this keyword, the static route will always be active, even if the output interface is down.
track track-entry-number: Associates the IPv6 static route with a track entry specified by its number in the range of 1 to 1024. For more information about Track, see High Availability Configuration Guide.
public: Indicates the next hop is on the public network.
vpn-instance d-vpn-instance-name: Specifies a destination MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify the next-hop-address argument following this option, the device searches for the output interface in the specified destination VPN instance for packets matching the static route. If you specify the next-hop-address argument and this option, the device searches for the output interface in the specified destination VPN instance based on the specified next hop address for packets matching the static route.
remote-sid remote-sid locator-prefix-len: Enables the IPv6 static route to forward packets in SRv6 BE mode. The remote-sid argument specifies the SRv6 SID of the SRv6 BE destination node. The locator-prefix-len argument specifies the locator length for the SRv6 SID. The remote-sid and locator-prefix-len arguments uniquely identifies a locator. The device will perform SRv6 encapsulation for packets and forward the packets according to the IGP routes associated with the locator.
srv6-policy name policy-name: Specifies an SRv6 TE policy by its name for IPv6 static route recursion. The policy-name argument represents the SRv6 TE policy name, a case-sensitive string of 1 to 59 characters. For more information about SRv6 TE policies, see Segment Routing Configuration Guide.
srv6-policy color color-value end-point ipv6 ipv6-address: Specifies an SRv6 TE policy by its color and endpoint attributes for IPv6 static route recursion. The color-value argument represents the color attribute value of the SRv6 TE policy, in the range of 0 to 4294967295. The ipv6-address argument represents the endpoint IPv6 address of the SRv6 TE policy.
sid sid: Specifies the SRv6 SID of the endpoint. Packets forwarded through the SRv6 TE policy will be further forwarded based on the SRv6 SID.
preference preference: Specifies a preference for IPv6 static routes, in the range of 1 to 255. The default is 60.
tag tag-value: Sets a tag for marking the static route, in the range of 1 to 4294967295. The default is 0. Tags of routes are used for route control in routing policies. For more information about routing policies, see Layer 3—IP Routing Configuration Guide.
no-advertise: Disables advertisement for the IPv6 static route. With this keyword, the IPv6 static route can be imported to the IGP or BGP routing table, but cannot be advertised to neighbors. If multiple next hops are configured for the same IPv6 static route prefix, the device flushes only the optimal IPv6 static routes to the IP routing table. If the optimal IPv6 static routes are imported to the IGP or BGP routing table, you must specify this keyword for each optimal IPv6 static route. If you do not specify this keyword for an optimal IPv6 static route, the device still can advertise that route to neighbors.
description text: Configures a description for the IPv6 static route, which consists of 1 to 150 characters, including special characters such as the space, but excluding the question mark (?).
Usage guidelines
An IPv6 static route that has the destination address configured as ::/0 (a prefix length of 0) is the default IPv6 route. If the destination address of an IPv6 packet does not match any entry in the routing table, this default route is used to forward the packet.
Follow these guidelines to configure the output interface, next hop address, or both for a static route:
· If the output interface is a broadcast interface or an NBMA interface, the next hop address must be specified.
· If the output interface is a P2P interface, you can specify only the output interface. You do not need to change the configuration of the route even if the peer address is changed.
Follow these guidelines when you configure BFD for IPv6 static routes:
· In BFD control packet mode, if you specify the source IPv6 address of BFD packets, you must specify the IPv6 address as the next hop IPv6 address on the peer device.
· In BFD control packet mode, 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.
· To use a static BFD session to detect next hop reachability for an IPv6 static route, you must perform the following tasks:
¡ Specify the IPv6 address of the output interface of the static route as the source address of the static BFD session.
¡ Specify the IPv6 address of the next hop of the static route as the peer address of the static BFD session.
· In BFD echo packet mode, the next hop IPv6 address of echo packets must be a global unicast address.
· Enabling BFD for a flapping route could worsen the route flapping situation. Therefore, use it with caution.
For static routing-Track-NQA collaboration, you must configure the same VPN instance ID for the next hop to be detected and the NQA operation.
If you specify both the remote-sid remote-sid locator-prefix-len option and srv6-policy keyword, the IPv6 static route is preferentially recursed to the SRv6 TE policy. When the SRv6 TE policy becomes unavailable, the IPv6 static route will forward packets in SRv6 BE mode.
The remote-sid and sid keywords are mutually exclusive. You cannot specify both of them.
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 IPv6 PBR configuration in Layer 3—IP Routing Configuration Guide.
Examples
# Configure an IPv6 static route, with the destination address 1:1:2::/64 and next hop 1:1:3::1.
<Sysname> system-view
[Sysname] ipv6 route-static 1:1:2:: 64 1:1:3::1
Related commands
bfd static (High Availability Command Reference)
display ipv6 routing-table protocol
ipv6 route-static bfd
Use ipv6 route-static bfd to configure BFD session parameters for an IPv6 static route.
Use undo ipv6 route-static bfd to restore the default.
Syntax
BFD control packet mode for single-hop detection and BFD echo packet mode:
ipv6 route-static bfd interface-type interface-number next-hop-address { detect-multiplier detect-multiplier | min-echo-receive-interval min-echo-receive-interval | min-receive-interval min-receive-interval | min-transmit-interval min-transmit-interval } *
undo ipv6 route-static bfd interface-type interface-number next-hop-address
BFD control packet mode for multihop detection:
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 } *
undo ipv6 route-static bfd [ vpn-instance d-vpn-instance-name ] next-hop-address
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).
Views
System view
Predefined user roles
network-admin
Parameters
interface-type interface-number: Specifies an output interface by its type and number.
vpn-instance d-vpn-instance-name: Specifies a destination MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If the next hop of the IPv6 static route belongs to the public network, do not specify this option.
next-hop-address: Specifies the IPv6 address of the next hop.
source-ipv6 ipv6-address: Specifies a source IPv6 address for BFD packets.
detect-multiplier detect-multiplier: Sets the BFD detection time multiplier. The value range for the detect-multiplier argument is 3 to 50. The default value is 5.
min-echo-receive-interval min-echo-receive-interval: Sets the minimum interval for receiving BFD echo packets, in milliseconds. The value range for the min-echo-receive-interval argument is 3 to 10000.
min-receive-interval min-receive-interval: Sets the minimum interval for receiving BFD control packets, in milliseconds. The value range for the min-receive-interval argument is 3 to 10000.
min-transmit-interval min-transmit-interval: Sets the minimum interval for transmitting BFD control packets, in milliseconds. The value range for the min-transmit-interval argument is 3 to 10000.
Usage guidelines
Use this command to configure BFD session parameters for an IPv6 static route, including parameters that determine the BFD detection time. The BFD detection time = detect-multiplier × max (min-echo-receive-interval, min-receive-interval, min-transmit-interval). For more information about the calculation method of BFD detection time, see BFD in High Availability Command Reference.
If you specify the output interface when executing this command, support for the BFD session parameters varies by BFD session mode.
· Echo-mode BFD sessions support only the min-echo-receive-interval and detect-multiplier parameters.
· Control-mode BFD sessions for single-hop detection support only the min-receive-interval, min-transmit-interval, and detect-multiplier parameters.
To apply the configured BFD session parameters, use one of the following combinations of parameters to specify an IPv6 static route:
· In control packet mode for single-hop detection and in echo packet mode, use the output interface and next hop IPv6 address.
· In control packet mode for multihop detection, use the next hop IPv6 address and BFD packet source IPv6 address. If the next hop belongs to a VPN instance, use the destination VPN instance, next hop IPv6 address, and BFD packet source IPv6 address to specify the IPv6 static route.
For an unspecified BFD session parameter, the IPv6 static route uses the value of the corresponding common BFD session parameter.
Examples
# Configure BFD session parameters for the IPv6 static route with output interface Ten-GigabitEthernet 3/1/1 and next hop 1:2::3:4. The BFD detection time multiplier is 20 and the minimum interval for receiving BFD echo packets is 1000 milliseconds.
<Sysname> system-view
[Sysname] ipv6 route-static bfd ten-gigabitethernet 3/1/1 1:2::3:4 detect-multiplier 20 min-echo-receive-interval 1000
ipv6 route-static default-preference
Use ipv6 route-static default-preference to set a default preference for IPv6 static routes.
Use undo ipv6 route-static default-preference to restore the default.
Syntax
ipv6 route-static default-preference default-preference
undo ipv6 route-static default-preference
Default
The default preference of IPv6 static routes is 60.
Views
System view
Predefined user roles
network-admin
Parameters
default-preference: Specifies a default preference for IPv6 static routes, in the range of 1 to 255.
Usage guidelines
If no preference is specified for an IPv6 static route, the default preference applies.
When the default preference is reconfigured, it applies only to newly added IPv6 static routes.
Examples
# Set a default preference of 120 for IPv6 static routes.
[Sysname] ipv6 route-static default-preference 120
Related commands
display ipv6 routing-table protocol
ipv6 route-static fast-reroute auto
Use ipv6 route-static fast-reroute auto to configure IPv6 static route FRR to automatically select a backup next hop.
Use undo ipv6 route-static fast-reroute auto to disable IPv6 static route FRR from automatically selecting a backup next hop.
Syntax
ipv6 route-static fast-reroute auto
undo ipv6 route-static fast-reroute auto
Default
IPv6 static route FRR is disabled from automatically selecting a backup next hop.
Views
System view
Predefined user roles
network-admin
Examples
# Configure IPv6 static route FRR to automatically select a backup next hop.
<Sysname> system-view
[Sysname] ipv6 route-static fast-reroute auto
ipv6 route-static primary-path-detect bfd echo
Use ipv6 route-static primary-path-detect bfd echo to enable BFD echo packet mode for IPv6 static route FRR.
Use undo ipv6 route-static primary-path-detect bfd to disable BFD echo packet mode for IPv6 static route FRR.
Syntax
ipv6 route-static primary-path-detect bfd echo
undo ipv6 route-static primary-path-detect bfd
Default
BFD echo packet mode is disabled for IPv6 static route FRR.
Views
System view
Predefined user roles
network-admin
Usage guidelines
For quicker IPv6 static route FRR, use BFD echo packet mode on the primary link of redundant links to detect link failure.
Examples
# Enable BFD echo packet mode for IPv6 static route FRR.
<Sysname> system-view
[Sysname] ipv6 route-static primary-path-detect bfd echo
ipv6 route-static recursive-lookup segment-routing-ipv6
Use ipv6 route-static recursive-lookup segment-routing-ipv6 to allow IPv6 static routes to inherit the SRv6 encapsulation information of the related routes obtained through route recursion.
Use undo ipv6 route-static recursive-lookup segment-routing-ipv6 to restore the default.
Syntax
ipv6 route-static recursive-lookup segment-routing-ipv6
undo ipv6 route-static recursive-lookup segment-routing-ipv6
Default
IPv6 static routes are not allowed to inherit the SRv6 encapsulation information of the related routes obtained through route recursion.
Views
System view
Predefined user roles
network-admin
Usage guidelines
Route recursion is required if the next hop of an IPv6 static route is not directly connected. By default, an IPv6 static route does not inherit the SRv6 encapsulation information of the related route obtained through route recursion if the next hop of the IPv6 static route is recursed to an SRv6 BE or SRv6 TE policy path. That is, the device does not add SRv6 encapsulation to the packets that match the IPv6 static route. The packets are forwarded out of the output interface according to the recursion result.
To allow an IPv6 static route to inherit the SRv6 encapsulation information of the related route obtained through route recursion when the next hop of the IPv6 static route is recursed to an SRv6 BE or SRv6 TE policy path, use this command. With this command, the device adds SRv6 encapsulation to the packets that match the IPv6 static route and forwards the encapsulated packets in SRv6 BE mode or through the matching SRv6 TE policy.
For more information about the SRv6 BE mode, 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.
Examples
# Allow IPv6 static routes to inherit the SRv6 encapsulation information of the related routes obtained through route recursion.
<Sysname> system-view
[Sysname] ipv6 route-static recursive-lookup segment-routing-ipv6
ipv6 route-static vpn-instance
Use ipv6 route-static vpn-instance to configure an IPv6 static route in a VPN instance.
Use undo ipv6 route-static vpn-instance to delete an IPv6 static route from a VPN instance.
Syntax
ipv6 route-static vpn-instance s-vpn-instance-name ipv6-address prefix-length interface-type interface-number [ next-hop-address ] [ bfd { { control-packet | echo-packet } [ bfd-source ipv6-address ] | static session-name } | permanent | track track-entry-number ] [ 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 [ public ] [ bfd { control-packet bfd-source ipv6-address | static session-name } | permanent | track track-entry-number ] [ preference preference ] [ tag tag-value ] [ no-advertise ] [ description text ]
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 } | permanent | track track-entry-number ] [ preference preference ] [ tag tag-value ] [ no-advertise ] [ description text ]
undo ipv6 route-static vpn-instance s-vpn-instance-name ipv6-address prefix-length [ interface-type interface-number [ next-hop-address ] | next-hop-address [ public ] | vpn-instance d-vpn-instance-name next-hop-address ] [ preference preference ]
ipv6 route-static vpn-instance s-vpn-instance-name ipv6-address prefix-length { remote-sid remote-sid locator-prefix-len | srv6-policy { color color-value end-point ipv6 ipv6-address | name policy-name } [ sid sid ] } * [ preference preference ] [ tag tag-value ] [ no-advertise ] [ description text ]
undo ipv6 route-static vpn-instance s-vpn-instance-name ipv6-address prefix-length [ remote-sid remote-sid locator-prefix-len | srv6-policy { color color-value end-point ipv6 ipv6-address | name policy-name } ] * [ preference preference ]
ipv6 route-static vpn-instance s-vpn-instance-name ipv6-address prefix-length { public | vpn-instance d-vpn-instance-name } [ preference preference ] [ tag tag-value ] [ no-advertise ] [ description text ]
undo ipv6 route-static vpn-instance s-vpn-instance-name ipv6-address prefix-length [ public | vpn-instance d-vpn-instance-name ]
Default
No IPv6 static route is configured in a VPN instance.
Views
System view
Predefined user roles
network-admin
Parameters
s-vpn-instance-name: Specifies a source MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. Each VPN instance has its own routing table, and the configured IPv6 static route is installed in the routing tables of the specified VPN instances.
ipv6-address prefix-length: Specifies the IPv6 address and prefix length.
interface-type interface-number: Specifies an output interface by its type and number. If the output interface is a non-P2P interface (for example, an NBMA interface or broadcast interface), the next hop address must be specified.
next-hop-address: Specifies the next hop IPv6 address.
bfd: Enables BFD to detect reachability of the static route's next hop. For more information about BFD, see High Availability Configuration Guide.
control-packet: Specifies the BFD control packet mode.
bfd-source ipv6-address: Specifies the source IPv6 address of BFD packets.
echo-packet: Specifies the BFD echo packet mode.
static session-name: Associates the IPv6 static route with a static BFD session. The session-name argument represents the static BFD session name, a case-sensitive string of 1 to 64 characters. If you specify a nonexistent static BFD session, you must create the static BFD session to have the configuration take effect.
permanent: Specifies the IPv6 route as a permanent IPv6 static route. If the output interface is down, the permanent IPv6 static route is still active.
track track-entry-number: Associates the IPv6 static route with a track entry specified by its number in the range of 1 to 1024. For more information about Track, see High Availability Configuration Guide.
public: Specifies the public network. If you specify this keyword following the next-hop-address argument, the next hop is on the public network. The device searches for the output interface in the public network based on the next hop address for packets matching the static route. If you specify the next-hop-address argument without specifying the public keyword, the device searches for the output interface in the source VPN instance based on the next hop address for packets matching the static route. If you specify the public keyword without specifying the next-hop-address argument, the device searches for the output interface in the public network for packets matching the static route.
vpn-instance d-vpn-instance-name: Specifies a destination MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify the next-hop-address argument following this option, the device searches for the output interface in the specified destination VPN instance for packets matching the static route. If you specify the next-hop-address argument and this option, the device searches for the output interface in the specified destination VPN instance based on the specified next hop address for packets matching the static route.
remote-sid remote-sid locator-prefix-len: Enables the IPv6 static route to forward packets in SRv6 BE mode. The remote-sid argument specifies the SRv6 SID of the SRv6 BE destination node. The locator-prefix-len argument specifies the locator length for the SRv6 SID. The remote-sid and locator-prefix-len arguments uniquely identifies a locator. The device will perform SRv6 encapsulation for packets and forward the packets according to the IGP routes associated with the locator.
srv6-policy name policy-name: Specifies an SRv6 TE policy by its name for IPv6 static route recursion. The policy-name argument represents the SRv6 TE policy name, a case-sensitive string of 1 to 59 characters. For more information about SRv6 TE policies, see Segment Routing Configuration Guide.
srv6-policy color color-value end-point ipv6 ipv6-address: Specifies an SRv6 TE policy by its color and endpoint attributes for IPv6 static route recursion. The color-value argument represents the color attribute value of the SRv6 TE policy, in the range of 0 to 4294967295. The ipv6-address argument represents the endpoint IPv6 address of the SRv6 TE policy.
sid sid: Specifies the SRv6 SID of the endpoint. Packets forwarded through the SRv6 TE policy will be further forwarded based on the SRv6 SID.
preference preference: Specifies a preference for IPv6 static routes, in the range of 1 to 255. The default is 60.
tag tag-value: Sets a tag for marking the static route, in the range of 1 to 4294967295. The default is 0. Tags of routes are used for route control in routing policies. For more information about routing policies, see Layer 3—IP Routing Configuration Guide.
no-advertise: Disables advertisement for the IPv6 static route. With this keyword, the IPv6 static route can be imported to the IGP or BGP routing table, but cannot be advertised to neighbors. If multiple next hops are configured for the same IPv6 static route prefix, the device flushes only the optimal IPv6 static routes to the IP routing table. If the optimal IPv6 static routes are imported to the IGP or BGP routing table, you must specify this keyword for each optimal IPv6 static route. If you do not specify this keyword for an optimal IPv6 static route, the device still can advertise that route to neighbors.
description text: Configures a description for the IPv6 static route, a string of 1 to 150 characters, including special characters such as the space, but excluding the question mark (?).
Usage guidelines
An IPv6 static route that has the destination address configured as ::/0 (a prefix length of 0) is the default IPv6 route. If the destination address of an IPv6 packet does not match any entry in the routing table, this default route is used to forward the packet.
If you specify a destination VPN instance but do not specify a next hop address, the source and destination VPN instances cannot be the same one.
Follow these guidelines to configure the output interface, next hop address, or both for a static route:
· If the output interface is a broadcast interface or an NBMA interface, the next hop address must be specified.
· If the output interface is a P2P interface, you can specify only the output interface. You do not need to change the configuration of the route even if the peer address is changed.
Follow these guidelines when you configure BFD for IPv6 static routes:
· In BFD control packet mode, if you specify the source IPv6 address of BFD packets, you must specify the IPv6 address as the next hop IPv6 address on the peer device.
· In BFD control packet mode, 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.
· To use a static BFD session to detect next hop reachability for an IPv6 static route, the static BFD session and the next hop of the static route must belong to the same VPN instance. In addition, you must perform the following tasks:
¡ Specify the IPv6 address of the output interface of the static route as the source address of the static BFD session.
¡ Specify the IPv6 address of the next hop of the static route as the peer address of the static BFD session.
· In BFD echo packet mode, the next hop IPv6 address of echo packets must be a global unicast address.
· Enabling BFD for a flapping route could worsen the route flapping situation. Therefore, use it with caution.
For static routing-Track-NQA collaboration, you must configure the same VPN instance ID for the next hop to be detected and the NQA operation.
If you specify both the remote-sid remote-sid locator-prefix-len option and srv6-policy keyword, the IPv6 static route is preferentially recursed to the SRv6 TE policy. When the SRv6 TE policy becomes unavailable, the IPv6 static route will forward packets in SRv6 BE mode.
The remote-sid and sid keywords are mutually exclusive. You cannot specify both of them.
Examples
# Configure an IPv6 static route in VPN instance vpn1, whose destination address is 1:1:2::/64 and next hop address is 1:1:3::1 in VPN instance vpn2.
<Sysname> system-view
[Sysname] ipv6 route-static vpn-instance vpn1 1:1:2:: 64 vpn-instance vpn2 1:1:3::1
Related commands
bfd static (High Availability Command Reference)
display ipv6 routing-table protocol