Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to connect several Linux computers in wireless ad-hoc multicast : -computer C1 ( -computer C2 ( -computer C3 (

C1 can not reach C3

On computer C1, using Iperf, I am sending UDP multicast packet to

iperf -c -u -l 1316

On computer C3, using Iperf, I am seeking UDP multicast packet to

iperf -s -u -l 1316 -B --interface wlan0

This is a version of Iperf upgraded for multicast.

How should I configure those three computers ? Should I change address ? Use route ? Use Iptables ? Set the card in Repeater Mode ?

What is the simplest technique to do ?

share|improve this question

If two of the computers connect to the third as a common access point, then turn the third computer into the Gateway for the ad-hoc network. For instance if C1 is the computer that C2 and C3 are connected to, then set the IP Address of C1 to and then keep C2 and C3 at what they are.

On C1 setup IPv4 Forwarding

On C2 and C3 set the IP you have set C1 to as the Gateway

If the routing tables on C2 and C3 don't update do route add -net netmask gw iface <wireless interface>

And since you have IP Forwarding enabled, then the packets should redirect to the proper destination.

Disclaimer: Half-asleep when writing this

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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