我试图了解join特定多播组时奇怪的数据包丢弃问题。
我认为这个问题与内核版本2.6.37中引入的补丁有关
Beginning with kernel 2.6.37, it has been changed the meaning of dropped packet count. Before, dropped packets was most likely due to an error. Now, the rx_dropped counter shows statistics for dropped frames because of: Softnet backlog full -- (Measured from /proc/net/softnet_stat) Bad / Unintended VLAN tags Unknown / Unregistered protocols IPv6 frames when the server is not configured for IPv6 If any frames meet those conditions, they are dropped before the protocol stack and the rx_dropped counter is incremented.
在干净的SLES11 SP3上,我设法通过joinSTP多播组(01:80:c2:00:00:00)来重现这一点。
没有任何更改, /proc/net/dev (RX)或netstat -i没有数据包丢失,因为我的系统没有joinSTP多播组(因此忽略数据包)。
当我joinSTP组播组时,我可以看到数据包丢失(每2秒1个数据包),由于内核2.6.37(未知/未注册协议)中引入的修补程序,我相信这会丢失,这是可以的。
hostname:~ # ip maddr add 01:80:c2:00:00:00 dev eth1
我的理解是,当我将modprobe llc / stp模块装入内核时,它识别协议并因此停止丢弃数据包(testingcertificate我是正确的)。
Modprobing llc或stp模块(取决于llc)“修复”丢包问题。
现在,问题是:
我有一个应用程序在启动时join多个多播组。 由于某种原因, 一个特定的join会触发丢包的问题(每2秒1个数据包)。
问题是,它不是 stp多播地址01:80:c2:00:00:00而是完全不同的一个( 01:00:5e:46:ac:04 aka 239.70.172.4 )。 插入llc / stp模块“修复”掉包计数器增量。 所有其他组播组都不会导致此问题,例如( 01:00:5e:46:ac:02 )等等。
STP帧是每隔2秒出现在接口上的唯一一个,但是目的MAC地址是01:80:c2:00:00:00。
00:21:1b:4f:a3:bf > 01:80:c2:00:00:00, 802.3, length 119: LLC, dsap STP (0x42) Individual, ssap STP (0x42) Command, ctrl 0x03: STP 802.1s, Rapid STP, CIST Flags [Learn, Forward]
这怎么可能? 为什么01:00:5e:46:ac:04多点传送组会触发这种行为,就像它与STP组有关,并让帧/数据包进一步通过堆栈?