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 } | permanent ] | next-hop-address [ bfd control-packet bfd-source ipv6-address | permanent ] | vpn-instance d-vpn-instance-name next-hop-address [ bfd control-packet bfd-source ipv6-address | permanent ] } [ preference preference-value ] [ tag tag-value ] [ description description-text ]
undo ipv6 route-static ipv6-address prefix-length [ interface-type interface-number [ next-hop-address ] | next-hop-address | vpn-instance d-vpn-instance-name next-hop-address ] [ preference preference-value ]
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 } | permanent ] | next-hop-address [ public ] [ bfd control-packet bfd-source ipv6-address | permanent ] | vpn-instance d-vpn-instance-name next-hop-address [ bfd control-packet bfd-source ipv6-address | permanent ] } [ preference preference-value ] [ tag tag-value ] [ description 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-value ]
Default
No IPv6 static route is configured.
Views
System view
Predefined user roles
network-admin
mdc-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 (such as an Ethernet interface or a VLAN interface), rather than 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. When the next hop is unreachable, the system immediately switches to the backup route.
control-packet: Specifies the BFD control mode.
bfd-source ipv6-address: Specifies the source IPv6 address of BFD packets. As a best practice, specify the loopback interface address.
echo-packet: Specifies the BFD echo mode.
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-value: 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 description-text: Configures a description for the IPv6 static route, which consists of 1 to 60 characters, including special characters like the space, but excluding the question mark (?).
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 has its own routing table, and the configured static route is installed in the routing tables of the specified VPNs.
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 the output interface is a broadcast interface (such as an Ethernet interface or a VLAN interface), you must specify the next hop address for a static route.
Follow these guidelines when you configure a static route:
Enabling BFD for a flapping route could worsen the 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 or track keyword.
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