< Home

dhcp relay server-select

Function

The dhcp relay server-select command configures a DHCP server group for a DHCP relay agent.

The undo dhcp relay server-select command deletes the configured DHCP server group of a DHCP relay agent.

By default, no DHCP server group is configured.

Format

dhcp relay server-select group-name

undo dhcp relay server-select

Parameters

Parameter

Description

Value

group-name

Specifies the name of a DHCP server group.

The value is a string of 1 to 32 case-sensitive characters without spaces.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The dhcp relay server-select command applies to DHCP relay agents. When a DHCP client needs to send DHCP requests to a DHCP server using a DHCP relay agent, you can run the dhcp relay server-select command to specify a DHCP server group for the DHCP relay agent and configure the DHCP server address.

Prerequisites

  1. A DHCP server group has been created using the dhcp server group command.
  2. The DHCP relay function has been enabled using the dhcp select relay command so that the system can forward DHCP packets to the specified DHCP server.

Precautions

  • Multiple interfaces can be configured with the same DHCP server group, and one interface can be configured with only one DHCP server group.
  • If you run the dhcp relay server-select command in the same interface view for multiple times, only the latest configuration takes effect. If a specified DHCP server group does not exist, the configuration fails; however, the latest configured DHCP server group still takes effect.

Example

# Configure the DHCP server group of a DHCP relay agent as group1 on VLANIF100.

<HUAWEI> system-view
[HUAWEI] dhcp enable
[HUAWEI] dhcp server group group1
[HUAWEI-dhcp-server-group-group1] dhcp-server 10.10.10.10
[HUAWEI-dhcp-server-group-group1] quit
[HUAWEI] interface vlanif 100
[HUAWEI-Vlanif100] dhcp select relay
[HUAWEI-Vlanif100] dhcp relay server-select group1
# Configure the DHCP server group of a DHCP relay agent as group1 on GE0/0/1.
<HUAWEI> system-view
[HUAWEI] dhcp enable
[HUAWEI] dhcp server group group1
[HUAWEI-dhcp-server-group-group1] dhcp-server 10.10.10.10
[HUAWEI-dhcp-server-group-group1] quit
[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 server-select group1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >