当客户机和DHCP服务器不在一个广播域时,DHCP服务器无法接收到客户机的DHCP discover广播数据包,客户机就无法获得IP地址
 

 
 
 
第一步配置DHCP服务器的信息
<Huawei>u t m  //清除日志
Info: Current terminal monitor is off.
<Huawei>sys
[Huawei]sysname  DHCP-R2  //修改路由器的名字
[DHCP-R2]dhcp enable  //开启DHCP的功能
Info: The operation may take a few seconds. Please wait for a moment.done.
[DHCP-R2]ip pool ntd2306 //创建DHCP的池子并且命名
Info: It's successful to create an IP address pool. 
[DHCP-R2-ip-pool-ntd2306]network  192.168.10.0 mask 24  //定义网关 定义子网掩码
[DHCP-R2-ip-pool-ntd2306]gateway-list  192.168.10.254 //定义网关
[DHCP-R2-ip-pool-ntd2306]dns-list  8.8.8.8 //定义dns
[DHCP-R2-ip-pool-ntd2306]excluded-ip-address  192.168.10.253 //将该地址排除
[DHCP-R2-ip-pool-ntd2306]quit    //退出
[DHCP-R2]interface GigabitEthernet  0/0/0 //进入0/0/0接口
[DHCP-R2-GigabitEther