Internet connection sharing behind a router - Techist - Tech Forum

Go Back   Techist - Tech Forum > Internet > Computer Networking and Internet Hardware
Click Here to Login
Reply
 
Thread Tools Display Modes
 
Old 04-16-2008, 10:32 PM   #1 (permalink)
Call me Mak or K
Mod Emeritus
 
KSoD's Avatar
 
Join Date: Sep 2004
Location: C:\
Posts: 35,647
Default Internet connection sharing behind a router

This topic is a repost from a old post from the old forum. Since it seems to be a popluar topic i will repost it.

Some of you may ask why the heck do you need ICS when you already have a router. Probably because they ran out of ports on the router and just wanted to add one more computer without having to buy a switch, instead they can use their preexisting computer as a gateway. Or maybe they don’t want to run a cable through their house, I don’t know and I don’t care but a lot of people seem to want to do this kind of thing anyway.

What you will need:
Windows XP SP2 for the Host computer
Host computer with two network card
Switch or Hub (optional)
Network card for each computer connected.
Crossover cable
Straight Through cable (if using the switch/hub)
A basic home router or wireless router.
Broadband Internet (cable, DSL)

The setup below has a laptop configured to share internet while connected to the router wirelessly.

What I am using:
1) Laptop (the host computer) with Windows XP Pro SP2/ 1 wireless network card and 1 wired network card installed.
2) Desktop (the client computer) with Windows XP Pro SP2/ 1 wired network card installed
3) Crossover cable
4) Wireless Router
5) Cable Internet.

What you want to avoid:
Windows Firewall
Zone Alarm free version or other version.
Norton AV 2005-2006
Any firewall/Security applications turn them off for now.

What you need to know about my setup:
I have the laptop as the host computer; the laptop is already connected to my wireless router through wireless connection and has Internet connection already. I have a wired network card on the laptop that will connect to my desktop PC (the client) with a crossover cable. The desktop PC will connect to the laptop with the crossover cable and access the internet from the laptop wireless connection which will go through the router for internet.

How I did it.
On the laptop (host computer) setting up the IP address first, I left those setting alone on the wireless network card because it’s already fine and has internet connection. I went into the wired network card and set the following IP address and subnet manually on it
Wired network card:
IP: 192.168.0.1
Subnet mask: 255.255.255.0
Default Gateway: None
DNS: None

On the desktop (client computer) I setup the following IP address:
Wired network card:
IP: 192.168.0.2
Subnet mask: 255.255.255.0
Default Gateway: 192.168.0.1
DNS: 192.168.0.1

Now I connect both the PC with the crossover cable and configured the client:

Now I go on the desktop (client computer) network connection, high light the wired network card and on the left I selected “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, don’t worry about it and just click next, when it ask to put the workgroup select the default (MSHOME) 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 it’s 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 I ping 192.168.0.1 to see if I can get a reply from the host. If good then I continue to go and configured the laptop (host computer).

Configuring the host:
Now I’m 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 wireless card because this is the card that is “connected” to the Internet. When it ask to give this computer a description and name, don’t worry about it and just click next, when it ask to put the workgroup select the default (MSHOME) 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 it’s 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 network card, this mean it’s being shared. You should now have Internet access from the client and file sharing should work.

Optional setup, adding more computers (clients):
You will need a switch or hub with three or more ports and straight through cables for every computer that will connect to the switch or hub. Basically connect the host and clients to the switch or hub then configure the clients network card.

Example: Adding 3 more computer (clients)
Second Client IP setup:
IP: 192.168.0.3
Subnet mask: 255.255.255.0
Default Gateway: 192.168.0.1
DNS: 192.168.0.1

Third Client IP setup:
IP: 192.168.0.4
Subnet mask: 255.255.255.0
Default Gateway: 192.168.0.1
DNS: 192.168.0.1

Fourth Client IP setup:
IP: 192.168.0.5
Subnet mask: 255.255.255.0
Default Gateway: 192.168.0.1
DNS: 192.168.0.1

And so on. Then you would run the wizard as the one above “Now I connect both the PC with the crossover cable and configured the client” Just like that.

Future setup, setting up an Ad Hoc:
Later when I have the time, I will try to connect the client to the host wirelessly and have the host connect to the router wirelessly for internet.

