Archive for the ‘Networking’ Category

Creating an Ad-Hoc Network Between Two Open-Suse Installed Computers

November 25, 2009

Hi fellows,

Lately my wireless router broke down and i sent it to be repaired. But the problems started to arise because without a wireless router i wasn’t able to share my Internet connection. So i had it on my mind that i can solve this problem by connecting only one computer directly to the modem and making an ad-hoc connection between the remaining computers and sharing the Internet. So the problem’s first phase was to setup an ad-hoc network, Since all my OS’s are OPENSUSE (I like to pronounce it like “Susie”,because this reminds me my dream girl) , this tutorial will show you how to setup an ad-hoc network between openSUSE installed machines. Then in another tutorial I will teach you how to share Internet connection.

There are 3 ways to do this :

1) Ad-Hoc connection setup with Network Manager. (Probably the easiest)

Do the things on the computer which directly connects to modem :

  • Left click on the Network Manager icon and select Create New Wireless Network
  • Specify an ad-hoc network name. For example: “VEB61”
  • Select security method
  • Click the Create button
  • Right click on the Network Manager icon, select Edit Connections.
  • Select the Wireless tab, select the ad hoc network name and click the edit button.
  • On the Wireless tab set the mode to Ad-hoc
  • Select the Ipv4 Settings tab select the Manual method in the drop down
  • Click the Add button and enter a local IP address, Net mask and Gateway, i.e. 192.168.0.1, 255.255.255.0, and 192.168.0.1 respectively.
  • Leave DNS Servers and Search Domains blank
  • Click Apply
  • Left click on the Network Manager icon and select Connect to Hidden Wireless Network
  • Select ad hoc network name on the connection drop down and click Connect.

 

On the other computers :

  • Left click on the Network Manager icon and select Connect to Hidden Wireless Network
  • TYPE “VEB61” and click connect. (Ad hoc network name created above.)
  • Right click on the Network Manager icon, select Edit Connections.
  • Select the Wireless tab, select the ad hoc network name and click the edit button.
  • On the Wireless tab set the mode to Ad-hoc
  • Select the Ipv4 Settings tab select the Manual method in the drop down
  • Click the Add button and enter a local IP address, Net mask and Gateway, i.e. 192.168.0.1, 255.255.255.0, and 192.168.0.2 respectively.
    • Note: The IP address for every machine must be different
  • Leave DNS Servers and Search Domains blank
  • Click Apply

2) Ad-Hoc connection setup without Network Manager.

 

  • in YaST disable Network Manager (NM)
  • as a root bring down the wireless interface
# ip link set wlan0 down
  • set the domain id and set the ad-hoc mode
# iwconfig wlan0 essid VEB61 mode Ad-Hoc
  • bring up the interface
# ip link set wlan0 up
  • set the IP address manually
# ip link addr add 192.168.102.1/24 dev wlan0
  • Repeat the procedure on all interfaces that should communicate together. Select unique IP address for each interface.

 

2) Ad-Hoc connection setup with Yast.

  • YaST -> Network devices -> Network Card
  • select ifup, click Next
  • select card, Edit
  • select “Static address setup” and fill up the IP address, Next
  • select “Operating Mode” Ad-Hoc and set ESSID to your domain id
  • select authentication, Next, Finish
  • Repeat on all interfaces.