Too much multicasting in Linux

This is a discussion on Too much multicasting in Linux within the Linux Networking forums, part of the Linux Forums category; Hello everybody. I've run into something that amazes me. I've seen some posts from people who can't ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-06-2004
Juanjo Aparicio Jara
 
Posts: n/a
Default Too much multicasting in Linux

Hello everybody. I've run into something that amazes me.

I've seen some posts from people who can't send/receive datagrams sent
to multicast addresses. I have the opposite problem.

I have a pair of Java classes (hold on, this is not a Java related
question, as you will see...) that do some things with multicast
addresses. One of them is sending some datagram packets to the
multicast address 224.0.1.84, port 4160. The other is listening for
datagram packets sent to the address 224.0.1.85. It listens to port
4160.

Now, see that the latter application has joined the multicast group
224.0.1.85, while the first application has joined no group, it just
sends its data to 224.0.1.84:4160.

I expected the second application NOT to receive the datagrams. But
that's exactly what it does: it is receiving datagrams sent to a
multicast address it's not subscribed to.

I first thought it could be the Java implementation, so I went and
copied a quick multicasting example from the net, in C. The results
are the same.

After some tests, it seems that whenever a UDP socket is created and
it joins ANY multicast group (class D IP address) and that socket is
bound to port A, any datagram sent to any class D IP address and port
A is received by this socket.

Has anybody any idea of what is going on? I can provide source code
if you wish. BTW, linux kernel is 2.4.25. What kernel options would
be useful to know?

I've spent quite a long time (some hours, now) looking for info in the
Internet, but it seems the common problem is the opposite. Moreover,
all tutorials/docs say you MUST join a multicast group before you can
receive udp packets sent to that address.

TIA.

PS: I've had problems with my news reader when posting this message.
You may receive it twice. If so, please accept my apologies for any
inconvenience.

Reply With Quote
  #2 (permalink)  
Old 04-11-2004
Antoine EMERIT
 
Posts: n/a
Default Re: Too much multicasting in Linux

Juanjo Aparicio Jara <bnt@fastpace.org> wrote
news:slrnc75nup.1df.bnt@bitbucket.fastpace.org:

> Has anybody any idea of what is going on? I can provide source code
> if you wish. BTW, linux kernel is 2.4.25. What kernel options would
> be useful to know?


What do you mean by received ? At the application level or at NIC level
(using a network sniffer) ?

For your information, the "registry" process of multicast socket consist
to send IGMP packets when a NIC join or quit a multicast group. But this
information is used by ethernet swith only (in ethernet LAN) to maintain
a list of multicast subscriber and so to optimized paket switching.

(There is also IGMRP to route IGMP between two networks)

A range of ethernet mac address are reserved for multicast address. But
the NIC of your hosts don't maintain a mapping list of <Host ip>-
<multicast group>, and so when a NIC use at least one multicast address,
the NIC start to receive any multicast ethernet packet and so all the
multicast packet are process. But only revelante packets should be route
to the application level.

So, and because your 2 applications are on the same host, if you listen
to a multicast address, even without any IGMP registration process, you
will receive packet send from your host to this multicast address.


Regards

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 11:37 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0