要求:全网IP范围为192.168.1.0/24,实现全网可达,HTTP服务器的域名为www.baidu.com,实现可以通过域名访问http
第一步、规划IP地址

按如图分别给路由器、http服务器、dns服务器、客户端配置IP地址,并且给pc设置为DHCP。
第二步、配置路由器
1、启用DHCP服务
[r1]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
2、创建地址池(wangcai、lihua)并配置地址池的范围以及网关、dns、绑定接口。
①地址池wangcai
[r1]ip pool wangcai
Info: It's successful to create an IP address pool.
[r1-ip-pool-wangcai]network 192.168.1.0 mask 25
[r1-ip-pool-wangcai]gateway-list 192.168.1.126
[r1-ip-pool-wangcai]dns-list 192.168.1.200
②地址池lihua
[r1]ip pool lihua
Info: It's successful to create an IP address pool.
[r1-ip-pool-lihua]network 192.168.1.128 mask 25
[r1-ip-pool-lihua]gateway-list 192.168.1.254
[r1-ip-pool-lihua]dns-list 192.168.1.200
第三步、进入接口开启DHCP服务
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]dhcp select global
[r1-GigabitEthernet0/0/0]q
[r1]interface g0/0/01
[r1-GigabitEthernet0/0/1]dhcp select global
第四步、测试
①进入四台pc,查看IP地址




②互相ping测试(在这只拿pc1ping其他pc)

全部可以ping通,表示路由全网可达。
③客户端通过域名访问http服务器
