DHCP服务器基本配置
·使能DHCP
[Router]dhcp enable
·创建地址池
[Router]dhcp server ip-pool pool-name
·配置动态分配的IP地址范围
[Router-dhcp-pool-0]network network-address [mask-length|mask mask]
·配置为DHCP客户端分配的网关地址
[Router-dhcp-pool-0]gateway-list ip-address
DHCP可选配置
·配置为DHCP客户端分配的DNS服务器地址
[Router-dhcp-pool-0]dns-list ip-address
·配置DHCP地址池中不参与自动分配的IP地址
[Router]dhcp server forbidden-ip low-ip-address[high-ip-address]
·配置动态分配的IP地址的租用有效期限
[Router-dhcp-pool-0]expired{day day[hour hour[minute minute]]|unlimited}
DHCP服务器显示及维护
·显示DHCP地址池的可用地址信息
[Router]display dhcp server free-ip
·显示DHCP服务器的统计信息
[Router]display dhcp server statistics
·显示DHCP地址池中不参与与自动分配的IP地址
[Router]display dhcp server forbidden-ip
DHCP中继基本配置
·使能DHCP
[Router]dhcp enable
·配置DHCP服务器组中DHCP服务器的IP地址
[Router]dhcp relay server-group group-id ip ip-address
·配置接口工作的DHCP中继模式
[Router-Ethernet1/1]dhcp select relay
·配置接口与DHCP组关联
[Router-Ethernet1/1]dhcp relay server-select group-id
DHCP中继显示及维护
·显示接口对应的DHCP服务器组的信息
[Router]display dhcp relay{all|interface interface-type interface-number}
·显示DHCP服务器组中服务器的IP地址
[Router]display dhcp relay server-group{group-id|all}
·显示DHCP中继的相关报文统计信息
[Router]display dhcp relay statisitcs[server-group{group-id|all}]