拓扑信息
要求
dnsp server 0/0/0口使用接口DHCP进行分配ip
dnsp server0/0/1口使用全局dhcp进行分配IP
各PC间均可交流
分析
因为存在两个广播域所以需要配置两个可分配的IP地址网段
各PC间均可交流,即PC1与PC3交流即可证明
IP规划
接口0/0/0IP 192.168.1.254/24 0/0/1IP192.168.2.254
步骤
0/0/1全局dncp配置
服务端: [DHCP Server]interface GigabitEthernet 0/0/1 [DHCP Server-GigabitEthernet0/0/1]ip address 192.168.2.254 24 [DHCP Server-GigabitEthernet0/0/1]quit [DHCP Server]dhcp enable //开启DHCP功能 [DHCP Server]ip pool 123 //创建一个IP地址池塘 [DHCP Server-ip-pool-123]network 192.168.2.0 mask 24 //配置可分配的IP地址网段 [DHCP Server-ip-pool-123]gateway-list 192.168.2.254 //配置网关IP地址 [DHCP Server-ip-pool-123]dns-list 8.8.8.8 //配置DNS服务器 [DHCP Server-ip-pool-123]quit [DHCP Server]interface GigabitEthernet 0/0/1 [DHCP Server-GigabitEthernet0/0/0]dhcp select global //在该接口激活全局地址池
启动PC3
0/0/0 接口DHCP配置
[DHCP Server]dhcp enable //开启dhcp服务 [DHCP Server]interface GigabitEthernet 0/0/0 [DHCP Server-GigabitEthernet0/0/0]dhcp select interface //开启DHCP接口服务 [DHCP Server-GigabitEthernet0/0/0]dhcp server dns-list 8.8.8.8 //配置接口DNS [DHCP Server-GigabitEthernet0/0/0]dhcp server lease day 1
启动PC1(与PC3同)
测试
用PC1 ping PC3ip
可互通则实验成功