The ip relay address command configures a DHCP server address.
The undo ip relay address command deletes the configured DHCP server address.
By default, no DHCP server address is configured.
Parameter | Description | Value |
---|---|---|
ip-address | Specifies the IP address of a DHCP server. A maximum of 20 DHCP server addresses can be configured for each relay interface. |
The value is in dotted decimal notation. |
dhcp-option code_61to254 | Specifies a DHCP option ID. |
The value is an integer ranging from 61 to 254. |
dhcp-option code_60 | Indicates DHCP Option 60. The Option 60 field carries the vendor identifier. A maximum of 100 Option 60 fields carrying different vendor identifiers can be configured to identify clients. The vendor identifier is configured based on that used on clients. |
The value is an integer 60. |
dhcp-option option-text | Specifies the Option 60 content. |
The value is a string of 1 to 128 characters. |
dhcp-option code_1to59 | Specifies a DHCP option ID. |
The value is an integer ranging from 1 to 59. |
all |
Indicates either of the following:
|
- |
100ge sub-interface view, 100GE interface view, 10GE sub-interface view, 10GE interface view, 200GE sub-interface view, 25GE sub-interface view, 25GE interface view, 400GE sub-interface view, 400GE interface view, 40GE sub-interface view, 40GE interface view, 50GE sub-interface view, 50GE interface view, Eth-Trunk sub-interface view, Eth-Trunk interface view, FlexE interface view, GE optical interface view, GE sub-interface view, GE interface view, GE electrical interface view, Global VE sub-interface view, PW-VE sub-interface view, VBDIF interface view, VE sub-interface view, VLANIF interface view
Usage Scenario
You can associate either multiple DHCP server addresses with one DHCP option or multiple DHCP options with one DHCP server address.
This command is available only on carrier IP devices.Prerequisites
DHCP relay has been enabled using the dhcp select relay command in the interface view.
Configuration Impact
A DHCP relay agent searches for a server IP address based on DHCP options in the following ways:
Precautions
If the DHCP relay interface is configured with a VPN instance, the IP address of the DHCP server belongs to the same VPN instance. If the DHCP relay interface belongs to the public network instance, the IP address of the DHCP server belongs to the public network instance.
A maximum of 20 DHCP server addresses can be configured for every DHCP relay interface.<HUAWEI> system-view [~HUAWEI] interface GigabitEthernet 0/1/0 [~HUAWEI-GigabitEthernet0/1/0] ip relay address 10.38.1.2 [~HUAWEI-GigabitEthernet0/1/0] ip relay address 10.38.1.3
<HUAWEI> system-view [~HUAWEI] interface GigabitEthernet 0/1/0 [~HUAWEI-GigabitEthernet0/1/0] ip relay address 1.1.1.1 dhcp-option 60 abc
<HUAWEI> system-view [~HUAWEI] interface GigabitEthernet 0/1/0 [~HUAWEI-GigabitEthernet0/1/0] ip relay address 1.1.1.1 dhcp-option 12