How to use Internet Connection Sharing between two computers

 

:: Requirements ::

 

:: Getting started ::

Okay, this tutorial will require a general knowledge about computers and networking. Any questions, just look on Google or keep reading and it may be explained further down in this tutorial.

Connect the crossover cable to both machines in the ethernet port on the back of them both. Make sure the machine that is going to be the main computer connected to the internet has two ethernet ports on the back and that it should be the better computer of the two.

This is what your network setup should look like:

Now if you are using dialup, you can exclude the modem and the network cable, because that is all one phone line.

We will now call 'Computer 1' the "Gateway" and 'Computer 2' the "Other machine".

On the Gateway, go into control panel.:

Double click on 'Network and Internet Connections' or 'Network Connections'
  
You should have a window like this one:

I have labeled the connection between me and the other computer as 'BEAST' (the computers name) and the Internet Connection as 'INTERNET'. Don't worry if you don't see the little hand on the INTERNET connection, you will soon.

Now, right click on your internet connection and click Properties:
   -------- > 

Click on the 'Advanced' tab on the top of the Properties window:

Select the options that I have chosen above. If you have Windows XP it will look like that above. If not, it may look slightly different.
If you are using windows firewall, do the following.
Click on the settings... button. Click the Advanced tab. Then select the network connection between your computer and the other computer. Then click the Settings... button to the right:

In the new window (to the right in the picture above) check the DHCP boxes and leaves the DNS box blank. Then goto the ICMP tab and tick off every box there then click the OK button on bottom.
If you are using a firewall other than windows firewall, adjust it to allow all connections coming from the other computer. You will learn that computers IP address in a few minutes.

On your other computer, goto command prompt. You can go there by clicking Start -> Run and depending on the Windows version, type in 'cmd' without the quotes, if that doesn't work, type in 'command.com' without the quotes. Once it is open, type the following command 'ipconfig /all' if that doesn't work type 'ipconfig'

It will say it's network IP address.
Example:
IP Address . . . . 192.168.0.2

You should change it so that it won't change and cause problems in the future. Goto the Network Connections window. Rightclick the Network between you and the Gateway's computer and click Properties:

Click on 'Internet Protocol (TCP/IP)' and click the Properties button below:

Select the items I have above. Instead of 192.168.0.1 being the 'Other Computer's IP Address, set it to
192.168.0.2 and set the subnet mask to 255.255.255.0 and set the gateway as 192.168.0.1
(I took this screenshot on the Gateway's computer) Then click OK.

Now, go on the Gateway computer and set it to have the exact same options as the picture above
IP address 192.168.0.1
Subnet mask 255.255.255.0
Default gateway -LEAVE BLANK

Now, for the Gateway computer, leave the DNS alone because it is already automatically assigned one from your ISP, but as for the Other Computer, you need to set a DNS server. I found out my ISP's DNS server by watching traffic through my internet connection as it looked up host names and I caught the DNS server's IP address and name. You may be able to find it on your ISP's (Internet Service Provider) website. Or you can simply call them and ask for the DNS server IP address and its name.

Once you have the DNS Server's IP address and name, set it in the TCP/IP Settings window as stated 2 paragraphs above.

For further reliability on the connection between the two machines, you may want to do the following.
On the Gateway machine, open your window browser (explorer.exe) and goto the following location.;
C:\WINDOWS\system32\drivers\etc
If you are using Windows 2000, it will be;
C:\WINNT\system32\drivers\etc

Once in that folder, right click on the file called 'lmhosts.sam'
Open it with Notepad. On the bottom of the document, add the 'Other Computer's Network IP Address
192.168.0.2
Then save the file.

Do the same thing on the Other Computer but add 192.168.0.1 instead.

By doing this above,you are allowing the two computers to fileshare with a better chance or working.

The Internet Connection Sharing should work full-proof now. If you have any problems you may contact me or take a look on Google for 'Setup Internet Connection Sharing'.

 

:: Contact ::

If you wish to contact me regarding this tutorial or anything revolving around this topic or even if you request a few changes made to this tutorial such as adding some more screenshots or suggestions, you can contact me below:
My primary email address is sniperxpx [at] gmail.com
Replace the '[at]' with '@' Spam reasons

Written by SniperXPX on March 22nd 2007
Aloud to be republished at authors discretion. Copyright 2007+

www.sniperxpx.com