网络结构是:有两个VLAN,在路由器上端结。
!
ip dhcp pool test_vlan10
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
dns-server 211.x.x.x 211.y.y.y
lease 365
ip dhcp excluded-address 192.168.10.2 192.168.10.10
!
ip dhcp pool test_vlan20
network 192.168.20.0 255.255.255.0
default-router 192.168.20.1
dns-server 211.x.x.x 211.y.y.y
lease 365
ip dhcp excluded-address 192.168.20.2 192.168.20.10
说明一下:
1 test_vlan10和test_vlan20是dhcp地址池的名称,可以随意起。
2 lease 365,dhcp租约期限,如果你的网络中的计算机是固定的,可以长一些,这里我设置成365天;如果有移动pc,那么要短些,建议3天。
3 excluded-address 是排除地址。
