My Server and Client softwares run both on Linux.
The Server broadcasts multicast, the Client listens multicast.

My Client has to migrate to another site,
and unfortunately multicast is not allowed between the two sites :-(

How to convey multicast between the two sites?
- Through TCP or UDP?
- What tools do you recommend?
- What about latency?

I received an good answer about Cisco configuration (GRE),
but one of the network teams do not want to monitor/maintain it,
=> when transmission will break, support team will spend too many hours to understand and repair.
=> So, what should be the best alternative to GRE?

Is there a solution based on Linux kernel features
or on network card capabilities? (low latency is important)
Usage examples are appreciated :-)

multicast channel:

Related questions

migrated from stackoverflow.com Feb 9 '12 at 18:59

This question came from our site for professional and enthusiast programmers.

  • 1
    I'm no expert, but I believe Cisco routers for instance allow you to tunnel multicast between two sites. Thinking you may have better answers on super user forum though. Here's a link to something like what I was thinking Cisco – Mark Smith Feb 8 '12 at 18:07
  • 1
    You should take a look at this Cisco document which gives a pretty clear explanation and configuration settings for Cisco routers. Even if your hardware is not Cisco it may provide you with enough information to configure your hardware. – Ex Umbris Feb 8 '12 at 18:41
  • Thanks @JimGarrison I am going to check with my site network team. But I am afraid other network teams will not be happy with this configuration. If someone change a router, or update a configuration router, my transmission may be broken... And we may spend some hours before to understand what happens. My transmission has not to be broken for more than some tiny minutes... – olibre Feb 9 '12 at 9:33

I am not sure to understand your graphic in your question, but as far as I understood, you need to forward multicast packet through TCP ? A tool oriented solution may involve socat:

For instance, multicast channel is

On the Server host (IP=SS.SS.SS.SS):

$socat -v UDP4-RECVFROM:6666,ip-add-membership=,fork TCP:destination.hostname:4444

On the Client host (IP=CC.CC.CC.CC):

$socat -v TCP-LISTEN:4444,fork UDP4-DATAGRAM:,range=SS.SS.SS.SS/24

I let you check how to tune parameters with the socat manual. It is quite straightforward once you know you MULTICAST GROUP and your network interface's ip adresses. :-)

  • Out of curiosity, this solution appears to open a UDP port to listen as well as a TCP connection to forward to another host. This would imply the solution would most likely be a 2 part solution, this as well as firewall modifications to allow the TCP traffic into the network to hit the socat host. I would imagine this setup would be hard to get an IT group to agree to. – Mark Smith Feb 9 '12 at 13:17

Some routers will allow for multicast traffic to be tunnelled across IP network links. Both ends of the tunnel will have to be configured accordingly. Cisco in particular supports tunneling multicast traffic over GRE links. Here's an in article about how to achieve that Cisco

  • One of the network teams does not want specific configuration for their Cisco routers :-( Therefore we have to find an alternative as efficient as GRE. For instance using network card capabilities or linux kernel features... Do you have other ideas? – olibre Feb 15 '12 at 9:49

It is possible, but using a stream protocol like TCP is not a good idea for reasons that multiple congestion implementations (once from TCP and another time from programs attempting utilizing UDP in a smart fashion)[1].

The possibilities you have are tunneled solutions e.g. OpenVPN+TAP (with UDP transport), or GRE, or even things like L2TP. [I wonder if IPIP/IP6IP6 tunneling would work as well.]

  • Hey, this a wonderful idea :-D Thank you very much for your advice about UDP :-) Please can you tell more about OpenVPN+TAP and L2TP. I think my networks will use IP4 for a while... So I suppose IPIP/IP6IP6 is not usable in my case! See you. Cheers – olibre Feb 9 '12 at 16:36
  • Please describe a bit more your answer. I appreciate usage/examples... You can for instance reuse data from question (IP1, IP3...). Is IPIP/IP6IP6 reserved for full IP6 networks? – olibre Feb 10 '12 at 9:39
  • Hi @jørgensen. Please provide more details. I want to give a bounty for someone who explain with details the best alternative of router configuration (GRE). Thank you ;-) – olibre Feb 13 '12 at 17:19

Linux kernel oriented solution:

mrouted is a deamon which get any multicast packets and tells the kernel where to forward them. You will need to recompile your linux kernel with a specific patch and the right options. Then configure the mrouted daemon. Get more details in the Linux-Mrouted-MiniHOWTO.html .

A good reference is the multicast howto, good reading.

Hope it helps.

  • Really interesting :-) Do you know whether that feature is already enabled on Red Hat 5 or 6? Because my administrator probably will disagree to change Red Hat kernel on production... – olibre Feb 9 '12 at 15:37

Steve Miller has posted good tutorial for your issue. Hope this will help you!

  • Thank you Kevin. However, as I explained in my question, one of the network teams does not want to configure Cisco routers :-( Therefore we have to find an alternative as efficient as GRE. For instance using network card capabilities or linux kernel features... Do you have another idea? – olibre Feb 15 '12 at 9:46

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.