dhcpv6 relay source-interface

Function

The dhcpv6 relay source-interface command configures the IP address of a specified interface as the source IP address used by a DHCPv6 relay agent to forward packets.

The undo dhcpv6 relay source-interface command cancels the configuration of setting the IP address of a specified interface to the source IP address used by a DHCPv6 relay agent to forward packets.

By default, a DHCPv6 relay agent uses the IPv6 address of the outbound interface as the source IPv6 address of DHCPv6 packets.

Format

dhcpv6 relay source-interface { interface-name | interface-type interface-num }

undo dhcpv6 relay source-interface [ interface-name | interface-type interface-num ]

Parameters

Parameter Description Value
interface-name

Specifies the name of an interface.

-

interface-type

Specifies the type of an interface. This parameter and interface-num together specify an interface.

-

interface-num

Specifies the number of an interface. This parameter and interface-type together specify an interface.

-

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

Generally, a DHCPv6 relay agent uses the IP address of the outbound interface as the source IP address for packet forwarding. In some scenarios, if a DHCP relay agent needs to forward packets with the IPv6 address of a specified interface as the source IP address, run the dhcpv6 relay source-interface command.

Precautions

If a specified interface has multiple IPv6 addresses, the smallest IPv6 address is used as the source address of the packets forwarded by a DHCPv6 relay agent.

Both the dhcpv6 relay source-interface and dhcpv6 relay source-ip-address commands can specify the source IP address used by a DHCP relay agent to forward packets. These two commands are mutually exclusive. If both of the two commands are run on a DHCP relay interface, the latter configuration overrides the former one.

Example

# Configure the IP address of GE 0/1/1 as the source IP address used by the DHCPv6 relay agent configured on GE 0/1/2.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet 0/1/1
[~HUAWEI-GigabitEthernet0/1/1] ipv6 enable
[*HUAWEI-GigabitEthernet0/1/1] dhcpv6 relay source-interface GigabitEthernet 0/1/2
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >