Personal tools
You are here: Home Team Members Charles Amey Configuring an Ad-Hoc wireless network

Configuring an Ad-Hoc wireless network

by Charles Amey last modified Jun 01, 2010 03:54 PM
— filed under: ,

You've got two computers, both with wireless network cards, and you want to network them. This assumes that both computers have good wireless cards that work with linux. It also assumes that you aren't using stuff like ndiswrapper to make the cards work.

Here is the Ad-Hoc network we are going to set up:
  1. The SSID is turret
  2. Two computers, called A and B
  3. We are going to use static ip addresses, A's ip is 192.168.0.42 and B's ip is 192.168.0.43

How to Setup an Ad-Hoc wireless network from NetworkManager

  1. Right-click the NetworkManager icon
  2. Select "Edit Connections"
  3. Click on the "Wireless" tab
  4. Click on "Add"
  5. In the connection name box, type in "Turret adhoc".  You can call it anything you want
  6. Turret Ad-Hoc connection
  7. The connect automatically option is selected.  You can uncheck it if you want.
  8. Under the wireless tab, type the word turret in the SSID box.  Substitute turret for whatever you want to name your network.
  9. SSID: turret
  10. Under the mode drop-down, select Ad-Hoc
  11. Ad-Hoc
  12. For simplicity's sake, don't set anything under the "Wireless Security" tab.  You can always go back once the connection is working and make it more secure
  13. Click on the "IPV4 Settings" tab
  14. Select "Manual" from the Method drop-down box
  15. Manual
  16. Click on the "Add" button to add in a new Address
  17. Type in the following in each column:  You can always substitue your own ip addresses, but see the note at the bottom first. 
  18. address:  192.168.0.42
    netmask:  255.255.255.0
    gateway: 192.168.0.1
  19. Click apply at the bottom
  20. Click on the NetworkManager icon and look to see if your newly created network is there. If it is, click on it to connect.  If it is not, click on the "Connect to Hidden Wireless Network".  Then select it from the drop-down box and click ok.

The first computer is now complete.  Follow these steps and do the same thing with the exception of step 13.  You'll need to use a different ip address.

address:  192.168.0.43
netmask:  255.255.255.0
gateway:  192.168.0.1

 *The Ad-Hoc network needs ip addresses that are on the same subnet.  

Troubleshooting

How to test

To test connectivity between the two systems

  1. From A, launch a terminal window and type
  2. ping -c 4 192.168.0.43
  3. You should see something like
  4. PING 192.168.0.43 (192.168.0.43) 56(84) bytes of data.
    64 bytes from 192.168.0.43: icmp_seq=1 ttl=64 time=5.90 ms
    64 bytes from 192.168.0.43: icmp_seq=1 ttl=64 time=5.90 ms
    64 bytes from 192.168.0.43: icmp_seq=1 ttl=64 time=5.90 ms
    64 bytes from 192.168.0.43: icmp_seq=1 ttl=64 time=5.90 ms
  5. From B, launch a terminal and type
  6. ping -c 4 192.168.0.42
  7. You should see something like:
  8. PING 192.168.0.43 (192.168.0.43) 56(84) bytes of data.
    64 bytes from 192.168.0.43: icmp_seq=1 ttl=64 time=5.90 ms
    64 bytes from 192.168.0.43: icmp_seq=1 ttl=64 time=5.90 ms
    64 bytes from 192.168.0.43: icmp_seq=1 ttl=64 time=5.90 ms
    64 bytes from 192.168.0.43: icmp_seq=1 ttl=64 time=5.90 ms

Disclaimer

We test this stuff on our own machines, really we do. But you may run into problems, if you do, come to #fedora on irc.freenode.net

Document Actions
Log in


Forgot your password?
New user?