I'm trying to receive on my LInux box multicast frames from hosts on a different subnet. For the experiment, and ONLY for this experiment, i have two machines connected through a network switch:

  • machine A ( runs a simple application having a listening UDP socket (port 10000) joined on a multicast group (ex.;
  • machine B ( sends UDP datagrams (destination port 10000) to multicast group

Running tcpdump on machine A I see packets sent by machine B but packets are not delivered to the application layer. The packets are delivered to the application layer only if machine B is on the same subnet of machine A. Which is the correct way to enable reception of multicast frames from different subnets?

  • First, you should not be using Reserved multicast groups, but use something in the Organization-Local scope ( Second, multicast routing is very different from unicast routing, and a router must be explicitly configured to route multicast between networks. Also, your switch may be using IGMP snooping. – Ron Maupin Aug 2 '18 at 21:10
  • No IGMP snooping or routers are involved in this scenario. If you read carefully my question, the packets enters machine A but they are not forwarded to application layer, also with reverse path filtering diasabled. – MirkoBanchi Aug 3 '18 at 7:41

The router that is routing traffic between the subnets need to support multicast forwarding. IGMP is one such protocol that will allow multicast traffic to be routed between different IP Subnets, and is supported by Linux and most Cisco routers.

  • I don't have any router. Suppose the two machines are connected through a switch. This is only an experiment in order to figure out the reason of this behaviour. I will edit my question to make it clearer. – MirkoBanchi Aug 2 '18 at 20:21
  • Are you able to ping Machine B from Machine A? If yes, there must be a device that is routing packet between the two subnets. Can you post output from netstat -nr and ifconfig -a from both machines? – Abu Zaid Aug 3 '18 at 9:36
  • Obviously no. I’m simply trying to figure out why Linux doesn’t deliver packets to application layer. Again, no other devices are involved in routing. – MirkoBanchi Aug 3 '18 at 12:05

I expect you have multihomed servers. Try adding static route for the remote subnet on each local machine.

on route add -net <eth#>

on route add -net <eth#>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.