DHCP服务器三层交换机配置:
#service dhcp //启动DHCP服务
s2(config)#ip dhcp pool testA //定义地址池
s2(dhcp-testa-config)#network-address 192.168.10.0 24 //地址池
lease 1 23 59 //天数
s2(dhcp-testa-config)#default-router 192.168.10.254 // 默认网关
s2(dhcp-testa-config)#dns-server 8.8.8.8 //DNS服务器
s2(dhcp-testa-config)#exit
s2(config)#ip dhcp excluded-address 192.168.10.10 192.168.10.20 //排除地址。从..10.10到..1 0.20