 |
|
| Linux Forum Index » Linux Networking » receiving multicast over multiple interfaces... |
|
Page 1 of 1 |
|
| Author |
Message |
| Joachim Worringen... |
Posted: Wed Sep 30, 2009 4:10 am |
|
|
|
Guest
|
Greetings,
for a specific benchmarking setup, we would like to receive a single
multicast sent from machine A on two interfaces (physical NICs) within
another machine B. The two NICs in B have IPs within different
subnets.
The benchmark runs two threads which both join the same IP multicast
group (struct ip_mreqn.imr_multiaddr), but bind them to different
interfaces (struct ip_mreqn.imr_address). This works fine from the
benchmark perspective, BUT: the datagrams are actually only received
via the first interface to which the IP multicast group is bound (this
was determined by looking at /proc/interrupts and with ifconfig).
While this makes perfect sense for normal operation, as it avoids
receiving the same data twice, we would really like to have both
interfaces receive and process the multicast data.
Is there any way to do achieve this? I'm currently looking at net/ipv4/
igmp.c to understand where this "interface joining" is done, but any
input is welcome.
thanks, Joachim |
|
|
| Back to top |
|
|
|
| Antoine EMERIT... |
Posted: Wed Sep 30, 2009 2:38 pm |
|
|
|
Guest
|
Joachim Worringen <worringen at (no spam) googlemail.com> écrivait news:3ae9cb03-f9d6-
4d78-b677-f8aba4d8c0db at (no spam) k19g2000yqc.googlegroups.com:
Quote: Greetings,
for a specific benchmarking setup, we would like to receive a single
multicast sent from machine A on two interfaces (physical NICs) within
another machine B. The two NICs in B have IPs within different
subnets.
You may try the setsockopt function :
setsockopt (socket, IPPROTO_IP, IP_MULTICAST_IF, &interface_addr, sizeof
interface_addr));
or you may define two multicast subnet, one on each interface :
route add -net 224.0.0.0 netmask 248.0.0.0 dev eth0
route add -net 232.0.0.0 netmask 248.0.0.0 dev eth1
then send 2 multicast stream to 224.0.0.1 and 232.0.0.1 (e.g.).
Hope it may help, regards |
|
|
| Back to top |
|
|
|
| Joachim Worringen... |
Posted: Fri Oct 02, 2009 12:15 am |
|
|
|
Guest
|
On 30 Sep., 22:38, Antoine EMERIT <no... at (no spam) ducon.com> wrote:
Quote: Joachim Worringen <worrin... at (no spam) googlemail.com> écrivait news:3ae9cb03-f9d6-
4d78-b677-f8aba4d8c... at (no spam) k19g2000yqc.googlegroups.com:
Greetings,
for a specific benchmarking setup, we would like to receive a single
multicast sent from machine A on two interfaces (physical NICs) within
another machine B. The two NICs in B have IPs within different
subnets.
You may try the setsockopt function :
setsockopt (socket, IPPROTO_IP, IP_MULTICAST_IF, &interface_addr, sizeof
interface_addr));
This option is of course already used on the sending side to determine
the interface for the outgoing packets. Sending is not the problem,
all packets shall leave the host via a single interface, which is fine
for us.
Quote: or you may define two multicast subnet, one on each interface :
route add -net 224.0.0.0 netmask 248.0.0.0 dev eth0
route add -net 232.0.0.0 netmask 248.0.0.0 dev eth1
then send 2 multicast stream to 224.0.0.1 and 232.0.0.1 (e.g.).
The nature of the benchmark requires that we only send a single
multicast (to determine the travel time of the packets coming in via
either interface).
Quote: Hope it may help, regards
Not really, sorry. I am looking for a hack in the kernel IP layer to
disable the optimization described above.
regards, Joachim |
|
|
| Back to top |
|
|
|
|
|
All times are GMT - 5 Hours
The time now is Tue Nov 24, 2009 7:32 pm
|
|