DHCP中继配置

一、实验目的

通过实验掌握通过DHCP中继实现跨网络的DHCP服务

1)掌握DHCP中继服务工作原理和工作方法

2)掌握DHCP中继服务器配置过程

二、实验仪器设备及软件

两台路由器、两台PC

软件:Cisco Packet Tracer Student

三、实验原理

定义地址池 #ip dhcp pool pool0

定义网段 #net 192.168.0.0 255.255.255.0

定义网关 #default-router 192.168.0.1

定义DNS地址#dns-server 192.168.0.3

定义排除范围 #ip dhcp excluded-address 192.168.0.1 192.168.0.5

定义中继路由

Router1(config)#int f0/0

Router1(config-if)#ip helper-address 16.16.1.1

四、实验内容与步骤

1)网络拓扑

 DHCP中继配置_第1张图片

2)配置Router0和Router1端口IP并打开

Router0(config)#int f0/0

Router0(config-if)#ip add 192.168.0.1 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.0

Router0(config-if)#no shu

Router1(config)#int f0/0

Router1(config-if)#ip add 172.16.0.1 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.0

Router1(config-if)#clock rate 64000

Router1(config-if)#no shu

3)配置动态路由

Router0(config)#router rip

Router0(config-router)#net 192.168.0.0

Router0(config-router)#net 16.16.1.0

Router1(config)#router rip

Router1(config-router)#net 16.16.1.0

Router1(config-router)#net 172.16.0.0

Router1(config-router)#

4)配置地址池

//pool 0

Router0(config)#ip dhcp pool pool0

Router0(dhcp-config)#net 192.168.0.0 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)#ip dhcp excluded-address 192.168.0.1 192.168.0.5

//pool 1

Router0(config)#ip dhcp pool pool1

Router0(dhcp-config)#net 172.16.0.0 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)#ip dhcp excluded-address 172.16.0.1 172.16.0.5

Router0(config)#

5)Router1负责中继,配置中继路由地址

Router1(config)#int f0/0

Router1(config-if)#ip helper-address 16.16.1.1

Router1(config-if)#no shu

五、实验结果与分析

6)路由中继检测

Router0#show ip dhcp binding

IP address Client-ID/ Lease expiration Type

Hardware address

192.168.0.6 0000.0CA7.BBB6 -- Automatic

172.16.0.6 0090.0C7C.6308 -- Automatic

Router0#

Router1#show ip int

FastEthernet0/0 is up, line protocol is up (connected)

  Internet address is 172.16.0.1/24

  Broadcast address is 255.255.255.255

  Address determined by setup command

  MTU is 1500 bytes

  Helper address is 16.16.1.1 //中继路由地址

 

你可能感兴趣的:(思科模拟器)