[Ilugc] help in ad-hoc networks setting up

  • From: mohan43u@xxxxxxxxx (MohanR)
  • Date: Wed, 07 Mar 2012 09:37:33 +0530

On Sat, 2012-02-25 at 13:10 +0530, Arun p das wrote:

I tried the following command
                  * iwconfig wlan0 mode ad-hoc

You need to mention name and channel, I use the following command,
# iwconfig eth1 mode ad-hoc essid "dark" channel 1

Here you see 'eth1' instead of 'wlan0' because I use broadcom's
proprietary driver called 'broadcom-sta' instead of 'b43' family. This
will create an access point called "dark" (set a good name please). If
no error occurs, then I need to connect to this access-point with the
same command I used to create the ad-hoc network, like below,

# iwconfig eth1 mode ad-hoc essid "dark" channel 1

If everything is ok, then I will see essid as "dark" in iwconfig output,

# iwconfig
eth1      IEEE 802.11abg  ESSID:"Dark"  
          Mode:Ad-Hoc  Frequency:2.412 GHz  Cell: BE:33:20:D7:30:A4   
          Tx-Power=200 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on
#

At this point, I'm connected at link-level, I need to configure this
eth1 in tcp-level to properly use the device, like below

# ifconfig eth1 up
# ifconfig eth1 192.168.2.1 255.255.255.0

On another laptop which I want to connect, I need to do the following,
to establish peer-to-peer connection

# iwconfig wlan0 mode ad-hoc essid "Dark" channel 1
# ifconfig wlan0 up
# ifconfig wlan0 192.168.2.2 255.255.255.0

Thats it, both laptops can talk to each other. One point is, I don't use
any WAP encription here. So, the ad-hoc network which I established is
free to all, anyone can connect without password.


Other related posts: