三层交换机实现DHCP功能_三层交换机 

Switch(config)#ip dhcp excluded-address 192.168.2.1
Switch(config)#ip dhcp excluded-address 192.168.3.1

Switch(config)#ip dhcp pool vlan2
Switch(dhcp-config)#network 192.168.2.0 255.255.255.0
Switch(dhcp-config)#default-router 192.168.2.1
Switch(dhcp-config)#dns-server 1.1.1.1
Switch(config)#ip dhcp excluded-address 192.168.2.1
Switch(config)#ip dhcp excluded-address 192.168.3.1
Switch(config)#

Switch(config)#ip dhcp pool vlan3
Switch(dhcp-config)#network 192.168.3.0 255.255.255.0
Switch(dhcp-config)#default-router 192.168.3.1
Switch(dhcp-config)#dns-server 1.1.1.1
Switch(config)#