Setup will include the host having two wireless adaptors and the client having one wireless adaptor.

Other future setup: Daisy chaining the clients (wirelessly or with wire)

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 desktop’s (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 don’t 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 (it’s 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, don’t 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 it’s 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 what’s causing the problem.

Enabling the ICS on the host:
Now I’m 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, don’t 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 it’s 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 it’s 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, that’s 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.

Adding PlayStation 2 console.

What you need:
Windows XP SP2 with two network cards
PS 2 with network adapter.
Crossover cable
Home router
Broadband Internet

Configure your host computer:
Make sure your host computer has two network cards.
Make sure it already has Internet access on one of the network card.

On the host computer you need to set up the IP address first, leave the setting alone on the network card that is connected to the router because it’s already fine and has internet connection. Go to the 2nd network card and set the following IP address and subnet manually on it. Click Ok to save and exit.

IP: 192.168.0.1
Subnet mask: 255.255.255.0
Default Gateway: None
DNS: None

Wizard setup:
On the host computer go to Control Panel/Network Connection, select “Set up a home or small office network” click next and select “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, select the card that is connected to the router because this is the card that is “connected” to the Internet. When it ask to give this computer a description and name, don’t 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 it’s 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 to Control Panel/Network Connection. You should see a hand under one of the network card, this mean it’s being shared.

Setting up the PS2:
Connect the PS2 to the 2nd network card on the host computer with a cross-over cable. Delete any old network configuration from the memory card. I’ve heard it has cause to many problems if the user doesn’t do so.

Put any name for your ISP setting if it ask:
Select “Yes” if it asks if you subscribe to an ISP:
Select “High Speed Connection:
Select Manual setting:
Select “No” if it asks if your ISP require user ID and password:


MANUAL SETTINGS (Static IP Addressing)
You will have to assign the PS2 with the following IP address:
IP: 192.168.0.2 (or up any of the following up to 192.168.0.254)
Subnet Mask: 255.255.255.0
Default Gateway (router): 192.168.0.1
First DNS: 192.168.0.1
Secondary DNS: ISP DNS server

Save the configuration, it will be added to the memory card.

Technical resolution:
If you’re having any problem, try switching the First DNS address to the ISP DNS server.

Optional setting:
You can have a switch or hub connected to the host computer using straight-through cables. This setup allows you to add more clients. Just connect the PS2 to the switch or hub with a straight through cable.

Tips:
How to tell if the cables are cross-over or straight-through: Hold the end of the cable side by side.

If the color coordination matches: they are straight-through

If the green and orange switch places: they are cross-over

Internet Connection Sharing on Windows 98 Second Edition

What you need to know:
Internet Connection Sharing made its debut in Windows 98 SE; any earlier Windows will not support ICS. That includes Windows 95 and earlier version of Windows 98.

Instead of doing my own guide, I have to link this and give credit to the author (or whoever came up with this guide), because I do not have Windows 98 SE installed on any of my machine to be able to come up with my own setup guide. Therefore if you want to setup your Win98 SE machine to share your current Internet, than the below link will help you get started. Always give credit where it's due! Peace.

Annoyances.org - Setting up Internet Connection Sharing (Windows 98)

Setting up port forwarding with ICS

After you setup ICS and everything is working, you’ll probably want to host certain application on the client computer, like games and p2p applications. Well this guide illustrates the procedures taken to port forward on the host computer running Windows XP.

Before we proceed you will have to gather the following information:
The application ports and protocols: You can find most popular application ports and protocols at PortForward.com - Free Help Setting up Your Router or Firewall.

Google is also vital if the information is not listed at portforward.com

The client computer IP address: If you had follow my guide and setup each client IP manually you should have no problem figuring that out. Go to the client computer, run the command prompt or MS-DOS and type ipconfig

Now that you have the two vital information then you can proceed. In this guide I will use Doom 3 as my example.

I have obtain my 2 vital information
Ports and Protocol: 27666 TCP and 27666 UDP
Client IP address: 192.168.0.5

1) On the host computer running Windows XP, go to Control Panel/Network Connections.

2) You should see at least two network cards, right click on the network card that is connected to the router or modem (the one that gives Internet access to this host computer) and select Properties. Select the Advanced tab; you should see the Internet Connection Sharing section. Click on the Settings… button.

