mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Olivier Galibert <olivier.galibert@limsi.fr>
To: "Hack inc." <linux-kernel@vger.kernel.org>
Subject: How is static multicast routing done in practice ?
Date: Thu, 2 Feb 2006 17:12:53 +0100	[thread overview]
Message-ID: <20060202161253.GA10215@m23.limsi.fr> (raw)

I have an application[1] that does sends and recieve over multicast
udp.  Its setup looks like that (note, no IP_MULTICAST_IF call):

4920  socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
4920  fcntl64(3, F_GETFL)               = 0x2 (flags O_RDWR)
4920  fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
4920  setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
4920  bind(3, {sa_family=AF_INET, sin_port=htons(8649), sin_addr=inet_addr("239.2.11.71")}, 16) = 0
4920  ioctl(3, SIOCGIFADDR, 0xbfcc0bd0) = 0
4920  setsockopt(3, SOL_IP, IP_ADD_MEMBERSHIP, "\357\2\vG\300\250Wd", 8) = 0

4920  socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 4
4920  fcntl64(4, F_GETFL)               = 0x2 (flags O_RDWR)
4920  fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0
4920  setsockopt(4, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
4920  bind(4, {sa_family=AF_INET, sin_port=htons(8649), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
4920  listen(4, 5)                      = 0

4920  socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 5
4920  connect(5, {sa_family=AF_INET, sin_port=htons(8649), sin_addr=inet_addr("239.2.11.71")}, 16) = 0
4920  getsockname(5, {sa_family=AF_INET, sin_port=htons(32775), sin_addr=inet_addr("192.168.87.100")}, [16]) = 0
4920  setsockopt(5, SOL_IP, IP_MULTICAST_TTL, "\1", 1) = 0

The box has two ethernet interfaces, eth0 and eth1.  The routes are:

239.2.11.71 dev eth1  scope link 
192.168.87.0/24 dev eth1  proto kernel  scope link  src 192.168.87.100 
192.44.78.0/24 dev eth0  scope link 
169.254.0.0/16 dev eth1  scope link 
224.0.0.0/4 dev eth1 

And the adresses:
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:09:6b:00:dc:8a brd ff:ff:ff:ff:ff:ff
    inet 192.168.87.100/24 brd 192.168.87.255 scope global eth0
    inet6 fe80::209:6bff:fe00:dc8a/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:09:6b:00:dc:8b brd ff:ff:ff:ff:ff:ff
    inet 192.168.87.100/24 scope global eth1
    inet6 fe80::209:6bff:fe00:dc8b/64 scope link 
       valid_lft forever preferred_lft forever
4: sit0: <NOARP> mtu 1480 qdisc noop 
    link/sit 0.0.0.0 brd 0.0.0.0

Yes, same ip on both interfaces, we want it that way.

No mrouted anywhere as far as I know.

Problem is: the multicast udp packets are sent over eth0, not eth1.

How can I debug/fix that?

  OG.

[1] Ganglia daemon

                 reply	other threads:[~2006-02-02 16:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060202161253.GA10215@m23.limsi.fr \
    --to=olivier.galibert@limsi.fr \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®