| 场景 | IOS 设备给内网发地址 |
|---|---|
| 适用 | Cisco IOS/IOS-XE |
| 命令族 | service dhcp / ip dhcp pool / ip dhcp excluded-address |
思科 IOS
思科 IOS
service dhcp
ip dhcp excluded-address 192.168.10.1 192.168.10.20
ip dhcp pool VLAN10
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
dns-server 223.5.5.5
lease 3
show ip dhcp pool
show ip dhcp binding华为 VRP
华为 VRP
dhcp enable
ip pool VLAN10
network 192.168.10.0 mask 255.255.255.0
gateway-list 192.168.10.1
dns-list 223.5.5.5
excluded-ip-address 192.168.10.1 192.168.10.20H3C Comware
H3C Comware
dhcp enable
dhcp server forbidden-ip 192.168.10.1 192.168.10.20
dhcp server ip-pool VLAN10
network 192.168.10.0 mask 255.255.255.0
gateway-list 192.168.10.1
dns-list 223.5.5.5差异:思科排除地址在池外单独配置;华为用池内 excluded-ip-address;H3C 用全局 forbidden-ip。网关地址忘记排除会被分配给客户端,直接造成地址冲突。