The ipv6 nd ra preference command configures the default router priority value in the RA packets.
The undo ipv6 nd ra preference command restores the default router priority value in RA packets to be the default value.
By default, the router priority of RA packets is medium.
Parameter | Description | Value |
---|---|---|
high |
Specifies the default router priority to be high. |
- |
medium |
Specifies the default router priority to be medium. |
- |
low |
Specifies the default router priority to be low. |
- |
Usage Scenario
If there are multiple switches on the links connected to a host, the host needs to select suitable switches based on different destination addresses of the packets to be forwarded. Each switch advertises its default router priority and specific route information to the host so that the host can enhance its own capability of selecting suitable forwarding switches based on different IP addresses of the packets to be forwarded.
After receiving an RA message that contains the default router priority, the host updates its own default router list. If the host does not have any route to select when sending packets to other devices, the host will search the updated router list for the switch with the highest priority. If the switch with the highest priority becomes faulty, the host selects another switch in descending order of priority.
To set a default router priority in RA messages, run the ipv6 nd ra preference command. This setting allows the switch with the highest priority to function as the gateway for hosts.
Prerequisites
Before running this command, run the ipv6 enable command on the interface view to enable the IPv6 function.
By default, the switch does not advertise RA packets. Therefore, to allow the default router priority to be advertised 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
If the system is deleting the binding relationship between an interface and an IPv6 address family VPN instance, you are prompted not to run the ipv6 nd ra preference command.
# Configure the default router priority value in RA packets on VLANIF100 to be 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 preference high
# Configure the default router priority value in RA packets on GE0/0/1 to be 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 preference high