This is a discussion on Strange mrouted / kernel routing behaviour within the Linux Networking forums, part of the Linux Forums category; I'm trying to modify mrouted to proxy IGMP joins from one interface to another on GNU/Linux 2.4....
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I'm trying to modify mrouted to proxy IGMP joins from one interface to
another on GNU/Linux 2.4.31. The setup is roughly as follows (with fictional and isolated networks): hostA | eth1(1.1.1.1) | ---(1.1/16) | eth1(1.1.1.2) | mrouter | eth0(1.2.1.1) | ---(1.2/16) | eth0 (1.2.1.2) | hostB The mrouted on "mrouter" is modified such that when a join from hostA is received on eth1 ("RECV V2 member report" in tcpdump terms) it does a mrouted/k_join() to setsockopt IP_ADD_MEMBERSHIP on the multicast socket, with the source address set to 1.2.1.1 (i.e. mrouter's eth0). This indeed causes mc joins to appear on eth0 of mrouter, but their source address is set to 1.1.1.2 rather than 1.2.1.1 - i.e. they appear to "come" from mrouter's eth1 rather than eth0. Strangely, when the joins are sent from hostB then they also get the source address of 1.1.1.2 when they are forwarded to hostA. It seems that a "default" source address is being used, no matter was is specified in the IP_ADD_MEMBERSHIP. I've checked the kernel sources at http://lxr.linux.no/source and I don't see any obvious reason why the source address of my IP_ADD_MEMBERSHIP should not be respected. Am I missing some trick here? Is this a known problem/feature? Any workaround. All/any advice welcomed. Thanks. |
|
|||
|
Actually, I can very much simplify this question. Given the following
setup - WITHOUT any mrouted running: | eth1(1.1.1.2) | hostX | eth0(1.2.1.1) | If I use mtest / mrcv to do a join from hostX on 1.2.1.1, then I see igmp v2 reports on eth0 but with a source address of 1.1.1.2 - ie.as if they come from eth1. What is going on here? Note that if I do a join from hostX on 1.1.1.2 (i.e. eth1) then the igmp v2 reports on eth1 also have a source adderss of 1.1.1.2 (i.e. eth1). I am very confused. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|