电脑计算机论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 16151|回复: 1

cisco dhcp为指定计算机分配固定IP,根据mac分配IP,给特定mac地址分配固定ip

[复制链接]
admin 发表于 2011-12-7 10:00:03 | 显示全部楼层 |阅读模式
直接上配置:
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_cwnpcn
   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_cwnpcnPC获取到的网关地址和DNS地址是由地址池pooltest中所定义的。
关于DHCP静态绑定的思科官方文档网址:http://www.cisco.com/en/US/docs/ios/12_0t/12_0t1/feature/guide/Easyip2.html#wp23682


为了更清楚的说明问题,下面是个案例,分配了3台电脑的案例:
switch 2 provision ws-c3750e-48pd
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_cwnpcn                         /*PC1
   host 192.168.1.112 255.255.255.0
   client-identifier 0100.1dd9.473a.f2
!
ip dhcp pool client_cwnpcnpc02                /*PC2
   host 192.168.1.114 255.255.255.0
   client-identifier 0100.1dd9.473a.f3
!
ip dhcp pool client_cwnpcnpc03              /*PC3
   host 192.168.1.118 255.255.255.0
   client-identifier 0100.1dd9.473a.f4
!

sypxp 发表于 2011-12-15 19:06:29 | 显示全部楼层
顶你!辛苦了~












龙门飞甲 百度影音
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则


QQ|手机版|小黑屋|电脑计算机论坛 ( 京ICP备2022023538号-1 )

GMT+8, 2024-4-19 23:30 , Processed in 0.076477 second(s), 24 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表