在远程网络中,我们有两台机器。其中一个接收多播订阅,另一个没有
机器一只接收igmp查询:
sudo tcpdump -nevv -i eth1 -s 1515 igmp
tcpdump: listening on eth1, link-type EN10MB (Ethernet), capture size 1515 bytes
09:42:12.973995 00:24:97:23:54:3f > 01:00:5e:00:00:01, ethertype IPv4 (0x0800), length 60: (tos 0xc0, ttl 1, id 13227, offset 0, flags [none], proto IGMP (2), length 32, options (RA))
157.157.7.252 > 224.0.0.1: igmp query v2当机器2接收更多igmp数据包时:
09:46:12.986376 00:24:97:23:54:3f > 01:00:5e:00:00:01, ethertype IPv4 (0x0800), length 60: (tos 0xc0, ttl 1, id 13468, offset 0, flags [none], proto IGMP (2), length 32, options (RA))
157.157.7.252 > 224.0.0.1: igmp query v2
09:46:13.148086 00:e0:81:b3:f7:66 > 01:00:5e:14:14:8b, ethertype IPv4 (0x0800), length 46: (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 32, options (RA))
192.168.21.12 > 230.20.20.139: igmp v2 report 230.20.20.139
09:46:13.384097 00:e0:81:b3:f7:66 > 01:00:5e:1e:1e:6e, ethertype IPv4 (0x0800), length 46: (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 32, options (RA))
192.168.21.12 > 231.30.30.110: igmp v2 report 231.30.30.110
09:46:15.056105 00:e0:81:b3:f7:66 > 01:00:5e:14:14:b7, ethertype IPv4 (0x0800), length 46: (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 32, options (RA))
192.168.21.12 > 231.20.20.183: igmp v2 report 231.20.20.183
09:46:15.212094 00:e0:81:b3:f7:66 > 01:00:5e:00:00:fb, ethertype IPv4 (0x0800), length 46: (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 32, options (RA))
192.168.21.12 > 224.0.0.251: igmp v2 report 224.0.0.251
09:46:15.900096 00:e0:81:b3:f7:66 > 01:00:5e:14:14:24, ethertype IPv4 (0x0800), length 46: (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 32, options (RA))
192.168.21.12 > 230.20.20.36: igmp v2 report 230.20.20.36
09:46:16.036096 00:e0:81:b3:f7:66 > 01:00:5e:1d:1d:99, ethertype IPv4 (0x0800), length 46: (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 32, options (RA))
192.168.21.12 > 231.29.29.153: igmp v2 report 231.29.29.153
09:46:18.764102 00:e0:81:b3:f7:66 > 01:00:5e:14:14:8a, ethertype IPv4 (0x0800), length 46: (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 32, options (RA))
192.168.21.12 > 230.20.20.138: igmp v2 report 230.20.20.138
09:46:21.612091 00:e0:81:b3:f7:66 > 01:00:5e:14:14:08, ethertype IPv4 (0x0800), length 46: (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 32, options (RA))
192.168.21.12 > 231.20.20.8: igmp v2 report 231.20.20.8
09:46:22.764102 00:e0:81:b3:f7:66 > 01:00:5e:14:14:70, ethertype IPv4 (0x0800), length 46: (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 32, options (RA))
192.168.21.12 > 230.20.20.112: igmp v2 report 230.20.20.112
09:46:22.956111 00:e0:81:b3:f7:66 > 01:00:5e:14:14:85, ethertype IPv4 (0x0800), length 46: (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 32, options (RA))
192.168.21.12 > 230.20.20.133: igmp v2 report 230.20.20.133在这两种情况下,路线是:
224.0.0.0 * 240.0.0.0 U 0 0 0相同的局域网,没有防火墙,没有iptables规则,而且它在ups失败之前运行得很好。
非工作机器是ubuntu 14,工作的是debian jessie。
尝试用iperf进行测试,ubuntu机器可以发送多播数据包,但不能接收它们。
还有什么可以检查的?
发布于 2016-05-27 00:04:07
切换到Ubuntu上的IGMPv2
echo "2" > /proc/sys/net/ipv4/conf/eth1/force_igmp_version再试一试。如果您有相同的问题,请检查反向路径过滤。
cat /proc/sys/net/ipv4/conf/default/rp_filter1表示内核将通过确认反向路径来进行源验证。
0表示没有源验证。
使用0
https://serverfault.com/questions/779140
复制相似问题