DHCP 服务器在内网的一个网段里可以为PC 机提供IP地址,它更重要的功能是在非同一网段为多个VLAN 的PC机提供地址。
作为中继的设备可以是三层的交换机 ,也可以是路由器
模拟实验:
3640思科交换机
+++++++++++++++++++++++++++++++++++++++++++++++++

+++++++++++++++++++++++++++++++++++++++++
PC1 :
no ip ronting
int f0/0
ip add dhcp
PC 2 :
no ip ronting
int f0/0
ip add dhcp
++ ++++++++++++++++++++++++++++++++++++++
D_SW:
ip forward-protocol udp
vlan database
vlan 10
vlan 20
vlan 99
exit
int f0/0
sw mo ac
sw ac vlan 10
no shu
int f0/1
sw mo ac
sw ac vlan 20
no shu
int f0/3
sw mo ac
sw ac vlan 99
no shu
int vlan 10
ip add 10.1.1.1 255.255.255.0
ip help-address 192.168.1.1
no shu
int vlan 20
ip add 20.1.1.1 255.255.255.0
ip help-address 192.168.1.1
no shu
int vlan 99
ip add 192.168.0.10 255.255.255.0
no shu
++++++++++++++++++++++++++++
DHCP_SERVER
no ip routing
server dhcp
no ip dhcp conflict logging
ip dhcp excluded-address 10.1.1.1
ip dhcp excluded-address 20.1.1.1
ip dhcp pool DHCP_VLAN10
network 10.1.1.0 /24
default-router 10.1.1.1
dns-server 192.168.0.1
lease 2
exit
ip dhcp pool DHCP_VLAN20
network 20.1.1.0 /24
default-router 20.1.1.1
dns-server 192.168.0.1
lease 2
exit
int f0/0
ip add 192.168.0.1 255.255.255.0
no shu
路由器在DHCP中的中继服务功能后续。。。。。。。
转载于:https://blog.51cto.com/tangmaomao/201794