< Home

dhcpv6 { option18 | option37 } enable

Function

The dhcpv6 { option18 | option37 } enable command enables the device to insert the Option 18 or Option 37 field to a DHCPv6 message.

The undo dhcpv6 { option18 | option37 } enable command disables the device from inserting the Option 18 or Option 37 field to a DHCPv6 message.

By default, the device does not insert the Option 18 or Option 37 field to a DHCPv6 message.

Format

dhcpv6 { option18 | option37 } { insert | rebuild } enable

undo dhcpv6 { option18 | option37 } { insert | rebuild } enable

Parameters

Parameter

Description

Value

insert

Enables the device to insert the Option 18 or Option 37 field to a DHCPv6 message.

-

rebuild

Enables the device to forcibly insert the Option 18 or Option 37 field to a DHCPv6 message.

-

Views

VLAN view, Ethernet interface view, GE interface view, XGE interface view, 25GE interface view, MultiGE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The function of the Option 18 and Option 37 field is similar to the function of the Option 82 field (see the dhcp option82 enable command). The Option 18 field contains the port number of a client and the Option 37 field contains the MAC address of the client. A device inserts the Option 18 or Option 37 field to a DHCPv6 Request message to notify the DHCP server of the DHCPv6 client location. The DHCP server can properly assign an IP address and other configurations to the DHCPv6 client, ensuring DHCP client security.

Prerequisites

DHCP snooping has been enabled on the device using the dhcp snooping enable command.

Precautions

If you run the dhcpv6 { option18 | option37 } enable command in the VLAN view, the command takes effect for all the DHCPv6 messages received from the specified VLAN. If you run the dhcpv6 { option18 | option37 } enable command in the interface view, the command takes effect for all the DHCPv6 messages received on the specified interface.

Example

# Insert the Option 37 field to DHCPv6 Request messages sent by GE0/0/1.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] dhcp snooping enable
[HUAWEI-GigabitEthernet0/0/1] dhcpv6 option37 insert enable
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >