ipv6 nd ra prefix
Function
The ipv6 nd ra prefix command configures the prefix in an RA packet.
The undo ipv6 nd ra prefix command deletes the prefix in an RA packet.
By default, an RA packet carries only the address prefix configured using the ipv6 address command.
Format
ipv6 nd ra prefix { ipv6-address prefix-length | ipv6-address/prefix-length } valid-lifetime preferred-lifetime [ no-autoconfig ] [ off-link ]
undo ipv6 nd ra prefix { ipv6-address prefix-length | ipv6-address/prefix-length }
ipv6 nd ra prefix default no-advertise
undo ipv6 nd ra prefix default no-advertise
Parameters
Parameter | Description | Value |
---|---|---|
ipv6-address | Specifies the IPv6 address carried in the RA packet. | The value consists of 128 octets, which are classified into 8 groups. Each group contains 4 hexadecimal numbers in the format X:X:X:X:X:X:X:X. |
prefix-length | Specifies the prefix length of an IPv6 address. | The value is an integer that ranges from 1 to 128. You can calculate the IPv6 prefix carried in the RA packet based on the IPv6 address and prefix length. |
valid-lifetime | Specifies the valid lifetime of the prefix. | The value is an integer that ranges from 0 to 4294967295, in seconds. |
preferred-lifetime | Specifies the preferred lifetime of the prefix. | The value is an integer that ranges from 0 to 4294967295, in seconds. The preferred lifetime cannot be larger than the valid lifetime. |
no-autoconfig | Specifies the A-Flag. If no-autoconfig is specified, the prefix carried in the RA packet is used for stateless address autoconfiguration. | - |
off-link | Specifies the O-Flag. If off-link is specified, the prefix carried in the RA packet cannot be allocated to the local link. When the host sends a packet to the address specified by this prefix, the packet is forwarded through a default router. | - |
default no-advertise | Indicates that RA messages do not carry the default prefix generated based on the interface IPv6 address. | - |
Usage Guidelines
Usage Scenario
To enable a routing device to advertise only a specified prefix, run the ipv6 nd ra prefix command to configure the prefix.
Prerequisites
The IPv6 function has been enabled on the interface using the ipv6 enable command in the interface view.
Precautions
After a host receives the RA packet with the prefix configured using the ipv6 nd ra prefix command, the host updates the local prefix information.
The prefix configured using the ipv6 nd ra prefix command cannot be fe80:: (prefix of a link-local address), ff00:: (prefix of a multicast address), :: (prefix of an unspecified address), or the prefix that has been used by another interface (including the interface address prefix and prefix carried in RA packets).
Example
# Configure the prefix in the RA packet on VLANIF100.
<AC6605> system-view [AC6605] ipv6 [AC6605] interface vlanif 100 [AC6605-Vlanif100] ipv6 enable [AC6605-Vlanif100] undo ipv6 nd ra halt [AC6605-Vlanif100] ipv6 nd ra prefix 2001:db8:4001::100 128 1000 400 no-autoconfig [AC6605-Vlanif100] ipv6 nd ra prefix 2001:db8:2001::100 64 1000 400 off-link