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 ] | [ vpn-instance d-vpn-instance-name ] next-hop-address [ 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 ]

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 ] | 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 ] [ 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.

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.

control-packet: Specifies the BFD control mode.

bfd-source ipv6-address: Specifies the source IPv6 address of BFD packets.

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: 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 (?).

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.

Follow these guidelines to configure the output interface, next hop address, or both for a static route:

Follow these guidelines when you configure BFD for IPv6 static routes:

Follow these guidelines when you configure a static route:

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