Internet connection sharing using an Ad Hoc network behind a wireless router.
In this setup I will have my laptop (host computer) with two wireless network card, one connect to the wireless router and has Internet already and the other wireless network card connected to my desktops (client computer) wireless network card. This is setting up an Ad Hoc network.
What you will need:
Host computer with Windows XP SP2 with 2 wireless network cards
Client computer with Windows XP SP2 with 1 wireless network card
The cards must be the same specification 802.11a or 802.11b/g (just make sure they match).
Wireless router
Broadband Internet (cable, DSL)
What I am using:
Laptop (host computer) with Windows XP SP2 with two 802.11b/g wireless network cards
Desktop (client computer) with Windows XP SP2 with one 802.11b/g wireless network card
802.11b/g wireless router
Cable Internet
What you need to know about my setup:
My laptop (host computer) already has Internet from the router using one of the wireless network cards, now I have to get the second wireless card to communicate with the desktop (client) before I setup ICS.
How I did it:
On my laptop (host computer) I went into Control Panel/Network Connection. There I see two wireless adaptor, one is already being use to connect to the router, the second one that is unused is the one I am concern about; I will refer to this as the 2nd wireless card. Right click on the 2nd wireless card and select properties, now click on the Wireless Network tab. Make sure Use Windows to configure my wireless network settings is check. Click the Advanced button at the lower right of this tab. Select the radio button Computer-to-computer (ad hoc) networks only. Make sure the box labeled Automatic connect to non-preferred networks is NOT checked. Click the Close button (once) to return to the Wireless Network tab. Under Preferred Network, remove any preexisting network that the card may have detected, now click on add. I will now have to put in a network name (SSID); I will be using Sharing (case sensitive) as my setup SSID. I will leave my Network Authentication Open and Data Encryption Disable as of now because I dont want to be concern about any problem, I just want to get these computer connected first before I enable any security. Click Ok to get back to the wireless network tab, you should now see your newly added network, there should be a red x on it. Now we will go to the General tab and double click on the TCP/IP and give this wireless adaptor the following IP information (see below).Click Ok to exit and save then Windows should detect that wireless network (its ok, Windows is just detecting itself).
2nd wireless adaptor
IP: 192.168.0.1
Subnet mask: 255.255.255.0
Default gateway: None
DNS: None
Now to configure the client computer:
On my desktop (client computer) I locate the Wireless Networks icon in the system tray. Right-click it and select View Available Wireless Networks. I can now see the wireless network Sharing that I setup from the host computer. I select it and click Change advanced setting, then to the Wireless Networks tab I click on the Advanced button on the bottom right select the same ad hoc configuration as the host computer. I now have to go to the General tab and give this wireless adaptor an IP address also (see below)
Client wireless adaptor
IP: 192.168.0.2
Subnet mask: 255.255.255.0
Default gateway: 192.168.0.1
DNS: 192.168.0.1
Click Ok to save the IP configuration, and then OK to get back to the View Available Wireless Networks. Select the host SSID and check the box that says Allow me to connect to the selected wireless network, even though it is not secure. Click on the Connect button. A confirmation prompt will pop up to tell you that you have established a peer-to-peer connection.
We are still on the desktop (client computer). Go to Control Panel/Network Connection. Select Set up a home or small office network, click next and I selected This computer connects to the Internet through another computer on my network or through a residential gateway because this is the client computer that will connect to the host computer. When it ask to give this computer a description and name, dont worry about it and just click next, when it ask to put the workgroup select the default (MSHOME) or choose your own and click next, when it ask to turn on or off file sharing make sure you turn on file sharing and click next, click next until its done. Select Just finish the Wizard and click finish. Now go and turn off the Windows firewall again because you just enable it. You will have to restart the computer.
When back on open up command prompt and ping 192.168.0.1 to see if I can get a reply, if good I continue on if not I have to figure out whats causing the problem.
Enabling the ICS on the host:
Now Im on the laptop (host computer) network connection, I select Set up a home or small office network click next and I selected This computer connects directly to the Internet. The other computers on my network connect to the Internet through this computer. Because this is the host computer that will share the Internet. Click next; when it lists the network cards, I selected the 1st wireless card because this is the card that is connected to the router for Internet. When it ask to give this computer a description and name, dont worry about it and just click next, when it ask to put the workgroup select the default (MSHOME) or your own and click next, when it ask to turn on or off file sharing make sure you turn on file sharing and click next, click next until its done. Select Just finish the Wizard and click finish. Now go and turn off the Windows firewall again because you just enable it. You will have to restart the computer.
When back on, go into the network connection. You should see a hand under one of the wireless network card, this mean its being shared. You should now have Internet access from the client and file sharing should work.
Technical Issues:
Sometime the client will not automatically connect to the host, thats because of interferences or other network in the area, just make sure you go to View Available Wireless Networks. To see if the ad hoc network is there and click connect if you have to.
Also you want to make sure both are working in the same channel. This is where you will have to check device manager/your wireless adaptor properties.
Optional but recommended:
Make sure you enable some kind of network authentication and data encryption, you should know how to do it by now, just select the wireless adaptor, go to properties, and wireless networks tab and select the preferred ad hoc network and click properties. You need to have matching setting for the host and the client.