Super User is a question and answer site for computer enthusiasts and power users. 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'm trying to connect one computer to two others in an ad-hoc infrastructure.

[computer 1] ---- [computer 2] ---- [computer 3]

computer 2 is running Linux and has a single NIC wlan0. I want to it to connect to both computer 1 and computer 3 so each computer can talk to the other. No switch is available so it needs to be an ad-hoc setup.

What I was thinking was:

[computer 1]
    wlan0: 192.168.1.1

[computer 2]
    wlan0: 192.168.1.2
    wlan1: 192.168.1.3

[computer 3]
    wlan0: 192.168.1.4

For this exmaple, computer 2 can be the 'access point' for the others.

[computer 2]
iwconfig wlan0 essid adhoc1 mode ad-hoc
iwconfig wlan1 essid adhoc2 mode ad-hoc

The other computers could then connect to computer 2 and I'd have a network.

Is this possible? If so, are there any problems that will arise from doing this?

share|improve this question

Runnning into a similar problem I am about to try spoofing the MAC of the 2nd and 3rd virtual devices so that ifconfig can up them. just an idea. however I doubt it will work since

iw phy0 info

produces a line

HT TX Max spatial streams: 1

my hope is that

max # scan SSID: 4

might be multiple connections.

Edit: spoofing the MAC by doing a

ip link set wlan1 addres xx:xx:xx:xx:xx:xx up

does not work and produces a changed MAC for the virtual device but complains

RTNETLINK answers: No buffer space available

Imo my device is limited, but maybe using a IBSS, mesh, or some other method could work. kernel 3.x opens up a lot more functions with iw to try out. Happy hacking

share|improve this answer

Most WLAN adapters can only be connected to one remote MAC address at a time (and you probably don't have one of the ones that can be connected to multiple addresses; they're quite rare). You'll need a second adapter to make this work.

share|improve this answer
    
What then is the purpose of creating virtual interfaces with iw? – dave Oct 26 '10 at 5:15
    
It's for one of those WLAN adapters that does support multiple addresses. – Ignacio Vazquez-Abrams Oct 26 '10 at 5:36
    
Ah, makes sense. On the off chance I have one of these rare WLAN adapters, how do I test it? Do I have to setup my described network and see if it works or is there a quicker way? – dave Oct 26 '10 at 5:46
    
I'm not really sure; I've never worked with such a device in-depth (I have one, I just haven't done much with it). – Ignacio Vazquez-Abrams Oct 26 '10 at 5:57

You must log in to answer this question.

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