Multicast
同一網路上的兩台機器中的一台不接收多播組成員身份
在遠端網路中,我們有兩台機器。其中一個接收多播訂閱,另一個不接收
第一台機器只接收 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
而機器二收到更多的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 機器可以發送多播數據包但無法接收它們。
還有什麼可以檢查的?
在 Ubuntu 上切換到 IGMPv2
echo "2" > /proc/sys/net/ipv4/conf/eth1/force_igmp_version
再試一次。如果您遇到與檢查反向路徑過濾相同的問題
cat /proc/sys/net/ipv4/conf/default/rp_filter
1 表示核心將通過確認反向路徑來進行原始碼驗證。
0 表示,沒有來源驗證。
使用 0