dhcpv6 relay gateway-switch enable

Function

The dhcpv6 relay gateway-switch enable command enables automatic DHCPv6 relay gateway switching.

The undo dhcpv6 relay gateway-switch enable command disables automatic DHCPv6 relay gateway switching.

By default, automatic DHCPv6 relay gateway switching is disabled.

Format

dhcpv6 relay gateway-switch enable

undo dhcpv6 relay gateway-switch enable

Parameters

None

Views

100GE interface view, 10GE interface view, 25GE interface view, 400GE interface view, 40GE interface view, 50GE interface view, Eth-Trunk interface view, FlexE sub-interface view, FlexE interface view, GE optical interface view, GE interface view, GE electrical interface view, Global VE sub-interface view, VBDIF interface view, VE sub-interface view, VLANIF interface view, Sub-interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
dhcp write

Usage Guidelines

Usage Scenario

If a relay agent fails to use the first configured global unicast address on an interface as the gateway address to apply for an IPv6 address for a user, you can enable the gateway switching function. The relay agent can then switch the gateway address to a subsequently configured global unicast address and apply for an IPv6 address for the user when the following conditions are met:

  • The current gateway address is used to apply for an address from the remote server for more than three times.
  • No expected address is obtained within 24 seconds.

Prerequisites

Before running the dhcpv6 relay gateway-switch enable command, perform the following operations:

  • Run the interface command to enter the interface view.
  • Run the dhcpv6 relay destination command to enable the DHCPv6 relay function.
  • Run the ipv6 enable command to enable the IPv6 function.
  • Configure multiple global unicast IPv6 addresses on the interface.

Precautions

If the dhcpv6 relay link-address command has been run on an interface to configure a gateway address, the dhcpv6 relay gateway-switch enable command does not take effect.

Example

# Enable automatic DHCPv6 relay gateway switching.
<HUAWEI> system-view
[~HUAWEI] interface Eth-Trunk 1
[*HUAWEI-Eth-Trunk1] ipv6 enable
[*HUAWEI-Eth-Trunk1] ipv6 address 2001:db8:1::1/64
[*HUAWEI-Eth-Trunk1] ipv6 address 2001:db8:2::1/64
[*HUAWEI-Eth-Trunk1] dhcpv6 relay destination 2001:db8::2
[*HUAWEI-Eth-Trunk1] dhcpv6 relay gateway-switch enable
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >