#給Vlan定義地址並配置其工作在伺服器模式
interface Vlan-interface11
ip address 172.18.11.1 255.255.255.0
dhcp select server global-pool
interface Vlan-interface12
ip address 172.18.12.1 255.255.255.0
interface Vlan-interface13
ip address 172.18.13.1 255.255.255.0
#定義DHCP例項名稱,地址池,閘道器地址,DNS地址
dhcp server ip-pool vlan11
network 172.18.11.0 mask 255.255.255.0
gateway-list 172.18.11.1
dns-list 172.18.11.1 8.8.8.8 8.8.4.4 202.106.0.20
dhcp server ip-pool vlan12
network 172.18.12.0 mask 255.255.255.0
gateway-list 172.18.12.1
dns-list 172.18.12.1 8.8.8.8 8.8.4.4 202.106.0.20
dhcp server ip-pool vlan13
network 172.18.13.0 mask 255.255.255.0
gateway-list 172.18.13.1
dns-list 172.18.13.1 8.8.8.8 8.8.4.4 202.106.0.20
#定義各DHCP地址池禁止分配的IP地址(開始~結束)
dhcp server forbidden-ip 172.18.12.1 172.18.12.200
dhcp server forbidden-ip 172.18.11.1 172.18.11.200
dhcp server forbidden-ip 172.18.13.1 172.18.13.200
#給Vlan定義地址並配置其工作在伺服器模式
interface Vlan-interface11
ip address 172.18.11.1 255.255.255.0
dhcp select server global-pool
#給Vlan定義地址並配置其工作在伺服器模式
interface Vlan-interface12
ip address 172.18.12.1 255.255.255.0
dhcp select server global-pool
#給Vlan定義地址並配置其工作在伺服器模式
interface Vlan-interface13
ip address 172.18.13.1 255.255.255.0
dhcp select server global-pool
#定義DHCP例項名稱,地址池,閘道器地址,DNS地址
dhcp server ip-pool vlan11
network 172.18.11.0 mask 255.255.255.0
gateway-list 172.18.11.1
dns-list 172.18.11.1 8.8.8.8 8.8.4.4 202.106.0.20
#定義DHCP例項名稱,地址池,閘道器地址,DNS地址
dhcp server ip-pool vlan12
network 172.18.12.0 mask 255.255.255.0
gateway-list 172.18.12.1
dns-list 172.18.12.1 8.8.8.8 8.8.4.4 202.106.0.20
#定義DHCP例項名稱,地址池,閘道器地址,DNS地址
dhcp server ip-pool vlan13
network 172.18.13.0 mask 255.255.255.0
gateway-list 172.18.13.1
dns-list 172.18.13.1 8.8.8.8 8.8.4.4 202.106.0.20
#定義各DHCP地址池禁止分配的IP地址(開始~結束)
dhcp server forbidden-ip 172.18.12.1 172.18.12.200
dhcp server forbidden-ip 172.18.11.1 172.18.11.200
dhcp server forbidden-ip 172.18.13.1 172.18.13.200