免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1839 | 回复: 0
打印 上一主题 下一主题

交换机block unicast机制 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-06-06 18:37 |只看该作者 |倒序浏览

一直以来在一个典型的交换三角网络内,存在这样的一个问题:一台没有接入任何一台服务器二层交换机的两个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.
---摘自
http://www.cisco.com/en/US/docs/switches/lan/catalyst6500/catos/8.x/configuration/guide/uniflood.html

反正此二层交换机下面没有接服务器,于是便在三层交换机的下联此二层交换机的端口上启用了命令: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表,才能通信。
总结:在生产网络上,需要谨慎使用此特性,一般不启用,默认也是不启用。


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/70546/showart_728535.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP