As noted by dirkt, I'm missing information: This is the continuation of this question, but to summarize, I'm trying to receive a lot of multicast traffic, more than one interface can handle, so in order to receive it all, I want to use multiple interfaces and join streams on each of them separately.
I have three NICs, 1 (let's call it webIf) connected to the internet, and the 2 others (let's call them lanIf1 and lanIf2) connected to a LAN (same one for both). I'm trying to receive multicast traffic on both of them, but only one interface reports when receiving IGMP queries, and only for the stream that it joined. Therefore, after the timeout period, the switch stops sending the stream that the other interface joined.
To solve that issue, I'm attempting to use policy routing: create a routing table for each lanIf, add a route on each to go to the same gateway, and create two rules to use the two new routing tables before using the main routing table
So if my addresses are:
lanIf1: 25.25.43.88 lanIf2: 25.25.43.84 default gateway of the lan switch: 25.25.43.5 igmp querier: 25.25.43.1 I'd first add the tables to /etc/iproute2/rt_tables , such as cat /etc/iproute2/rt_tables would show:
# # reserved values # 255 local 254 main 253 default 0 unspec # # local # #1 inr.ruhep 2 lanIf1Table 3 lanIf2Table Then I'd run this script as root:
ip route add 25.25.43.0/24 dev lanIf1 src 25.25.43.88 table lanIf1Table ip route add default via 25.25.43.5 dev lanIf1 table lanIf1Table ip route add 25.25.43.0/24 dev lanIf2 src 25.25.43.84 table lanIf2Table ip route add default via 25.25.43.5 dev lanIf2 table lanIf2Table ip rule add from 25.25.43.88 table lanIf1Table prio 1000 ip rule add from 25.25.43.84 table lanIf2Table prio 1001 But then nothing happens, the IGMP queries keep only being answered by one of the interfaces.
The only way I can get anything to work is to change one of the rules: ip rule add from 0.0.0.0 table lanIf1Table prio 1000. Then, the IGMP reports are done on lanIf1. But then I lose all internet access, of course, because all traffic goes through lanIf1Table.
What am I doing wrong? I've been following these tutorials: http://www.rjsystems.nl/en/2100-adv-routing.php
https://blog.scottlowe.org/2013/05/29/a-quick-introduction-to-linux-policy-routing/