PDA

View Full Version : iwconfig equivalent?



pumita
12-01-2008, 07:07 PM
On linux we have iwconfig that allows me to manage network stuff without the need of a GUI

I was wondering if Mac has an equivalent? The reason I ask this is because on my iPod I would like to create an ad-hoc network, which I can't. I suspect the function is somewhere hidden inside.

Is there any command that will allow me to configure my network?

Thanks :)

rman
12-01-2008, 10:17 PM
ifconfig

Dysfunction
12-01-2008, 11:09 PM
ifconfig
yep, same as linux.

pumita
12-02-2008, 07:15 PM
Thanks guys! :)

Hmm... I was under the impression you could not change settings such as SSID and channel using ifconfig...

EDIT: (kinda update): Does anyone know how to create an ad-hoc network from command line... I can't seem to find it on google?


Configuration

1. Switch the card into ad hoc mode

sudo iwconfig eth1 mode ad-hoc

2. Set the channel/frequency that you want to use.

sudo iwconfig eth1 channel 4

3. Add the name (ssid) for the network you want to create/join. Use single quotes if there is a space in the name.

sudo iwconfig eth1 essid 'name'

4. Add a WEP encryption key

sudo iwconfig eth1 key 1234567890

Activation

1. Bring the interface back up

sudo ifconfig eth1 up

2. Start dhclient to get an address

sudo dhclient eth1

3. If you want to do it manually, you will have to make up an IP address.

sudo ifconfig eth1 169.254.34.2

That's what I would do in ubuntu
https://help.ubuntu.com/community/WifiDocs/Adhoc

trist007
03-13-2011, 11:22 PM
Yea only wireless-tools package has iwconfig. You need iwconfig to set ssid, etc. I've been searching. If I find anything I'll let you know.