设为首页收藏本站language 语言切换
查看: 1953|回复: 8
收起左侧

[已解决] 关于一个交换机端口绑定问题 求解

[复制链接]
发表于 2011-7-1 23:25:01 | 显示全部楼层 |阅读模式
怎么解释C
啊啊.jpg
发表于 2011-7-1 23:49:08 | 显示全部楼层
答案没错
C你再仔细看看,难道这个端口只允许源MAC为这个的才可以吗?它又没做端口安全
沙发 2011-7-1 23:49:08 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2011-7-2 00:11:48 | 显示全部楼层
实验一下mac-address-table static的作用
----------------------------------------------------------------------------
Switch#show run
Building configuration...
interface FastEthernet0/1
switchport access vlan 2
switchport mode access
!
interface FastEthernet0/2
switchport access vlan 2
switchport mode access
interface Vlan2
ip address 192.168.2.254 255.255.255.0
.....
end
-----------------------------------------------------------------------------
pc1:192.168.2.1/0000.0C72.1AD6
pc2:192.168.2.2/0001.630A.E8D9
-----------------------------------------------------------------------------
pc1接入interface FastEthernet0/2
pc2接入interface FastEthernet0/1
均可ping通
-----------------------------------------------------------------------------
Switch#show mac-address-table
          Mac Address Table
-------------------------------------------
Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
   2    0000.0c72.1ad6    DYNAMIC     Fa0/2
   2    0001.630a.e8d9    DYNAMIC     Fa0/1
-----------------------------------------------------------------------------
增加配置
Switch(config)#mac-address-table static 0000.0c72.1ad6 vlan 2 interface FastEthernet0/1
Switch(config)#do show mac
          Mac Address Table
-------------------------------------------
Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
   2    0000.0c72.1ad6    STATIC      Fa0/1
   2    0001.630a.e8d9    DYNAMIC     Fa0/1
---------------------------------------------------------------
此时
pc1:192.168.2.1/0000.0C72.1AD6接入interface FastEthernet0/2无法ping通192.168.2.254
pc2正常
--------------------------------------------------------------

进一步测试,增加配置
interface FastEthernet0/3
switchport access vlan 3
switchport mode access
interface Vlan3
ip address 192.168.3.254 255.255.255.0
--------------------------------------------------------------
pc1:192.168.3.1/0000.0C72.1AD6接入interface FastEthernet0/3
可以ping通192.168.3.254
Switch(config-if)#do show mac
          Mac Address Table
-------------------------------------------
Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
   2    0000.0c72.1ad6    STATIC      Fa0/1
   2    0001.630a.e8d9    DYNAMIC     Fa0/1
   3    0000.0c72.1ad6    DYNAMIC     Fa0/3
---------------------------------------------------------------
结论:mac-address-table static 0000.0c72.1ad6 vlan 2 interface FastEthernet0/1
静态绑定mac地址0000.0c72.1ad6
当mac地址为0000.0c72.1ad6 的终端接入vlan 2时,必须接入FastEthernet0/1口
·接入其他加入vlan 2的接口,无法通信
·其他mac接入FastEthernet0/1不受影响
·0000.0c72.1ad6 接入其他vlan不受影响
·mac-address-table static 绑定的端口不能启用switchport port-security
板凳 2011-7-2 00:11:48 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2011-7-2 00:12:45 | 显示全部楼层
frame with a layer 2 destination of 0000.00aa.aaaa will be forwardes out fa0/1.
地板 2011-7-2 00:12:45 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2011-7-2 00:13:49 | 显示全部楼层
当fa0/1所插的设备的MAC地址不是0000.00aa.aaaa 的时候,你觉得有没有问题?如果一个帧的源地址是0000.00bb.bbbb从fa0/1进入,那个帧会不会被转发?显然会的。所以C错在了only。
5# 2011-7-2 00:13:49 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2011-7-2 00:31:06 | 显示全部楼层
结论:mac-address-table static 0000.0c72.1ad6 vlan 2 interface FastEthernet0/1
静态绑定mac地址0000.0c72.1ad6
当mac地址为0000.0c72.1ad6 的终端接入vlan 2时,必须接入FastEthernet0/1口
·接入其他加入vlan 2的接口,无法通信
·其他mac接入FastEthernet0/1不受影响
·0000.0c72.1ad6 接入其他vlan不受影响
·mac-address-table static 绑定的端口不能启用switchport port-security
6# 2011-7-2 00:31:06 回复 收起回复
回复 支持 反对

使用道具 举报

 楼主| 发表于 2011-7-2 00:31:11 | 显示全部楼层
谢谢   谢谢  谢谢了
7# 2011-7-2 00:31:11 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2011-7-2 19:31:18 | 显示全部楼层
非常感谢同学们把实验结果都post出来

这道题让我想起了另外一个题目

What is the valid reason for a switch to deny port access to new devices when port security is enabled

1.The denied MAC address have already been learned or configured on another secure interface in the same VLAN.
2.The denied MAC address are statically configured on the port.
3. The minimum MAC threshold has been reached.
4. The absolute aging time for denied MAC address have expired.

答案是说选2,但是根据楼上的实验结果,不是应该选1才对的吗?
8# 2011-7-2 19:31:18 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-4-22 13:53:48 | 显示全部楼层
学习了。原来是这样
9# 2013-4-22 13:53:48 回复 收起回复
回复 支持 反对

使用道具 举报

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

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-4-30 07:06 , Processed in 0.094217 second(s), 26 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

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