http://members.cox.net/mypeth/Advanced.JPG

3) Now you should see a list of services, click Add…

http://members.cox.net/mypeth/Settings.jpg

4) The service setting appears.

5) Now I enter my information for Doom3, first one I will put Doom3 TCP as my description, I will put 192.168.0.5 as the client computer’s IP that is hosting this service, and I will put 27666 as the External and Internal port and select TCP.

http://members.cox.net/mypeth/doom3tcp.jpg

6) I will repeat step 3 through 4 for the second port and protocol, but this time the description will be doom3 UDP, same IP, same port (in my case) but now I select UDP.

http://members.cox.net/mypeth/doom3udp.jpg

7) The newly added services should be automatically checked and now the port should be forwarded and open for the client.

http://members.cox.net/mypeth/setting2.jpg
__________________

__________________
I do not accept support questions via EMail, PM, IM or my G+ page!

Phone: LG Optimus G Pro
Running: Stock JB from LG with Nova Launcher

KSoD is offline   Reply With Quote
Old 04-16-2008, 10:33 PM   #2 (permalink)
Call me Mak or K
Mod Emeritus
 
KSoD's Avatar
 
Join Date: Sep 2004
Location: C:\
Posts: 35,647
Default Re: Internet connection sharing behind a router

Technical problems and solutions:
When you’re using ICS and you have an application with many ports and protocols, you will have to repeat steps 3 through 6 for every port and protocol that the application need. There is no specifying a range; this makes ICS a hassle to work with.

If you follow my other guide and you’re behind a router, you will probably need to configure your router to port forward the ports to the host computer, which in turn should take that request and port forward to the client.

A little problem I've been hearing about, for those of you who have D-Links router and any router that assigns a LAN address in the 192.168.0.0 network please use a different network other than this for your ICS connection for example:

ISP===Router===192.168.0.0 network===computer1===192.168.50.0 ICS====computer2.

You'll need to use something other than 192.168.0.1 in my guide, like maybe 192.168.50.1 or 192.168.100.1 just so it doesn't conflict with the existing router.

Linksys are known to use 192.168.1.0 network
D-Link are known to use 192.168.0.0 network
Belking are known to use 192.168.2.0 network
Netgear are known to use 192.168.1.0 network
__________________

__________________
I do not accept support questions via EMail, PM, IM or my G+ page!

Phone: LG Optimus G Pro
Running: Stock JB from LG with Nova Launcher

KSoD is offline   Reply With Quote
Old 04-23-2008, 03:03 AM   #3 (permalink)
Newb Techie
 
Join Date: Apr 2008
Posts: 1
Default Re: Internet connection sharing behind a router

Great article!

Some comments:


1. Never use a hub for gaming consoles. These are broadcast devices that you don't want in your network.

2. No need for crossover cables with the new routers. Most of them have auto-detection already.

3. It's not advisable to put the router's IP as the DNS of the client computer. Some routers don't have DNS relay. The actual DNS obtained from the ISP can be used if this doesn't work.

<SNIPPED> No Advertising
santech is offline   Reply With Quote
Old 01-13-2009, 01:26 AM   #4 (permalink)
Newb Techie
 
Join Date: Jan 2009
Posts: 4
Default

I am trying to use a ad hoc through a wired router. I have a desktop computer with a wireless adapter and it also has an ethernet connected to an adsl modem. I tried enabling ICS and it still did not work. i got my laptop to connect, but the laptop had no internet. The laptop does also have a wireless card. Im using windows xp. Any ideas?

When i go to cmd and type ipconfig /all, it says i have no default gateway for the wireless. When i try to release and renew my ip, the ethernet renews and the wireless does not. Instead it says "an error has occoured, cannot contact DHCP server. Request Timed out". Any ideas?

thanks,
chris.

wait sorry--forget the router. My desktop is directly connected to the adsl modem. The desktop has a wireless card. The laptop is the client and the desktop is the host.
any ideas?

chris.
computerchris785 is offline   Reply With Quote
Old 02-16-2011, 11:33 PM   #5 (permalink)
Newb Techie
 
Join Date: Feb 2011
Posts: 1
Default Re: Internet connection sharing behind a router

