我正在为网络交换机的 IGMP 和 MLD 实现编写测试用例。这些测试用例在 Raspbian 上运行。但是,Raspbian 似乎会定期发送自己的 IGMP 报告/查询,这会干扰我的测试用例。我如何全局或针对给定接口禁用这些数据包?
我见过这个答案,但无法确定哪个进程生成了 IGMP 流量。据我所知,我没有安装任何需要多播组的应用程序。
因为我需要使用 Scapy 发送和接收 IGMP 来进行测试用例,所以仅在防火墙中阻止 IGMP 不是一个选择。
以下是有问题的流量:
pi@raspberrypi204:~ $ sudo tshark -i any -Y igmp
tshark: Lua: Error during loading:
[string "/usr/share/wireshark/init.lua"]:46: dofile has been disabled due to running Wireshark as superuser. See http://wiki.wireshark.org/CaptureSetup/CapturePrivileges for help in running Wireshark as an unprivileged user.
Running as user "root" and group "root". This could be dangerous.
Capturing on 'any'
[...]
196 62.189350 192.168.178.202 -> 224.0.0.22 IGMPv3 64 Membership Report / Join group 224.0.0.252 for any sources / Join group 224.0.1.12 for any sources
197 62.344484 192.168.178.201 -> 224.0.0.22 IGMPv3 62 Membership Report / Join group 224.0.0.252 for any sources
198 62.356118 192.168.178.201 -> 224.0.0.22 IGMPv3 62 Membership Report / Join group 224.0.0.252 for any sources
199 62.357405 192.168.2.206 -> 224.0.0.22 IGMPv3 62 Membership Report / Join group 224.0.0.251 for any sources
201 62.361857 192.168.178.201 -> 224.0.0.22 IGMPv3 62 Membership Report / Join group 224.0.0.252 for any sources
206 62.384387 192.168.178.201 -> 224.0.0.22 IGMPv3 62 Membership Report / Join group 224.0.0.252 for any sources
[...]
我在用:
pi@raspberrypi204:~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 8.0 (jessie)
Release: 8.0
Codename: jessie