每个二层交换机上配置好VLAN ,在三层交换机上配置好VLAN ip ,在三层交换机上打开fa0/1-fa0/3的trunk ,再给三层交换机配置dhcp服务,下面是VLAN10的,每个VLAN配一遍,
sw1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
sw1(config)#ip dhcp pool vlan10
sw1(dhcp-config)#network 192.168.10.0 255.255.255.0 //地址池
sw1(dhcp-config)#def
sw1(dhcp-config)#default-router 192.168.10.254 //默认路由
sw1(dhcp-config)#dns-server 202.96.64.68 //dns
sw1(dhcp-config)#exit
sw1(config)#ip dhcp ex
sw1(config)#ip dhcp excluded-address 192.168.10.100 192.168.10.254 //排除地址
sw1(config)#
验证