Chinaunix首页 | 论坛 | 博客
  • 博客访问: 166957
  • 博文数量: 22
  • 博客积分: 1495
  • 博客等级: 上尉
  • 技术积分: 586
  • 用 户 组: 普通用户
  • 注册时间: 2005-10-17 18:51
文章分类

全部博文(22)

文章存档

2011年(14)

2010年(8)

我的朋友

分类:

2010-10-07 14:24:38

假设交换机A,B、C三个口,PC机1、2和3,PC1(0009.7c85.d579)连A口,PC2(000c.cf73.9311)连B口,PC3连C口
1、在A口设置mac-address-table static绑定PC1的MAC地址:
mac-address-table static 0009.7c85.d579 vlan 1 interface f0/1
把PC1接入C口,PC3接入A口,此时PC1不通,PC2和PC3通
2、在A口设置swithport port-security mac-addree sticky绑定PC1的MAC地址
把PC1接入C口,PC3接入A口,此时PC3不通,PC1和PC2通
 
所以得出的结论是:
mac-address-table static是对VLAN中的所有端口生效,这个MAC在这个VLAN中只能通过绑定的这个口访问,其它口是不能访问的。
swithport port-security mac-address sticky只对特定的一个端口生效,只要这个端口相连的PC的MAC不是对应的,就禁止访问。而如果接入其它口,则访问正常。
阅读(424) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~