Huawei DHCP Configuration
In this DHCP example we will configure, Huawei DHCP, a Huawei Router as a DHCP Server. After the configuration, a host device, here a PC, will receive its IP information from DHCP Server Huawei Router.
For our DHCP configuration example, we will use the topology below:
Let’s firstly talk about the DHCP Configuration steps on the Huawei Router. We will do the below steps one by one:
2.DHCP IP Pool Configuration
4.Interface DHCP Configuration
6.DHCP Client Configuration
You can download this configuration on Huawei eNSP Labs Page.
By default, DHCP is not enabled on Huawei Routers. So, the first step of configuring a Huawei Router as DHCP Server is enabling DHCP on the router.
[Huawei-Router] dhcp enable
DHCP IP Pool Configuration
Here, we will configure the IP Pool on Huawei Router. Our IP allocations will be done from this IP Pool.
Two different IP Pool can be defined :
- Interface Pool
- Global Pool
In Global IP Pool configuration, firstly, we will configure the IP Pool range. After this we will configure a gateway address. This gateway address is the address of Huawei Router for local network devices. Lastly, we will give a lease time. This lease time is the time limit that DHCP Client can use this IP address.
[Huawei-Router] ip pool OurPool
[Huawei-Router-ip-pool-OurPool] network 192.168.0.0 mask 24
[Huawei-Router-ip-pool-OurPool] gateway-list 192.168.0.1
[Huawei-Router-ip-pool-OurPool] lease day 2 day hour 18
Other DHCP Articles:
DHCP DNS Configuration
DNS information is also provided from the DHCP Server. To get this information from DHCP Server, we will configure Huawei Router, with DNS commands.
Here, firstly, we will configure the DNS IP address and then we will exclude this address from the IP Pool.