Brilliant response thanks, Mak213

This got me going when nothing else did, and of course the Microsoft help material was no use at all!
My configuration was to connect the desktop (client computer) running XP via a LAN cable to the laptop (host) running Windows 7. The laptop was connected to the wireless router for the internet connection.

I was getting IP address conflicts with my ICS connection, and some very strange IP addresses appearing on the client given to it by the host (visible through "status" when right clicking on the network connection), which meant that the client was not getting the internet.

I believe I had two things wrong - I had set all three connections to "obtain IP address automatically" as recommended by Microsoft, and secondly when I tried manually setting the IP addresses I was trying to use addresses for my client which as you mentioned in your post, conflicted with the router's address.

My router is 192.168.1.1. So for the link between the client and host I needed to use 192.168.0.1 instead. This will be different for other people and if their router is 192.168.1.0 they would need to use 192.168.1.1 for the link between the client and host.

So, on the host: properties of the Local Area Connection Internet Protocol TCP/IPv4 (and in my case not the wireless card) needed to be set as follows:-
Use the following IP address:
IP address: 192.168.0.1
Subnet mask: 255.255.255.0
Default gateway: none
DNS none.

Obviously the host's internet connection (in this case the wireless card) properties need to be set to allow ICS sharing.

On the host: properties of the Local Area Connection Internet Protocol TCP/IP needed to be set as follows:-
Use the following IP address:
IP address: 192.168.0.2
Subnet mask: 255.255.255.0
Default gateway: 192.168.0.1
DNS 192.168.0.1

I used an ordinary patch cable between client and host - I did not need to use a crossover cable.

And I did not need to set up any new internet connections or network.
jorgon is offline   Reply With Quote
Old 01-10-2013, 04:30 AM   #6 (permalink)
Newb Techie
 
Join Date: Jan 2013
Location: Philippines
Posts: 22
Default Re: Internet connection sharing behind a router

thanks for this great info.
it worked!
mrmtsuruya is offline   Reply With Quote
Old 12-06-2013, 02:41 PM   #7 (permalink)
Newb Techie
 
JBoss45's Avatar
 
Join Date: Dec 2013
Location: Iowa
Posts: 4
Default Re: Internet connection sharing behind a router

I know that Windows 7 is a bit different, but the workgroup is similar. Will Windows 7 Pro work the same way?
JBoss45 is offline   Reply With Quote
Old 03-01-2016, 11:17 AM   #8 (permalink)
Newb Techie
 
Join Date: Feb 2016
Location: NW GA
Posts: 12
Default Re: Internet connection sharing behind a router

This information is no longer relevant, as Msoft is dropping XP. Please remove sticky from thread.
crplhood is offline   Reply With Quote
Old 03-01-2016, 11:32 AM   #9 (permalink)
Lady Techie
 
Yami's Avatar
 
Join Date: Dec 2008
Location: UK
Posts: 7,765
Default Re: Internet connection sharing behind a router

Quote:
Originally Posted by crplhood View Post
This information is no longer relevant, as Msoft is dropping XP. Please remove sticky from thread.
Good point, I agree.
__________________

__________________
Desktop i5-4440 - ASRock Z77 Extreme4 - EVGA GTX970 - 4x4GB 1600MHz - Samsung 850 EVO 250GB - Be Silent Base 800 - 3TB+1TB+1TB+640GB
Laptop i7-3740QM @ 2.7GHz, 2x4GB 1600Mhz, GT640M, OCZ Agility 3 120GB
Smartphone Galaxy S7 Edge

LinkedIn Kiera Mitchell
Yami is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sharing Internet Connection Via Computers? akasixcon Computer Networking and Internet Hardware 12 04-16-2008 11:45 PM
Network Bridging / Internet Connection Sharing in Ubuntu CalcProgrammer1 Linux and Open Source 1 04-13-2008 01:46 AM
Configure XP to share internet connection with wireless router Blizzard596 Computer Networking and Internet Hardware 1 10-14-2007 10:26 AM
Help with internet connection sharing!! philbar71 Computer Networking and Internet Hardware 2 08-06-2007 05:05 PM
problem on internet connection sharing franzeed Computer Networking and Internet Hardware 1 05-10-2007 05:20 PM



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 03:24 PM.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.