< Home

dhcp relay information strategy

Function

The dhcp relay information strategy command configures the strategies used by a DHCP relay agent to process Option 82 information.

The undo dhcp relay information strategy command restores the default setting.

By default, the strategy used by a DHCP relay agent to process Option 82 information is replace.

Format

dhcp relay information strategy { drop | keep | replace }

undo dhcp relay information strategy

Parameters

Parameters

Description

Value

drop

Configures the DHCP relay agent to drop Option 82 information.

-

keep

Configures the DHCP relay agent to keep Option 82 information.

-

replace

Configures the DHCP relay agent to replace Option 82 information.

-

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

This command applies to the DHCP relay agent. When DHCP Request messages carry Option 82 information, the DHCP server can locate user positions accurately and assign IP addresses to users using different policies. When a DHCP relay agent receives DHCP Request messages, it uses one of the following strategies to process Option 82 information:
  • Drop:
    • If the received DHCP message does not carry an Option 82 field, the DHCP relay agent forwards the message directly without processing it.
    • If the received DHCP message carries an Option 82 field, the DHCP relay agent drops the Option 82 field and forwards the message.
  • Keep:
    • If the received DHCP message does not carry an Option 82 field, the DHCP relay agent forwards the message directly without processing it.
    • If the received DHCP message carries an Option 82 field, the DHCP relay agent keeps the Option 82 field and forwards the message.
  • Replace:
    • If the received DHCP message does not carry an Option 82 field, the DHCP relay agent inserts an Option 82 field configured by the administrator into the received message and forwards the message.
    • If the received DHCP message carries an Option 82 field, the DHCP relay agent replaces it with the Option 82 field configured by the administrator and forwards the message.

Prerequisites

DHCP has been enabled by running the dhcp enable command in the system view.

DHCP relay has been enabled by running the dhcp select relay command in the interface view.

The Option 82 function has been enabled for the DHCP relay agent by using the dhcp relay information enable command.

Example

# Configure the DHCP relay agent to drop Option 82 information on VLANIF 100.

<HUAWEI> system-view
[HUAWEI] dhcp enable
[HUAWEI] vlan 100
[HUAWEI-vlan100] quit
[HUAWEI] interface vlanif 100
[HUAWEI-Vlanif100] dhcp select relay
[HUAWEI-Vlanif100] dhcp relay information enable
[HUAWEI-Vlanif100] dhcp relay information strategy drop
# Configure the DHCP relay agent to drop Option 82 information on the GE0/0/1 interface.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] undo portswitch
[HUAWEI-GigabitEthernet0/0/1] dhcp select relay
[HUAWEI-GigabitEthernet0/0/1] dhcp relay information enable
[HUAWEI-GigabitEthernet0/0/1] dhcp relay information strategy drop
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >