< Home

dhcp server next-server

Function

The dhcp server next-server command specifies a server IP address for DHCP clients.

The undo dhcp server next-server command cancels the configuration.

By default, no server IP address is specified by the DHCP Server for DHCP clients.

Format

dhcp server next-server ip-address

undo dhcp server next-server

Parameters

Parameter

Description

Value

ip-address

Specifies a server IP address.

The value is in dotted decimal notation.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The dhcp server next-server command is used on DHCP servers. When assigning a DHCP client an IP address, a DHCP server can also assign the DHCP client an IP address of the server that provides network services for the client. For example, some clients like IP phones still need other configuration parameters after automatically obtaining IP addresses. You can run the dhcp server next-server command to specify the server address used after a client obtains an IP address. The client then requests the configuration parameters from the specified server after obtaining an IP address.

If users use addresses in the interface address pool, run the dhcp server next-server command to specify the DHCP server IP address. If users use addresses in the global address pool, run the next-server command to specify the DHCP server IP address.

Prerequisites

  1. The DHCP function has been enabled using the dhcp enable command in the system view.
  2. IP addresses in the interface address pool have been configured using the ip address command.

  3. The DHCP server function has been enabled on the interface using the dhcp select interface command.

Precautions

  • The dhcp server next-server command takes effect for only users who use addresses in the interface address pool.
  • If you run the dhcp server next-server command multiple times, only the latest configuration takes effect.

Example

# Specify the server IP address 192.168.1.2 in the interface address pool on VLANIF100 used to provide services for terminal users.
<HUAWEI> system-view
[HUAWEI] dhcp enable
[HUAWEI] interface vlanif 100
[HUAWEI-Vlanif100] ip address 10.1.1.2 24
[HUAWEI-Vlanif100] dhcp select interface
[HUAWEI-Vlanif100] dhcp server next-server 192.168.1.2
# Specify the server IP address 192.168.1.2 in the interface address pool on GE0/0/1 used to provide services for terminal users.
<HUAWEI> system-view
[HUAWEI] dhcp enable
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] undo portswitch
[HUAWEI-GigabitEthernet0/0/1] ip address 10.1.1.2 24
[HUAWEI-GigabitEthernet0/0/1] dhcp select interface
[HUAWEI-GigabitEthernet0/0/1] dhcp server next-server 192.168.1.2
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >