2001-11-21 20:54:13

by berthiaume_wayne

[permalink] [raw]
Subject: Multicast Broadcast

Hello group....

I have a cluster that I wish to be able to perform a multicast
broadcast over two backbones, primary and secondary, simultaneously. The two
eth's are bound to the same VIP. When I perform the broadcast, it only goes
out on eth0.
Is there a way to do this without writing an application to do it?
I've been looking at igmp.c:ip_mc_join_group to do a possible change like:

#ifdef DUAL_MCAST_BIND
if(!imr->imr_ifindex) {
imr->ifindex=2; /* eth0 */
err=ip_mc_join_group(sk, imr);
if (!err) {
imr->ifindex=3; /* eth1 */
err=ip_mc_join_group(sk, imr);
}
return err;
}
#else
if(!imr->imr_ifindex)
in_dev = ip_mc_find_dev(imr);
#endif

Will this be necessary??? Could there be something in the kerenl to
configure?

PS: Please cc me any response as I'm not yet monitoring this group.

Thanks,
Wayne
EMC Corp
ObjectStorEngineering
4400 Computer Drive
M/S F213
Westboro, MA 01580

email: [email protected]
[email protected]

"One man can make a difference, and every man should try." - JFK







Attachments:
Wayne Berthiaume (E-mail).vcf (552.00 B)

2001-11-21 21:08:55

by Peter Svensson

[permalink] [raw]
Subject: Re: Multicast Broadcast

On Wed, 21 Nov 2001 [email protected] wrote:

> I have a cluster that I wish to be able to perform a multicast
> broadcast over two backbones, primary and secondary, simultaneously. The two
> eth's are bound to the same VIP. When I perform the broadcast, it only goes
> out on eth0.

I think you need multicast routing for that to work the way you want it
to. Flooding multicast traffic between network segments is normally the
task for multicast routers since you need a routing protocol to prevent
loops etc. If you send the data on both packets a multicast router
connected to the two networks would forward a copy each way resulting in
two packets on both segments.

Peter
--
Peter Svensson ! Pgp key available by finger, fingerprint:
<[email protected]> ! 8A E9 20 98 C1 FF 43 E3 07 FD B9 0A 80 72 70 AF
------------------------------------------------------------------------
Remember, Luke, your source will be with you... always...


2001-11-23 20:55:43

by Jamie Lokier

[permalink] [raw]
Subject: Re: Multicast Broadcast

[email protected] wrote:
> I have a cluster that I wish to be able to perform a multicast
> broadcast over two backbones, primary and secondary, simultaneously. The two
> eth's are bound to the same VIP. When I perform the broadcast, it only goes
> out on eth0.

I have seen this problem when trying to use an NTP server to multicast
to two ethernets. Unfortunately, NTP's output would only send to one of
the networks (eth0).

I never did find a workaround.

-- Jamie

2001-11-26 15:47:53

by berthiaume_wayne

[permalink] [raw]
Subject: RE: Multicast Broadcast

One potential work-around is a patch to
net/ipv4/igmp.c:ip_mc_join_group.
For example:

#ifdef DUAL_MCAST_BIND
if(!imr->imr_ifindex) {
imr->ifindex=2; /* eth0 */
err=ip_mc_join_group(sk, imr);
if (!err) {
imr->ifindex=3; /* eth1 */
err=ip_mc_join_group(sk, imr);
}
return err;
}
#else
if(!imr->imr_ifindex)
in_dev = ip_mc_find_dev(imr);
#endif

I'm hoping that there is another way.

Wayne
EMC Corp
ObjectStorEngineering
4400 Computer Drive
M/S F213
Westboro, MA 01580

email: [email protected]

"One man can make a difference, and every man should try." - JFK


-----Original Message-----
From: Jamie Lokier [mailto:[email protected]]
Sent: Friday, November 23, 2001 3:53 PM
To: [email protected]
Cc: [email protected]
Subject: Re: Multicast Broadcast


[email protected] wrote:
> I have a cluster that I wish to be able to perform a multicast
> broadcast over two backbones, primary and secondary, simultaneously. The
two
> eth's are bound to the same VIP. When I perform the broadcast, it only
goes
> out on eth0.

I have seen this problem when trying to use an NTP server to multicast
to two ethernets. Unfortunately, NTP's output would only send to one of
the networks (eth0).

I never did find a workaround.

-- Jamie

2001-11-26 16:16:06

by Andi Kleen

[permalink] [raw]
Subject: Re: Multicast Broadcast

[email protected] writes:

> One potential work-around is a patch to
> net/ipv4/igmp.c:ip_mc_join_group.
> For example:
>
> #ifdef DUAL_MCAST_BIND
> if(!imr->imr_ifindex) {
> imr->ifindex=2; /* eth0 */
> err=ip_mc_join_group(sk, imr);
> if (!err) {
> imr->ifindex=3; /* eth1 */
> err=ip_mc_join_group(sk, imr);
> }
> return err;
> }
> #else
> if(!imr->imr_ifindex)
> in_dev = ip_mc_find_dev(imr);
> #endif
>
> I'm hoping that there is another way.

