View Full Version : AirPorts 2, BaseStations yet-to-score

17th August 2004, 03:25 PM
I have recently successfully set up 2 eMacs with freshly installed AirPort cards, but with no UFO basestation. One eMac shares its modem/Internet connection with the other by running NATd to relabel and redirect IP headers involving the AirPort and the modem. All working well, static routes, via Statup scripts, great... (just don't use Apple's GUI for sharing as it blows away your NAT rules. Apple wants you to buy a basestation!).

I would now like to startup each machine's AirPort from these same Startup scripts, instead of from the menu-bar. I know that ifconfig en1 up will do this for me just fine, but I'd like to create or join (as necessary) the same ad-hoc (WEP enabled) network each time I reboot, too.

Anyone know how to do this from the command-line? I have no fear of the shell.


17th August 2004, 03:27 PM
Umm... this isn't a classic question is it? :)

29th August 2004, 05:36 PM
What if you save the network settings in a new location, and tell it to always join that ad-hoc network?

I think you'd want to do something like:
System Preferences -> Network Preferences -> Configure Airport -> Airport Tab -> By default, join: A Specific Network.

Hope this helps...

- Josh

30th August 2004, 10:23 AM
Thanks for the suggestion Josh.
One thing that the GUI does not appear to support well is the "race condition" of either joining an existing (known) network, or creating it (with the known name) if it does not exist (an additional problem I've had is making it "forget" which default network name I wish to join - how?). I think I'll have to do this in AppleScript after all, but I'm quite surprised that I couldn't find out how to do this more simply from the Unix command line.


30th August 2004, 12:49 PM
yeah i see what you're talking about now,
it seems it doesn't let you create a network automatically.
its now the second thing on my list of mac os x quirks! (the first being when you enable internet connection sharing with the firewall on)

good luck, keep me posted if you find anything out!