The ipv6 nd ra route-information command configures route information in RA packets.
The undo ipv6 nd ra route-information command deletes route information in RA packets.
By default, there is no route information in RA packets.
ipv6 nd ra route-information ipv6-address prefix-length lifetime route-lifetime [ preference { high | medium | low } ]
undo ipv6 nd ra route-information ipv6-address prefix-length
Parameter | Description | Value |
---|---|---|
ipv6-address | Specifies the IPv6 address. | The prefix is a 32-bit hexadecimal number, in the format of 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 0 to 128. |
lifetime route-lifetime | Specifies the lifetime of a route. | The value is an integer ranging from 0 to 4294967295, in seconds. |
preference | Specifies the priority of a route. | - |
high | Specifies the route priority to be high. | - |
medium | Specifies the route priority to be medium. | - |
low | Specifies the route priority to be low. | - |
Usage Scenario
An RA packet includes route information. The switch sends the specified routes to the hosts on the local network segment by using this information. The hosts can send packets by using these routes.
When receiving the RA packets carrying route information, a host updates its routing table. When sending the RA packets to another device, a host queries the routing table and selects proper route for sending packets.
Prerequisites
Before running this command, run the ipv6 enable command on the interface view to enable the IPv6 function of an interface.
By default, the switch does not send RA packets. Therefore, to send the routes to the host, you need to run the undo ipv6 nd ra halt command to enable the function of advertising RA packets for the device.
Precautions
A maximum of 17 route options are supported on each interface.
When this command is to be run, the value of ipv6-address cannot be a loopback address.
# Configure the route information of RA packets on VLANIF100: The lifetime of the route with the destination address of 2001:db8::2/64 is 1550 seconds, and the priority of this route is high.
<HUAWEI> system-view [HUAWEI] ipv6 [HUAWEI] interface vlanif 100 [HUAWEI-Vlanif100] ipv6 enable [HUAWEI-Vlanif100] undo ipv6 nd ra halt [HUAWEI-Vlanif100] ipv6 nd ra route-information 2001:db8::2 64 lifetime 1550 preference high
# Configure the route information of RA packets on GE0/0/1: The lifetime of the route with the destination address of 2001:db8::2/64 is 1550 seconds, and the priority of this route is high.
<HUAWEI> system-view [HUAWEI] ipv6 [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo portswitch [HUAWEI-GigabitEthernet0/0/1] ipv6 enable [HUAWEI-GigabitEthernet0/0/1] undo ipv6 nd ra halt [HUAWEI-GigabitEthernet0/0/1] ipv6 nd ra route-information 2001:db8::2 64 lifetime 1550 preference high