< Home

ipv6 nd ra router-lifetime

Function

The ipv6 nd ra router-lifetime command sets the lifetime of RA packets.

The undo ipv6 nd ra router-lifetime command restores the lifetime of RA packets to the default value.

By default, the lifetime of an RA packet is 1800s.

Format

ipv6 nd ra router-lifetime ra-lifetime

undo ipv6 nd ra router-lifetime

Parameters

Parameter Description Value
ra-lifetime Specifies the lifetime of RA packets. The value is an integer and can be 0 or ranges from 4 to 9000, in seconds. The default value is 1800 seconds, which is recommended.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

A device adds the lifetime value to an RA packet before sending the RA packet to the host on the local network segment.

Prerequisites

The IPv6 function has been enabled on the interface using the ipv6 enable command in the interface view.

Precautions

If a host receives an RA packet with the lifetime field being 0, the host does not add the address of the switch to its default router table.

The lifetime of the RA packets cannot be smaller than the interval for sending RA packets. By default, the maximum interval for sending RA packets is 600s and the minimum interval is 200s. You can run the ipv6 nd ra command to set the interval. If the set lifetime value of the RA packets is smaller than the set interval for sending RA packets, the system displays an error. In such a case, you need to reset the lifetime value.

Example

# Set the lifetime of the RA packets on VLANIF100 to 1000s.

<HUAWEI> system-view
[HUAWEI] ipv6
[HUAWEI] interface vlanif 100
[HUAWEI-Vlanif100] ipv6 enable
[HUAWEI-Vlanif100] ipv6 nd ra router-lifetime 1000

# Set the lifetime of the RA packets on GE0/0/1 to 1000s.

<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] ipv6 nd ra router-lifetime 1000
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >