cisco 2950交换机端口与IP地址绑定的方法

我单位有两台CISCO 2950交换机,想把其端口与相应的台式机IP地址进行绑定,在网上查了很久,没有找到,请各位高手帮忙。

你好!

首先,2950是二层交换机,不具备三层功能,不识别ARP的。所以不能使用ARP绑定功能。

但是可以绑定端口与MAC地址进行关联

命令如下:

switchport mode access
switchport access vlan 24
switchport port-security
switchport port-security maximum 1 /学习到MAC最大数
switchport port-security violation protect /惩罚方式为protect
switchport port-security mac-address sticky /开启MAC地址静态绑定(粘贴行白名单)
switchport port-security mac-address sticky 00E0.8F07.D851 /粘贴白名单地址为00e0.8f07.d851

如果有三层或者四层交换机(我看过支持ARP绑定的交换机型号是4506),假设如上MAC的IP地址为192.168.10.2

那么在全局配置模式:

arp 192.168.10.2 00e0.8f07.d851 arpa

希望你能懂!
温馨提示:答案为网友推荐,仅供参考
第1个回答  2013-04-14
楼上说的对,
不过建议2点。
1,不要配置惩罚,不然一旦端口被封,需要你手工重开端口才行,万一这时候人不在,别人就一直不能上网。
2,switchport port-security mac-address sticky这条配置完之后,不需要再去配置mac地址了。端口会自动学习第一个接上来的设备的mac。除非你不希望它学习的不是第一个设备的mac,需要手工配
第2个回答  2013-04-14
这个不是你的接口不支持,是你没有开启端口安全!!!!!!!!
首先要
switchport port-security 这个是打开接口的端口安全功能~
switchport port-security mac-address xxxx ip-address xxxx 绑定IP和MAC地址
第3个回答  2013-04-14
很简单啊!就相当于开了个端口安全,switchport port-security mac-address xxxx ip-address xxxx interface f0/0
相似回答