一直以来在一个典型的交换三角网络内,存在这样的一个问题:一台没有接入任何一台服务器二层交换机的两个uplink口的RX方向上竟然存在很大的流量。通过在此交换机上抓这两个uplink口的数据包,发现存在很多unicast的包。而从三层交换机上面通过查找arp表和mac表后证明这些数据包不应该会下发到此交换机上。此问题查找了很久都没有找到原因。今天在某朋友的提示下,查看了block-unicast的命令解释。
Understanding How Unicast Flood Blocking Works
You can enable unicast flood blocking on any Ethernet port on a per-port basis. Unicast flood blocking provides you the option to drop the unicast flood packets on an Ethernet port that has only one host that is connected to the port. All the Ethernet ports on a switch are configured to allow unicast flooding; unicast flood blocking allows you to drop the unicast flood packets before they reach the port.
Caution
You must have a static CAM entry that is associated with the Ethernet port before you enable unicast flood blocking. If you do not have a static CAM entry that is associated with the port, you will lose network connectivity if you enable unicast flood blocking. You can verify that a static CAM entry exists by entering the
show cam static command.
---摘自
[url]http://www.cisco.com/en/US/docs/switches/lan/catalyst6500/catos/8.x/configuration/guide/uniflood.html[/url]
反正此二层交换机下面没有接服务器,于是便在三层交换机的下联此二层交换机的端口上启用了命令:switch block unicast。然后查看二层交换机的端口速率变化,发现很快速率就降到了300K左右,效果非常明显。呵呵,虽然没有从根本上解决上面描述的流量异常转发现象。
然后我通过在此二层交换机下面接入一台服务器(ip=1.1.1.1)来测试启用block-unicast特性的效果。
1,在没有启用block-unicast特性时,在远端长ping 1.1.1.1,然后在三层交换机上面清除此服务器的mac表项,发现根本没有任何丢包;
2,在启用了block-unicast特性后,在远端长ping 1.1.1.1,然后在三层交换机上面清除此服务器的mac表项,发现time-out了,大概丢包15个。
下面来分析一下原因,也即
block-unicast特性的处理机制:在端口A上启用了此特性后,所有发给端口A的数据包都要查看一下端口A的相关mac表项,如果此表项有数据包的目的mac地址,就进行转发;否则丢弃。直到此mac相关的arp表项超时,进行arp洪泛后,交换机学习此mac入mac表,才能通信。
总结:在生产网络上,需要谨慎使用此特性,一般不启用,默认也是不启用。当然在二层交换机的access模式端口可以结合端口安全sticky特性来启用block-unicast。
©著作权归作者所有:来自51CTO博客作者chris_lee的原创作品,如需转载,请注明出处,否则将追究法律责任
0
收藏
推荐专栏更多
猜你喜欢
我的友情链接
bigpipe merge对F5做批量配置
我们不得不面对的中年职场危机
职场终极密籍--记我的职业生涯
我的IT职场生涯: 毕业4年,月薪过万
年薪从0到10万-我的IT职场经验总结
致IT同仁 — IT人士常犯的17个职场错误
“跳槽加薪”现象,无奈的职场规则
职场观察:高薪需要什么?
关于基本工作素养在职场当中的重要性
驾驭你的“职场布朗运动”
30-35岁职场规划深谈,字字戳心
简述centOS 7系统用户和组的管理及配置
解析DELL R710服务器迁移操作内容
开学季出大事:某教育局丢失3台虚拟机
EVA4400存储虚拟机+数据库数据恢复成功案例
服务器数据恢复通用方法+服务器分区丢失恢复案例
在CentOS7上部署squid缓存服务器及代理功能
EMC 5400服务器raid阵列瘫痪数据恢复成功案例
服务器数据恢复案例 / raid5阵列多块硬盘离线处理方法
扫一扫,领取大礼包
转载于:https://blog.51cto.com/ipneter/92230
Ctrl+Enter 发布
发布
取消