一、实验目的
通过实验掌握DHCP中继实现网络间的DHCP服务
)1)掌握DHCP中继服务的机制和机制
2 )掌握DHCP中继服务器的配置过程
二、实验仪器设备及软件
2台路由器、2台PC
软件: Cisco分组跟踪平台
三、实验原理
定义地址池#ip dhcp pool pool0
定义网段#net 192.168.0.0 255.255.255.0
定义网关#默认路由器192.168.0.1
定义DNS地址#dns-server 192.168.0.3
定义排除范围# ipdhcpexcluded-address 192.168.0.1192.168.0.5
中继路由定义
router1(config ) #int f0/0
路由器1 (config-if ) #ip helper-address 16.16.1.1
四、实验内容与步骤
)1)网络拓扑
)2)配置并打开Router0和Router1端口的IP
routeR0(config ) #int f0/0
routeR0(config-if ) # IP add 192.168.0.1 255.255.255.255.0
routeR0(config-if ) #no sh
routeR0(config ) #int s1/0
routeR0(config-if ) # IP add 16.16.1.1 255.255.255.255.0
routeR0(config-if ) #no shu
router1(config ) #int f0/0
router1(config-if ) # IP add 172.16.0.1 255.255.255.255.0
router1(config-if ) #no sh
router1(config ) #int s1/0
router1(config-if ) # IP add 16.16.1.2 255.255.255.255.0
路由器1 (config-if ) #clock rate 64000
router1(config-if ) #no shu
)3)配置动态路由
routeR0(config ) #router rip
配置路由器(route r0 ) #net 192.168.0.0
route r0 (配置路由器) #net 16.16.1.0
路由器1 (config ) #路由器rip
router1(config-router ) #net 16.16.1.0
路由器1 (config-router ) #net 172.16.0.0
路由器1 (config-router ) #
)4)地址池配置
//pool 0
routeR0(config ) #ip dhcp pool pool0
routeR0(DHCP-config ) # net 192.168.0.0 255.255.255.255.0
routeR0(DHCP-config ) #default-router 192.168.0.1
routeR0(DHCP-config ) #dns-server 192.168.0.3
routeR0(DHCP-config ) #option 150 ip 192.168.0.4
routeR0(config ) # ipdhcpexcluded-address 192.168.0.1192.168.0.5
//pool 1
routeR0(config ) #ip dhcp pool pool1
routeR0(DHCP-config ) # net 172.16.0.0 255.255.255.255.0
routeR0(DHCP-config ) #default-router 172.16.0.1
routeR0(DHCP-config ) #dns-server 192.168.0.3
routeR0(DHCP-config ) #option 150 ip 192.168.0.4
routeR0(config ) # ipdhcpexcluded-address 172.16.0.1172.16.0.5
routeR0(config ) #
(5) Router1负责中继,配置中继路由地址
router1(config ) #int f0/0
路由器1 (config-if ) #ip helper-address 16.16.1.1
router1(config-if ) #no shu
五、实验结果与分析
)6)路由中继检测
Router0#show ip dhcp binding
IP address client-id/leaseexpirationtype
硬件地址
192.168.0.60000.0 ca7.BBB6--automatic
172.16.0.60090.0 c7c.6308-- automatic
Router0#
Router1#show ip int
FastEthernet0/0 is up、lineprotocolisup、connected
Internet address is 172.16.0.1/24
broadcastaddressis 255.255.255.255.255
addressdeterminedbysetupcommand
MTU is 1500字节
Helper address is 16.16.1.1 //中继路由地址