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: 184.108.40.206 lanIf2: 220.127.116.11 default gateway of the lan switch: 18.104.22.168 igmp querier: 22.214.171.124
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 126.96.36.199/24 dev lanIf1 src 188.8.131.52 table lanIf1Table ip route add default via 184.108.40.206 dev lanIf1 table lanIf1Table ip route add 220.127.116.11/24 dev lanIf2 src 18.104.22.168 table lanIf2Table ip route add default via 22.214.171.124 dev lanIf2 table lanIf2Table ip rule add from 126.96.36.199 table lanIf1Table prio 1000 ip rule add from 188.8.131.52 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
What am I doing wrong? I've been following these tutorials: http://www.rjsystems.nl/en/2100-adv-routing.php