cisco和锐捷交换机DHC给固定的PC分配静态IP
这里我们以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地址
cisco交换机DHCP分配静态IP_交换机
锐捷交换机DHCP SERVER配置给固定的PC(MAC唯一)分配静态IP
需求:
给MAC地址为0002.b304.1265的用户分配固定IP:192.168.128.174
通过配置client-identifier 01+用户MAC,来实现,如:
service dhcp
ip dhcp pool P_192.168.128.174
client-identifier 0100.02b3.0412.65 //针对固定MAC:0002.b304.1265
host 192.168.128.174 255.255.255.128 //分配固定IP:192.168.128.174
lease 1 0 0 //租约时间1天
dns-server 202.116.64.2 202.116.64.3 //dns服务器地址
default-router 192.168.128.254//默认路由
注释:client-identifier选项 = 网络类型 + MAC ,网络类型,以太网是01。
页:
[1]