4

I need to duplicate an RTP stream over two different (non-reliable) Internet connections.

On the receiver side, I will probably run a custom program that will use a buffer and rebuild the stream before using it.

But I have some trouble in splitting the traffic over the two connections. I did some research and found that maybe tc (part of iproute2) could be what I need.

2

3 Answers 3

2

The Linux kernel version 2.6.35 introduces a new configuration option CONFIG_NETFILTER_XT_TARGET_TEE:

This option adds a "TEE" target with which a packet can be cloned and this clone be rerouted to another nexthop.

Iptables supports the -j TEE target since 1.4.8.

Earlier support was through the xtables addons, which include both kernel modules and userland tools. You may still prefer this option if you prefer to stick with your distribution's kernel and it's too old to have TEE.

There's a tutorial by bjou (written before the feature was included in the official kernel and iptables).

1
  • Webpage with tutorial requires password :(
    – L.R.
    Sep 12, 2013 at 2:39
0

The network protocol stack is designed to limit duplication.

You may be better off tunneling over TCP. Otherwise you will likely need to build your own program to duplicate your output. How unreliable are your connections. Mine are usually well over 99.9% reliable.

3
  • It is a mobility scenario: a mobile user uses two different network providers, so that the same data goes to the receiver in the event that one (or the other) has no signal. I'd avoid TCP if possible. Thanks! Apr 1, 2011 at 15:08
  • @Andrea: I would configure the mobile users system to connect using whichever connection is up. This would eliminate the duplication issue.
    – BillThor
    Apr 1, 2011 at 15:18
  • I need to do evaluation of different strategies, duplication is just one of them. :) Apr 1, 2011 at 15:37
0

Perhaps a packet sniffing package such as scapy can help you. I recently used it to intercept packets and modify their headers. It essentially amounts to creating a new program as BillThor suggested, but I found scapy very easy to use. While this may not be the best package of its kind, maybe something similar will suit your needs.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .