ipv6 prefer temporary-address
Syntax
ipv6 prefer temporary-address [ valid-lifetime preferred-lifetime ]
undo ipv6 prefer temporary-address
View
System view
Default level
2: System level
Parameters
valid-lifetime: Specifies the valid lifetime of temporary IPv6 addresses in seconds, in the range of 600 to 4294967295. The default valid lifetime is 604800 seconds, that is, seven days.
preferred-lifetime: Specifies the preferred lifetime of temporary IPv6 addresses in seconds, in the range of 600 to 4294967295. The default valid lifetime is 86400 seconds, that is, one day.
Description
Use ipv6 prefer temporary-address to configure the system to generate and preferably use the temporary IPv6 address of the sending interface as the source address of the packet to be sent.
Use undo ipv6 prefer temporary-address to disable the system from generating temporary IPv6 addresses and remove existing temporary IPv6 addresses.
By default, the system does not generate or use any temporary IPv6 address.
Configure the valid lifetime greater than (or equal to) the preferred lifetime.
Enable stateless address autoconfiguration before configuring this function.
The preferred lifetime of a temporary IPv6 address takes the value of the preferred lifetime of the address prefix, or the value of the preferred lifetime you configure for temporary IPv6 addresses minus DESYNC_FACTOR (which is a random number ranging 0 to 600, in seconds), whichever is smaller.
The valid lifetime of a temporary IPv6 address takes the value of the valid lifetime of the address prefix, or the value of the valid lifetime you configure for temporary IPv6 addresses, whichever is smaller.
Examples
# Configure the system to generate and preferably use the temporary IPv6 address of the sending interface as the source address of the packet to be sent.
<Sysname> system-view [Sysname] ipv6 prefer temporary-address