标签:stat 交换 信息 type 一个 图片 image mamicode har
这里我们以vlan31进行描述ip dhcp pool vlan31
network 172.31.255.0 255.255.255.0
default-router 172.31.255.254
dns-server 202.96.209.133 8.8.8.8
1、先将特殊IP地址从dhcp中剔除掉,以免后面造成ip地址冲突
ip dhcp excluded-address 172.31.255.1
ip dhcp excluded-address 172.31.255.100
2、编写一个静态IP地址的pool
ip dhcp pool static_vlan31_1
host 172.31.255.100 255.255.255.0
client-identifier 015c.f9dd.48c0.da //mac前面要补“01”
dns-server 202.96.209.133 8.8.8.8
default-router 172.31.255.254
lease infinite //永久
3、如果要立即生效,需要清空自动分配ip的缓存
dmz_cisco3750#clear ip dhcp binding *
dmz_cisco3750#show ip dhcp binding
IP address Client-ID/ Lease expiration Type
Hardware address
172.31.255.100 015c.f9dd.48c0.da Infinite Manual
dmz_cisco3750#
4、为了避免其他用户私自修改保留的静态IP地址,需要再增加arp绑定信息
arp 172.31.255.100 5cf9.dd48.c0da arpa
具体命令如下:
dmz_cisco3750(config)#do show arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 172.31.255.100 0 5cf9.dd48.c0da ARPA Vlan31
dmz_cisco3750(config)#arp 172.31.255.100 5cf9.dd48.c0da arpa
dmz_cisco3750(config)#do show arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 172.31.255.100 - 5cf9.dd48.c0da ARPA
5、验证IP地址
标签:stat 交换 信息 type 一个 图片 image mamicode har
原文地址:https://blog.51cto.com/13354560/2422326