取消
显示结果 
搜索替代 
您的意思是: 
cancel
3220
查看次数
20
有帮助
0
回复

#分享达人# DHCP 根据MAC地址 来分配IP地址

fortune
VIP Alumni
VIP Alumni
直接上配置:
ip dhcp excluded-address 192.168.1.1 192.168.1.100
ip dhcp excluded-address 192.168.1.200 192.168.1.254
!
ip dhcp pool testpool
network 192.168.1.0 255.255.255.0
dns-server 202.96.134.133
default-router 192.168.1.254
!
ip dhcp pool client_c1
host 192.168.1.110 255.255.255.0
client-identifier 0100.1dd9.473a.f2 /********IP地址和主机的mac地址绑定,注意01为以太网网类型指示符号,后面的00.1d.d9.47.3a.f2是mac地址, 不同的cisco交换机这里设置的格式可能不同,有的交换机设置形式是0100.3334.3333.0a55,应该用哪个形式,可以先通过show ip dhcp binding来看。
在以上配置中,我们创建了一个192.168.1.0/24的地址池,同时完成了将地址192.168.1.110与 MAC进行了静态绑定,值得注意的是client_cwnpcn的PC获取到的网关地址和DNS地址是由地址池pooltest中所定义的。
关于DHCP静态绑定的思科官方文档网址:http://www.cisco.com/en/US/docs/ ... asyip2.html#wp23682
为了更清楚的说明问题,下面是个案例,分配了3台电脑的案例:
system mtu routing 1500
ip subnet-zero
ip dhcp excluded-address 192.168.1.1 192.168.1.100
ip dhcp excluded-address 192.168.1.200 192.168.1.254
!
ip dhcp pool testpool
network 192.168.1.0 255.255.255.0
dns-server 202.96.134.133
default-router 192.168.1.254
!
ip dhcp pool client_c1 /*PC1
host 192.168.1.112 255.255.255.0
client-identifier 0100.1dd9.473a.f2
!
ip dhcp pool client_c2 /*PC2
host 192.168.1.114 255.255.255.0
client-identifier 0100.1dd9.473a.f3
!
ip dhcp pool client_c3 /*PC3
host 192.168.1.118 255.255.255.0
client-identifier 0100.1dd9.473a.f4
0 条回复0
快捷链接