Configure the DHCP server based on the interface address pool on the AR

17

Configure the DHCP server based on the interface address pool, that is, assign IP addresses to the interfaces. The AR assigns the IP addresses on the same network segment as the interface IP address to clients.
This mode is easy to configure and applies to the scenario where the DHCP server and clients are on the same network segment, that is, no DHCP relay agent exists. Perform the following configuration:
[Huawei] dhcp enable //Enable the DHCP function.
[Huawei] interface ethernet 2/0/0 //Enter the view of the interface connected to the DHCP clients.
[Huawei-Ethernet2/0/0] port link-type access
[Huawei-Ethernet2/0/0] port default vlan 10
[Huawei-Ethernet2/0/0] quit
[Huawei] interface vlanif 10
[Huawei-Vlanif10] ip address 10.1.1.1 24 //Configure the network segment where the DHCP client is located as 10.1.1.1 24.
[Huawei-Vlanif10] quit
[Huawei] interface vlanif 10
[Huawei-Vlanif10] dhcp select interface //Enable the DHCP server based on the interface address pool.
[Huawei-Vlanif10] dhcp server lease day 30 //Set the DHCP address lease to 30 days.
[Huawei-Vlanif10] quit

Other related questions:
Configure the DHCP server based on the global address pool on the AR
An IP address pool is created in the system view on a DHCP server. In the interface view, the server is configured to allocate IP addresses, gateway addresses, and DNS server addresses to clients based on the global address pool. This mode applies to the scenario where the DHCP server and clients are on different network segments (a DHCP relay agent exists), or the DHCP server and clients are on the same subnet but the server needs to assign IP addresses to the clients connected to multiple interfaces. Perform the following configuration: [Huawei] dhcp enable //Enable the DHCP function. [Huawei] ip pool pool1 //Configure a global address pool. [Huawei-ip-pool-pool1] network 10.1.1.0 mask 255.255.255.0 //Specify the range of IP addresses that can be dynamically allocated. [Huawei-ip-pool-pool1] gateway-list 10.1.1.1 // Set the gateway IP address. [Huawei-ip-pool-pool1] quit [Huawei] interface ethernet 1/0/0 //Enter the view of the interface of the DHCP server connected to the client. [Huawei-Ethernet1/0/0] undo portswitch //Switch the interface to Layer 3 mode. [Huawei-Ethernet1/0/0] ip address 10.1.1.1 255.255.255.0 //Configure the same subnet as the address pool. [HUAWEI-Vlanif100] dhcp select global // Enable the DHCP server to assign IP addresses to clients from the global address pool.

Configure DHCP server on S series switch based on the interface address pool
To configure the DHCP server based on the interface address pool for the S series switches (excluding the S1700), configure an IP address for the interface and the switch allocates addresses that are on the same network segment as the interface IP address to clients. This configuration mode is simple and applies only to scenarios where the DHCP server and clients are on the same network segment. That is, no DHCP relay exists.The configuration is as follows: [HUAWEI] dhcp enable //Enable DHCP. [HUAWEI] interface gigabitethernet 2/0/0 //Enter the view of the interface connected to the DHCP client. [HUAWEI-GigabitEthernet2/0/0] port link-type access [HUAWEI-GigabitEthernet2/0/0] port default vlan 10 [HUAWEI-GigabitEthernet2/0/0] quit [HUAWEI] interface vlanif 10 [HUAWEI-Vlanif10] ip address 10.1.1.1 24 //Configure the network segment where the DHCP client resides. The IP address range of the interface-based DHCP server is: 10.1.1.2 to 10.1.1.254. [HUAWEI-Vlanif10] dhcp select interface //Enable the DHCP server function based on the interface address pool. [HUAWEI-Vlanif10] dhcp server dns-list 114.114.114.114 //Specify the DNS server address in the interface address pool. [HUAWEI-Vlanif10] dhcp server lease day 2 //Set the lease of IP addresses to 2 days. [HUAWEI-Vlanif10] quit

Configure DHCP server on S series switch based on the global address pool
For S series switches (except S1700 switches), after a DHCP server based on the global address pool is configured, that is, an IP address pool is created in the system view, IP addresses in the address pool can be allocated to DHCP clients connected to all interfaces. This configuration mode applies to scenarios where the DHCP server and clients are on different network segments and a DHCP relay exists. In addition, this configuration mode is used to allocate IP addresses to DHCP clients connected to multiple interfaces when the DHCP server and clients are on the same network segment. The configurations are as follows: [HUAWEI] dhcp enable //Enable the DHCP function. [HUAWEI] ip pool pool1 //Configure a global address pool. [HUAWEI-ip-pool-pool1] network 10.1.1.0 mask 255.255.255.0 //Configure an IP address range that can be dynamically allocated. [HUAWEI-ip-pool-pool1] gateway-list 10.1.1.1 //Configure an IP address for the gateway. [HUAWEI-ip-pool-pool1] dns-list 114.114.114.114 //Configure the IP address of the DNS server for DHCP clients. [HUAWEI-ip-pool-pool1] quit [HUAWEI] interface vlanif 100 //Create an interface connecting the DHCP server to the DHCP clients. [HUAWEI-Vlanif100] ip address 10.1.1.1 255.255.255.0 //This IP address must be on the same network segment as the IP address pool. [HUAWEI-Vlanif100] dhcp select global //Enable the DHCP server function to assign IP addresses to clients from the global address pool.

Method used to configure a DHCP server based on the global address pool on USG firewalls
You can configure a DHCP server (only the DHCP part) based on the global address pool on the USG2000, USG5000, and USG6000 as follows: [USG]dhcp server ip-pool 0 //Configure the address pool. [USG-dhcp-0]network 10.1.1.0 mask 255.255.255.0 [USG-dhcp-0]dns-list 10.1.1.2 [USG-dhcp-0]domain-name example.com [USG-dhcp-0]quit [USG]interface GigabitEthernet1/0/1 //Configure the interface address. [USG-GigabitEthernet0/0/1]ip address 10.1.1.1 255.255.255.128 [USG-GigabitEthernet0/0/1]quit [USG]firewall zone trust //Add the interface to the zone. [USG-zone-trust]add interface GigabitEthernet1/0/1

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top