- Table of Contents
-
- 06-Layer 3—IP Routing Command Reference
- 00-Preface
- 01-Basic IP routing commands
- 02-Static routing commands
- 03-OSPF commands
- 04-IS-IS commands
- 05-Basic BGP commands
- 06-Advanced BGP commands
- 07-Policy-based routing commands
- 08-IPv6 static routing commands
- 09-OSPFv3 commands
- 10-IPv6 policy-based routing commands
- 11-Routing policy commands
- 12-DCN commands
- Related Documents
-
Title | Size | Download |
---|---|---|
08-IPv6 static routing commands | 106.01 KB |
display ipv6 route-static routing-table
ipv6 route-static default-preference
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
UserKey2: 0x0 IFIndex: 0x10001
UserKey3: 0x0 LocalAddr: ::
TopoNthp: Invalid ExtType: 0x0
Color: 0 COFlag: 0x0
LinkID: 0x0
SIDIndex: 0x0 SRPName:
OriNexthop: ::
NibID: 0x21000001 Sequence: 1
Type: 0x41 Flushed: Yes
Age: 00h01m50s
UserKey0: 0x0 VrfNthp: 0
UserKey1: 0x0 Nexthop: 3::4
UserKey2: 0x0 IFIndex: 0x10002
UserKey3: 0x0 LocalAddr: ::
TopoNthp: Invalid ExtType: 0x0
Color: 0 COFlag: 0x0
LinkID: 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 |
Elapsed time since the next hop information was last updated. |
UserKey0 |
Reserved data 1. |
UserKey1 |
Reserved data 2. |
UserKey2 |
Reserved data 3. |
UserKey3 |
Reserved data 4. |
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. |
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 |
This field is not supported in the current software version. Color extended community attribute. |
COFlag |
This field is not supported in the current software version. Flag of the color extended community attribute. |
LinkID |
This field is not supported in the current software version. Link ID of the SDWAN TTE connection. |
SIDIndex |
This field is not supported in the current software version. SID index value. |
SRPName |
This field is not supported in the current software version. 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
UserKey2: 0x0 IFIndex: 0x10001
UserKey3: 0x0 LocalAddr: ::
TopoNthp: Invalid ExtType: 0x0
Color: 0 COFlag: 0x0
LinkID: 0x0
SIDIndex: 0x0 SRPName:
OriNexthop: ::
RefCnt: 1 FlushRefCnt: 0
Flag: 0x12 Version: 1
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
OrigLinkID: 0x0 RealLinkID: 0x0
NibID: 0x21000001 Sequence: 1
Type: 0x41 Flushed: Yes
Age: 00h01m50s
UserKey0: 0x0 VrfNthp: 0
UserKey1: 0x0 Nexthop: 3::4
UserKey2: 0x0 IFIndex: 0x10002
UserKey3: 0x0 LocalAddr: ::
TopoNthp: Invalid ExtType: 0x0
Color: 0 COFlag: 0x0
LinkID: 0x0
SIDIndex: 0x0 SRPName:
OriNexthop: ::
RefCnt: 1 FlushRefCnt: 0
Flag: 0x12 Version: 1
1 nexthop(s):
PrefixIndex: 0 OrigNexthop: 3::4
RelyDepth: 1 RealNexthop: ::
Interface: Vlan11 LocalAddr: ::
TunnelCnt: 0 Vrf: default-vrf
TunnelID: N/A Topology:
Weight: 0 Flags: 0x0
SRPolicyNID: 4294967295 SRInterface:
ColorWeight: 0 Locator: N/A
OrigLinkID: 0x0 RealLinkID: 0x0
...
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 |
Elapsed time since the next hop information was last updated. |
UserKey0 |
Reserved data 1. |
UserKey1 |
Reserved data 2. |
UserKey2 |
Reserved data 3. |
UserKey3 |
Reserved data 4. |
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. |
TopoNthp |
Non-base topologies are 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 |
This field is not supported in the current software version. Color extended community attribute. |
COFlag |
This field is not supported in the current software version. Flag of the color extended community attribute. |
LinkID |
Link ID of the SDWAN TTE connection. |
SIDIndex |
This field is not supported in the current software version. SID index value. |
SRPName |
This field is not supported in the current software version. 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. |
x nexthop(s) |
Number of next hops. |
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 |
This field is not supported in the current software version. Number of tunnels after route recursion. |
TunnelID |
This field is not supported in the current software version. 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 |
This field is not supported in the current software version. NIB ID of the route obtained from an SR-MPLS TE policy through route recursion. |
SRInterface |
This field is not supported in the current software version. Output interface of the route obtained from the SR-MPLS TE policy through route recursion. |
ColorWeight |
This field is not supported in the current software version. Weight value of the color attribute in the SR-MPLS TE policy. |
Locator |
This field is not supported in the current software version. IPv6 prefix of the locator to which the SID belongs. If no locator is available, this field displays N/A. |
OrigLinkID |
This field is not supported in the current software version. Original link ID of the SDWAN TTE connection. |
RealLinkID |
This field is not supported in the current software version. Real link ID of the SDWAN TTE connection. |
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: Vlan-interface11
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
*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. |
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 |
This field is not supported in the current software version. NQA Track index. |
Label |
This field is not supported in the current software version. Label of the route. |
Preference |
Preference of the route. |
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. |
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 ] | permanent ] [ preference preference ] [ tag tag-value ] [ description text ]
ipv6 route-static ipv6-address prefix-length next-hop-address [ recursive-lookup longest-match ] [ bfd control-packet bfd-source ipv6-address | permanent ] [ preference preference ] [ tag tag-value ] [ description text ]
ipv6 route-static ipv6-address prefix-length vpn-instance d-vpn-instance-name next-hop-address [ recursive-lookup longest-match ] [ bfd control-packet bfd-source ipv6-address | permanent ] } [ preference preference ] [ tag tag-value ] [ 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 ] [ preference preference ]
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 not a point-to-point (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.
recursive-lookup longest-match: Specifies the longest match principle for static route recursion.
bfd: Enables BFD to detect reachability of the static route's next hop.
control-packet: Specifies the BFD control packet mode.
echo-packet: Specifies the BFD echo packet mode.
bfd-source ipv6-address: Specifies the source IPv6 address of BFD packets.
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.
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 a destination VPN is specified, packets will search for the output interface based on the specified next hop (IPv6 address) for the static route.
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.
description text: Configures a description for the IPv6 static route, which consists of 1 to 60 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:
· 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.
Follow these guidelines when you configure a static route:
· Enabling BFD for a flapping route could worsen the route flapping situation. Therefore, use it with caution. For more information about BFD, see High Availability Configuration Guide.
· The next hop IPv6 address of echo packets must be a global unicast address.
· Do not specify the permanent keyword together with the bfd keyword.
If you do not specify the recursive-lookup longest-match keyword, the device preferentially recurses the IPv6 static route to a direct route. If no matching direct route is found, the device performs IPv6 static route recursion based on the longest match principle. When recursing the IPv6 static route to a direct route, the device takes the next hop of the IPv6 static route as directly connected. In fact, the next hop might be incorrect and packets might fail to be forwarded based on the IPv6 static route.
If you specify the recursive-lookup longest-match keyword, the device performs IPv6 static route recursion based on the longest match principle to make sure that the next hop is correct.
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
display ipv6 routing-table protocol
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 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 ] | permanent ] [ preference preference ] [ tag tag-value ] [ description text ]
ipv6 route-static vpn-instance s-vpn-instance-name ipv6-address prefix-length next-hop-address [ recursive-lookup longest-match ] [ public ] [ bfd control-packet bfd-source ipv6-address | permanent ] [ preference preference ] [ tag tag-value ] [ description text ]
ipv6 route-static vpn-instance s-vpn-instance-name ipv6-address prefix-length vpn-instance d-vpn-instance-name next-hop-address [ recursive-lookup longest-match ] [ bfd control-packet bfd-source ipv6-address | permanent ] [ preference preference ] [ tag tag-value ] [ 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 ]
Default
No IPv6 static route is configured in a VPN instance.
Views
System view
Predefined user roles
network-admin
Parameters
vpn-instance 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.
recursive-lookup longest-match: Specifies the longest match principle for static route recursion.
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.
echo-packet: Specifies the BFD echo packet mode.
bfd-source ipv6-address: Specifies the source IPv6 address of BFD packets.
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.
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 a destination VPN is specified, packets will search for the output interface based on the specified next hop (IPv6 address) for the static route.
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.
description text: Configures a description for the IPv6 static route, a string of 1 to 60 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:
· 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.
· 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.
· Enabling BFD for a flapping route could worsen the route flapping situation. Therefore, use it with caution. For more information about BFD, see High Availability Configuration Guide.
· The next hop IPv6 address of echo packets must be a global unicast address.
· You cannot specify both the permanent and bfd keywords.
If you do not specify the recursive-lookup longest-match keyword, the device preferentially recurses the IPv6 static route to a direct route. If no matching direct route is found, the device performs IPv6 static route recursion based on the longest match principle. When recursing the IPv6 static route to a direct route, the device takes the next hop of the IPv6 static route as directly connected. In fact, the next hop might be incorrect and packets might fail to be forwarded based on the IPv6 static route.
If you specify the recursive-lookup longest-match keyword, the device performs IPv6 static route recursion based on the longest match principle to make sure that the next hop is correct.
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
display ipv6 routing-table protocol