三层交换机配置:
switch
(config)#interface
vlan1
(配置VLAN1)
switch
(config-if)#ip
helper-address
192.168.11.4(指定DHCP服务器的地址,即路由器的地址)
switch
(config)#interface
vlan2
(配置VLAN2)
switch
(config-if)#ip
helper-address
192.168.11.4
路由器配置:
Router(config)#
ip
dhcp
pool
test1(配置一个根地址池,test1是地址池的名称)
Router(config)#network
192.168.1.0
255.255.255.0(动态分配的地址段)
Router(config)#dns-server
192.168.1.5(为客户机配置DNS服务器,即VLAN
1的IP地址)
Router(config)#
ip
dhcp
pool
test2(配置一个根地址池,test2是地址池的名称)
Router(config)#network
192.168.2.0
255.255.255.0(动态分配的地址段)
Router(config)#dns-server
192.168.2.5(为客户机配置DNS服务器,即VLAN
2的IP地址)