The ipv6 nd ra prefix command configures the prefix carried in RA messages sent by the routing device.
The undo ipv6 nd ra prefix command configures RA messages not to carry the specified prefix.
By default, RA messages contain only the prefix specified through the ipv6 address command.
Parameter | Description | Value |
---|---|---|
ipv6-address | Specifies the IPv6 address carried in the RA message. |
The address is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X. |
prefix-length | Specifies the prefix length of the IPv6 address. |
The value is an integer that ranges from 0 to 128. Based on the IPv6 address and prefix length, a host can calculate the IPv6 prefix carried in the RA message. When allocating the IPv6 address by means of stateless auto-configuration, specify the length of address prefixes as 64 bites. Otherwise, the address will be invalid and RA messages will be discarded. |
ipv6-prefix/ipv6-prefix-length | Specifies the IPv6 address prefix. |
The address is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X. |
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 bigger than the valid lifetime. |
no-autoconfig | Deletes the A-Flag. If this parameter is configured, a configured prefix cannot be used in stateless address allocation. |
- |
off-link | Indicates the O-Flag. If the ipv6 nd ra prefix command contains off-link, it indicates that the prefix carried in the RA message received by the host on the local link cannot be allocated to the local link. When the host sends packets to the address with this prefix, the packet needs to be forwarded through a default routing device. |
- |
100ge sub-interface view, 100GE interface view, 10GE sub-interface view, 10GE interface view, 200GE sub-interface view, 25GE sub-interface view, 25GE interface view, 400GE sub-interface view, 400GE interface view, 40GE sub-interface view, 40GE interface view, 50GE sub-interface view, 50GE interface view, Eth-Trunk sub-interface view, Eth-Trunk interface view, FlexE interface view, GE optical interface view, GE sub-interface view, GE interface view, GE electrical interface view, Global VE sub-interface view, PW-VE sub-interface view, PW-VE interface view, VBDIF interface view, VE sub-interface view, VLANIF interface view
Usage Scenario
If the ipv6 nd ra prefix command is run to configure a prefix, the device advertises both the address prefix configured using the ipv6 nd ra prefix command and that using the ipv6 address command.
By default, RA messages do not carry the default prefix generated based on the interface IPv6 address. If a user does not want the RA message to carry the default address prefix, run the ipv6 nd ra prefix default no-advertise command.Prerequisites
IPv6 has been enabled on the involved interface using the ipv6 enable command.
Configuration Impact
After a host receives the RA message with the prefix configured through the ipv6 nd ra prefix command, the host updates the local prefix information.
Precautions
The prefix configured through the ipv6 nd ra prefix command cannot be fe80:: (prefix of a link-local address), ff00:: (prefix of a multicast address), or prefix of an unspecified address. It neither can be the prefix that has been used by another interface (including the interface address prefix and prefix carried in RA messages).
<HUAWEI> system-view [~HUAWEI] interface GigabitEthernet 0/1/1 [~HUAWEI-GigabitEthernet0/1/1] ipv6 enable [*HUAWEI-GigabitEthernet0/1/1] ipv6 nd ra prefix 2001:db8:1::100 64 100 10 [*HUAWEI-GigabitEthernet0/1/1] ipv6 nd ra prefix 2001:db8:2::100 128 1000 400 no-autoconfig [*HUAWEI-GigabitEthernet0/1/1] ipv6 nd ra prefix 2001:db8:1::100 64 1000 400 off-link