雏鹰部落

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 8041|回复: 8

[讨论/求助] [上海CCNA01 实验]1900 2950 交换机静态mac绑定

[复制链接]
发表于 2007-8-5 12:49:33 | 显示全部楼层 |阅读模式
在 cisco 1900 交换机上的静态mac绑定

首先,在特权模式下输入
switch#show mac-address-table

有如下显示:
Number of permanent addresses : 0
Number of restricted static addresses : 0
Number of dynamic addresses : 2

Address           Dest Interface    Type         Source Interface List
----------------------------------------------------------------------
0060.4740.D88C    Ethernet 0/2      Dynamic      All
00E0.B064.41F4    Ethernet 0/1      Dynamic      All

进入全局模式
switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z
switch(config)#int Ethernet 0/2
输入以下命令以打开端口安全模式:
switch(config-if)#port secure
switch(config-if)#port secure clear
switch(config-if)#port secure max-mac-coun t 1
(c ount 中无空格,因论坛原因,特意隔开)
则再进入特许模式,可以看到
switch#show mac-address-table
Number of permanent addresses : 1
Number of restricted static addresses : 0
Number of dynamic addresses : 1

Address           Dest Interface    Type         Source Interface List
----------------------------------------------------------------------
0060.4740.D88C    Ethernet 0/2      Permanent    All
00E0.B064.41F4    Ethernet 0/1      Dynamic      All

以及:
switch#show mac-address-table security
Action upon address violation : Suspend

Interface         Addressing Security       Address Table Size    Clear Address
-------------------------------------------------------------------------------
Ethernet 0/1      Disabled                  N/A                   No
Ethernet 0/2      Enabled                     1                   Yes
Ethernet 0/3      Disabled                  N/A                   No
Ethernet 0/4      Disabled                  N/A                   No
Ethernet 0/5      Disabled                  N/A                   No
Ethernet 0/6      Disabled                  N/A                   No
Ethernet 0/7      Disabled                  N/A                   No
Ethernet 0/8      Disabled                  N/A                   No
Ethernet 0/9      Disabled                  N/A                   No
Ethernet 0/10     Disabled                  N/A                   No
Ethernet 0/11     Disabled                  N/A                   No
Ethernet 0/12     Disabled                  N/A                   No
Ethernet 0/13     Disabled                  N/A                   No
Ethernet 0/14     Disabled                  N/A                   No
Ethernet 0/15     Disabled                  N/A                   No
Ethernet 0/16     Disabled                  N/A                   No
Ethernet 0/17     Disabled                  N/A                   No

--More--



而Cisco 2950的静态绑定则容易得多
在特权模式下输入:
switch(config)#mac-address-table static 0060.4740.D88C vlan 1 interface fa 0/1
并可以在fa0/1的interface子模式下,使用maxium 和 violetation可以设置惩罚措施

特别注意!:
在NA教材上的命令:
switch(config-if)#switchport port-security mac-address [mac-address]
是只有在该ip连接在交换机上时,配合maxium(switch(config-if)#switchport port-security maxium 1) 才能达到防止MAC欺骗病毒的作用

p.s: 以上接口以及mac地址均视实际情况而定

[ 本帖最后由 silver_belial 于 2007-8-5 17:00 编辑 ]
发表于 2007-8-5 14:45:08 | 显示全部楼层
沙发,顶楼主
楼主在实验当中又发现,不能打入port secu clear,否则拔掉网线的时候, Permanent地址表会自动清掉,楼主很有网络天赋~~
发表于 2007-8-5 16:59:06 | 显示全部楼层
好,顶楼主一个。NP交换课才涉及的现在就会了,以后就不得了了。[em3]
发表于 2007-8-5 17:32:09 | 显示全部楼层
厉害.......

[ 本帖最后由 songnt 于 2007-8-10 09:27 编辑 ]
发表于 2008-4-28 11:57:50 | 显示全部楼层
好,受教了,多谢多谢!
发表于 2008-7-1 21:57:20 | 显示全部楼层
发表于 2008-7-10 22:44:58 | 显示全部楼层
dingdingdingdingdingdingdingdingdingdingding
发表于 2009-5-8 14:34:51 | 显示全部楼层
如果静态绑定了如何清除呢
发表于 2009-6-5 22:15:45 | 显示全部楼层
  dingding
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|熊猫同学技术论坛|小黑屋| 网络工程师论坛 ( 沪ICP备09076391 )

GMT+8, 2024-6-28 14:41 , Processed in 0.082688 second(s), 18 queries , Gzip On.

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