0、DHCP Server路由器上配置接口IP
interface GigabitEthernet0/0/1
ip address 192.168.10.254 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 192.168.20.254 255.255.255.0
1、DHCP接口地址池配置方法
#
DHCP Server路由器上配置
#
dhcp enable
#
interface GigabitEthernet0/0/1
dhcp select interface
dhcp server excluded-ip-address 192.168.10.1 192.168.10.10
dhcp server lease day 7
dhcp server dns-list 8.8.8.8
#

2、DHCP全局地址池配置方法
#
DHCP Server路由器上配置
#
dhcp enable
#
ip pool huawei
gateway-list 192.168.20.254
network 192.168.20.0 mask 255.255.255.0
excluded-ip-address 192.168.20.1 192.168.20.20
lease day 7
dns-list 8.8.8.8
#
interface GigabitEthernet0/0/2
dhcp select global
#

查看地址池使用情况:
[Huawei]display ip pool
-----------------------------------------------------------------------
Pool-name : GigabitEthernet0/0/1
Pool-No : 0
Position : Interface Status : Unlocked
Gateway-0 : 192.168.10.254
Mask : 255.255.255.0
VPN instance : --
-----------------------------------------------------------------------
Pool-name : huawei
Pool-No : 1
Position : Local Status : Unlocked
Gateway-0 : 192.168.20.254
Mask : 255.255.255.0
VPN instance : --
IP address Statistic
Total :506
Used :2 Idle :474
Expired :0 Conflict :0 Disable :30
最终2台主机可以相互通信

浙公网安备 33010602011771号