It depends on what you want to do, but this "fix" is the same
equivalent to executing IP_ADD_MEMBERSHIP twice with 2 and 3 in the
imr_ifindex field (except that the later doesn't break any programs)

-Andi

2001-11-26 16:33:40

by berthiaume_wayne

[permalink] [raw]
Subject: RE: Multicast Broadcast

Wouldn't the IP address for the two NIC's have to be different for
that to work? I'm binding the same VIP to the two eth's.

-----Original Message-----
From: Andi Kleen [mailto:[email protected]]
Sent: Monday, November 26, 2001 11:16 AM
To: [email protected]
Cc: [email protected]
Subject: Re: Multicast Broadcast


[email protected] writes:

> One potential work-around is a patch to
> net/ipv4/igmp.c:ip_mc_join_group.
> For example:
>
> #ifdef DUAL_MCAST_BIND
> if(!imr->imr_ifindex) {
> imr->ifindex=2; /* eth0 */
> err=ip_mc_join_group(sk, imr);
> if (!err) {
> imr->ifindex=3; /* eth1 */
> err=ip_mc_join_group(sk, imr);
> }
> return err;
> }
> #else
> if(!imr->imr_ifindex)
> in_dev = ip_mc_find_dev(imr);
> #endif
>
> I'm hoping that there is another way.

It depends on what you want to do, but this "fix" is the same
equivalent to executing IP_ADD_MEMBERSHIP twice with 2 and 3 in the
imr_ifindex field (except that the later doesn't break any programs)

-Andi

2001-11-26 16:44:51

by Andi Kleen

[permalink] [raw]
Subject: Re: Multicast Broadcast

On Mon, Nov 26, 2001 at 11:33:03AM -0500, [email protected] wrote:
> Wouldn't the IP address for the two NIC's have to be different for
> that to work? I'm binding the same VIP to the two eth's.

ifindexes have nothing to do with IP addresses. If you tell the kernel
which interface(s) you want it'll follow your wishes.

There is not really an IP address per NIC; IP addresses are global per host
and the association with an IP interface just defines some defaults which
can be always overwritten by the user if he wants to.

-Andi

2001-11-29 21:32:05

by Andi Kleen

[permalink] [raw]
Subject: Re: Multicast Broadcast

On Thu, Nov 29, 2001 at 04:29:22PM -0500, [email protected] wrote:
> Andi, forgive my ignorance. I've searched around and can't seem to
> find any references to IP_ADD_MEMBERSHIP and how to use it. I did perform an

man 7 ip

It is a socket option you use in the program that does the multicast
communication.

-Andi

2001-11-29 21:30:35

by berthiaume_wayne

[permalink] [raw]
Subject: RE: Multicast Broadcast

Andi, forgive my ignorance. I've searched around and can't seem to
find any references to IP_ADD_MEMBERSHIP and how to use it. I did perform an
fgrep() and found the switch in net/ipv4/ip_socketglue.c, but where do I
implement it or how do I call it? Is this something I place in
/etc/sysconfig/network-scriptsifcfg-eth<x> file? Any help would be
appreciated.
Regards,
Wayne
EMC Corp
ObjectStor Engineering
4400 Computer Drive
M/S F213
Westboro, MA 01580

email: [email protected]

"One man can make a difference, and every man should try." - JFK


-----Original Message-----
From: Andi Kleen [mailto:[email protected]]
Sent: Monday, November 26, 2001 11:16 AM
To: [email protected]
Cc: [email protected]
Subject: Re: Multicast Broadcast


[email protected] writes:

> One potential work-around is a patch to
> net/ipv4/igmp.c:ip_mc_join_group.
> For example:
>
> #ifdef DUAL_MCAST_BIND
> if(!imr->imr_ifindex) {
> imr->ifindex=2; /* eth0 */
> err=ip_mc_join_group(sk, imr);
> if (!err) {
> imr->ifindex=3; /* eth1 */
> err=ip_mc_join_group(sk, imr);
> }
> return err;
> }
> #else
> if(!imr->imr_ifindex)
> in_dev = ip_mc_find_dev(imr);
> #endif
>
> I'm hoping that there is another way.

It depends on what you want to do, but this "fix" is the same
equivalent to executing IP_ADD_MEMBERSHIP twice with 2 and 3 in the
imr_ifindex field (except that the later doesn't break any programs)

-Andi

2001-11-30 21:13:26

by berthiaume_wayne

[permalink] [raw]
Subject: RE: Multicast Broadcast

Andi, it appears that JVM doesn't support the ip_mreqn struct that
would allow us to use imr_ifindex but supports only the older ip_mreq struct
as the optval. Any other suggestions.
Most appreciated,
Wayne
EMC Corp
ObjectStor Engineering
4400 Computer Drive
M/S F213
Westboro, MA 01580

email: [email protected]
[email protected]

"One man can make a difference, and every man should try." - JFK


-----Original Message-----
From: Andi Kleen [mailto:[email protected]]
Sent: Thursday, November 29, 2001 4:32 PM
To: [email protected]
Cc: [email protected]; [email protected]
Subject: Re: Multicast Broadcast


On Thu, Nov 29, 2001 at 04:29:22PM -0500, [email protected] wrote:
> Andi, forgive my ignorance. I've searched around and can't seem to
> find any references to IP_ADD_MEMBERSHIP and how to use it. I did perform
an

man 7 ip

It is a socket option you use in the program that does the multicast
communication.

-Andi

2001-12-01 16:20:14

by Andi Kleen

[permalink] [raw]
Subject: Re: Multicast Broadcast

On Fri, Nov 30, 2001 at 04:12:58PM -0500, [email protected] wrote:
> Andi, it appears that JVM doesn't support the ip_mreqn struct that
> would allow us to use imr_ifindex but supports only the older ip_mreq struct
> as the optval. Any other suggestions.

ip_mreqn is the only way I can think off. My suggestion is to fix the JVM
or use JNI.


-Andi