Cannot get routing to work between interfaces.
I have struggled with this for some time now. And now I have resort to file this issue since I cannot think of other things to try really. It is really strange that I cannot get this to work since I had a similar setup running with igmpproxy 0.1.0 many years ago. It succesfully joins and receives multicast on the tap0 interface (ttl 58) but nothing gets forwarded to the br0 interface.
igmpproxy version 0.2.1 Latest from github.
Linux kernel. Tested both 4.15.0-041500-generic and 4.9.73-040973-generic as discussed in other issue.
CONFIG_INET=y CONFIG_IP_MULTICAST=y CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_MROUTE=y CONFIG_IP_MROUTE_MULTIPLE_TABLES=y CONFIG_IP_PIMSM_V1=y
net.ipv4.ip_forward = 1
Config file:
quickleave
phyint tap0 upstream ratelimit 0 threshold 1 altnet 62.71.245.130/32
phyint br0 downstream ratelimit 0 threshold 1 whitelist 239.16.116.193/32 whitelist 239.16.116.198/32 whitelist 239.16.116.199/32
phyint enp1s0 disabled
phyint enp2s0 disabled
phyint enp3s0f0 disabled
phyint enp3s0f1 disabled
ifconfig
br0 Link encap:Ethernet HWaddr 00:22:4d:7a:eb:a7
inet addr:192.168.126.221 Bcast:192.168.127.255 Mask:255.255.254.0
inet6 addr: fe80::222:4dff:fe7a:eba7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2576 errors:0 dropped:0 overruns:0 frame:0
TX packets:291 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:537642 (537.6 KB) TX bytes:42676 (42.6 KB)
enp1s0 Link encap:Ethernet HWaddr 00:22:4d:7a:eb:a7
inet6 addr: fe80::222:4dff:fe7a:eba7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2706 errors:0 dropped:3 overruns:0 frame:0
TX packets:323 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:618245 (618.2 KB) TX bytes:47843 (47.8 KB)
Interrupt:17 Memory:80220000-80240000
enp2s0 Link encap:Ethernet HWaddr 00:22:4d:7a:eb:ab
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:16 Memory:80320000-80340000
enp3s0f0 Link encap:Ethernet HWaddr 00:30:18:a3:eb:bc
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Memory:80d00000-80d7ffff
enp3s0f1 Link encap:Ethernet HWaddr 00:30:18:a3:eb:bd
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Memory:80e00000-80e7ffff
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:186 errors:0 dropped:0 overruns:0 frame:0
TX packets:186 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:13686 (13.6 KB) TX bytes:13686 (13.6 KB)
tap0 Link encap:Ethernet HWaddr 16:6a:09:18:73:c4
inet addr:192.168.1.103 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::146a:9ff:fe18:73c4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:21 errors:0 dropped:0 overruns:0 frame:0
TX packets:59 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2294 (2.2 KB) TX bytes:7960 (7.9 KB)
Output from ip mroute
(194.23.0.199, 239.16.16.212) Iif: unresolved (194.22.194.2, 239.16.16.1) Iif: unresolved (192.168.127.118, 239.126.100.225) Iif: unresolved (192.168.126.39, 239.17.171.177) Iif: unresolved (192.168.127.20, 239.18.181.176) Iif: unresolved (194.22.194.10, 239.195.0.175) Iif: unresolved (194.22.194.6, 239.195.1.141) Iif: unresolved (194.22.194.10, 239.16.16.253) Iif: unresolved (194.22.194.10, 239.195.0.171) Iif: unresolved (194.22.194.2, 239.195.0.246) Iif: unresolved
Output from netstat -g
IPv6/IPv4 Group Memberships Interface RefCnt Group
lo 1 224.0.0.1 enp3s0f0 1 224.0.0.1 enp2s0 1 224.0.0.1 enp3s0f1 1 224.0.0.1 enp1s0 1 224.0.0.1 br0 1 224.0.0.22 br0 1 224.0.0.2 br0 1 224.0.0.251 br0 1 224.0.0.1 tap0 1 239.16.116.198 tap0 1 224.0.0.251 tap0 1 224.0.0.1 lo 1 ip6-allnodes lo 1 ff01::1 enp3s0f0 1 ip6-allnodes enp3s0f0 1 ff01::1 enp2s0 1 ip6-allnodes enp2s0 1 ff01::1 enp3s0f1 1 ip6-allnodes enp3s0f1 1 ff01::1 enp1s0 1 ip6-allnodes enp1s0 1 ff01::1 br0 1 ff02::fb br0 1 ff02::1:ff7a:eba7 br0 1 ip6-allnodes br0 1 ff01::1 tap0 1 ff02::fb tap0 1 ff02::1:ff52:fdd5 tap0 1 ip6-allnodes tap0 1 ff01::1
sudo tcpdump -n -i br0 -vvvvvv host 224.0.0.1 or 239.16.116.198 tcpdump: listening on br0, link-type EN10MB (Ethernet), capture size 262144 bytes 12:11:17.521477 IP (tos 0xc0, ttl 1, id 45813, offset 0, flags [none], proto IGMP (2), length 32, options (RA)) 192.168.126.221 > 224.0.0.1: igmp query v2 12:11:17.729027 IP (tos 0xc0, ttl 1, id 9038, offset 0, flags [none], proto IGMP (2), length 28) 192.168.126.1 > 239.16.116.198: igmp query v2 [gaddr 239.16.116.198] 12:11:23.189944 IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 32, options (RA)) 192.168.127.118 > 239.16.116.198: igmp v2 report 239.16.116.198 12:11:28.011933 IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 32, options (RA)) 192.168.127.118 > 239.16.116.198: igmp v2 report 239.16.116.198 12:11:32.751516 IP (tos 0xc0, ttl 1, id 44309, offset 0, flags [none], proto IGMP (2), length 28) 192.168.126.1 > 224.0.0.1: igmp query v2 12:11:35.955866 IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto IGMP (2), length 32, options (RA)) 192.168.127.118 > 239.16.116.198: igmp v2 report 239.16.116.198 12:11:44.547237 IP (tos 0xc0, ttl 1, id 18986, offset 0, flags [none], proto IGMP (2), length 32, options (RA)) 192.168.126.221 > 239.16.116.198: igmp query v2 [gaddr 239.16.116.198] 12:11:44.556337 IP (tos 0xc0, ttl 1, id 12283, offset 0, flags [none], proto IGMP (2), length 28) 192.168.126.1 > 239.16.116.198: igmp query v2 [gaddr 239.16.116.198] 12:11:48.563439 IP (tos 0xc0, ttl 1, id 46543, offset 0, flags [none], proto IGMP (2), length 32, options (RA))
This a edited version of the log file : Searching for config file at '/etc/igmpproxy.conf' Config: Quick leave mode enabled. Config: Got a phyint token. Config: IF: Config for interface tap0. Config: IF: Got upstream token. Config: IF: Got ratelimit token '0'. Config: IF: Got threshold token '1'. Config: IF: Got altnet token 62.71.245.130/32. Config: IF: Altnet: Parsed altnet to 62.71.245.130/32. IF name : tap0 Next ptr : 0 Ratelimit : 0 Threshold : 1 State : 1 Allowednet ptr : 12c34c0 Config: Got a phyint token. Config: IF: Config for interface br0. Config: IF: Got downstream token. Config: IF: Got ratelimit token '0'. Config: IF: Got threshold token '1'. Config: IF: Got whitelist token 239.16.116.193/32. Config: IF: Altnet: Parsed altnet to 239.16.116.193/32. Config: IF: Got whitelist token 239.16.116.198/32. Config: IF: Altnet: Parsed altnet to 239.16.116.198/32. Config: IF: Got whitelist token 239.16.116.199/32. Config: IF: Altnet: Parsed altnet to 239.16.116.199/32. IF name : br0 Next ptr : 0 Ratelimit : 0 Threshold : 1 State : 2 Allowednet ptr : 0 Config: Got a phyint token. Config: IF: Config for interface enp1s0. Config: IF: Got disabled token. IF name : enp1s0 Next ptr : 0 Ratelimit : 0 Threshold : 1 State : 0 Allowednet ptr : 0 Config: Got a phyint token. Config: IF: Config for interface enp2s0. Config: IF: Got disabled token. IF name : enp2s0 Next ptr : 0 Ratelimit : 0 Threshold : 1 State : 0 Allowednet ptr : 0 Config: Got a phyint token. Config: IF: Config for interface enp3s0f0. Config: IF: Got disabled token. IF name : enp3s0f0 Next ptr : 0 Ratelimit : 0 Threshold : 1 State : 0 Allowednet ptr : 0 Config: Got a phyint token. Config: IF: Config for interface enp3s0f1. Config: IF: Got disabled token. IF name : enp3s0f1 Next ptr : 0 Ratelimit : 0 Threshold : 1 State : 0 Allowednet ptr : 0 buildIfVc: Interface lo Addr: 127.0.0.1, Flags: 0x0049, Network: 127/8 buildIfVc: Interface br0 Addr: 192.168.126.221, Flags: 0x1043, Network: 192.168.126/23 buildIfVc: Interface tap0 Addr: 192.168.1.102, Flags: 0x1043, Network: 192.168.1/24 Found config for br0 Found config for tap0 adding VIF, Ix 0 Fl 0x0 IP 0xdd7ea8c0 br0, Threshold: 1, Ratelimit: 0 Network for [br0] : 192.168.126/23 Found upstrem IF #0, will assing as upstream Vif 2 adding VIF, Ix 1 Fl 0x0 IP 0x6601a8c0 tap0, Threshold: 1, Ratelimit: 0 Network for [tap0] : 192.168.1/24 Network for [tap0] : 62.71.245.130/32 Got 262144 byte buffer size in 0 iterations Joining all-routers group 224.0.0.2 on vif 192.168.126.221 joinMcGroup: 224.0.0.2 on br0 Joining all igmpv3 multicast routers group 224.0.0.22 on vif 192.168.126.221 joinMcGroup: 224.0.0.22 on br0 SENT Membership query from 192.168.126.221 to 224.0.0.1 Sent membership query from 192.168.126.221 to 224.0.0.1. Delay: 10 Created timeout 1 (#0) - delay 10 secs (Id:1, Time:10) Created timeout 2 (#1) - delay 21 secs (Id:1, Time:10) (Id:2, Time:21)
Should insert group 239.16.16.208 (from: 192.168.127.28) to route table. Vif Ix : 0 The group address 239.16.16.208 may not be requested from this interface. Ignoring. RECV Membership query from 192.168.126.1 to 239.16.116.198 RECV Leave message from 192.168.127.28 to 224.0.0.2 Got leave message from 192.168.127.28 to 239.16.16.208. Starting last member detection. Created timeout 4 (#2) - delay 0 secs (Id:1, Time:10)
RECV Membership query from 192.168.126.1 to 239.16.16.208 RECV V2 member report from 192.168.127.118 to 239.16.116.198 Should insert group 239.16.116.198 (from: 192.168.127.118) to route table. Vif Ix : 0 No existing route for 239.16.116.198. Create new. No routes in table. Insert at beginning. Inserted route table entry for 239.16.116.198 on VIF #0 Joining group 239.16.116.198 upstream on IF address 192.168.1.102 joinMcGroup: 239.16.116.198 on tap0
Current routing table (Insert Route):
#0: Dst: 239.16.116.198, Age:2, St: I, OutVifs: 0x00000001
RECV V2 member report from 192.168.1.102 to 239.16.116.198 The IGMP message was from myself. Ignoring.
About to call timeout 1 (#0) Aging routes in table.
Current routing table (Age active routes):
#0: Dst: 239.16.116.198, Age:1, St: I, OutVifs: 0x00000001
About to call timeout 3 (#1) About to call timeout 4 (#2)
RECV Membership query from 192.168.126.1 to 239.16.16.208 RECV V2 member report from 192.168.127.118 to 239.16.116.198 Should insert group 239.16.116.198 (from: 192.168.127.118) to route table. Vif Ix : 0 Updated route entry for 239.16.116.198 on VIF #0
Current routing table (Insert Route):
#0: Dst: 239.16.116.198, Age:1, St: I, OutVifs: 0x00000001
RECV V2 member report from 192.168.1.102 to 239.16.116.198 The IGMP message was from myself. Ignoring.
RECV V2 member report from 192.168.127.118 to 239.16.116.198 Should insert group 239.16.116.198 (from: 192.168.127.118) to route table. Vif Ix : 0 Updated route entry for 239.16.116.198 on VIF #0
Current routing table (Insert Route):
#0: Dst: 239.16.116.198, Age:1, St: I, OutVifs: 0x00000001
The IGMP message was local multicast. Ignoring.
RECV Membership query from 192.168.1.1 to 239.16.116.198 About to call timeout 52 (#0) About to call timeout 53 (#1) About to call timeout 54 (#2) About to call timeout 55 (#3) About to call timeout 56 (#4) About to call timeout 57 (#5) RECV V2 member report from 192.168.1.102 to 239.16.116.198 The IGMP message was from myself. Ignoring. RECV Membership query from 192.168.1.1 to 239.16.116.198 RECV V2 member report from 192.168.127.28 to 239.16.16.208
Got leave message from 192.168.127.118 to 239.16.116.198. Starting last member detection. counted 1 interfaces Leaving group -965472017 now Leaving group 239.16.116.198 upstream on IF address 192.168.1.102 leaveMcGroup: 239.16.116.198 on tap0 Interface id 0 is in group $d SENT Membership query from 192.168.126.221 to 239.16.116.198 Sent membership query from 192.168.126.221 to 239.16.116.198. Delay: 10 Created timeout 151 (#56) - delay 0 secs select() failure; Errno(4): Interrupted system call Got a interrupt signal. Exiting. clean handler called Removing route entry for 239.16.116.198 Leaving group 239.16.116.198 upstream on IF address 192.168.1.102 leaveMcGroup: 239.16.116.198 on tap0 MRT_DROP_MEMBERSHIP failed; Errno(99): Cannot assign requested address All routes removed. Routing table is empty. Shutdown complete....