Friday, December 11, 2009

Sharing a Cable Internet Connection without using a Network Switch.

There are two computers at home; one used by my brother (say PC1) and the other by me (say PC2). There's only a single Internet connection, via a cable modem (which was previously connected directly to PC1's network card).

The cable company registered the MAC address of PC1 into their database, so any other computer or network card may not be used with the connection, without first talking to them.
 I wanted to share the Internet connection between the two computers using the cheapest possible method. I put a second network card in PC1 and connected PC1 and PC2 with a simple crossover network cable. Then, I gave an IP of 192.168.1.1 to PC1's second network card and 102.168.1.2 to PC2's network card.

The network connection status on both computers showed as connected. After checking the connectivity, using the ping command, I started the 'Network Connection Wizard' from the network connections (in the control panel), on both computers. On PC1, I enabled the first option in the wizard because PC1 was directly connected to the Internet. On PC2, I enabled the second option because it would connect through PC1.


Sharing the Internet connection is very simple in Windows XP. Without putting any proxy settings or changing any other settings, I was able to browse the Internet and use all other Internet services that I needed, without any problems, on PC2.

 A problem occurred, when PC1 was switched off and I still wanted Internet access on PC2. A simple solution to this was to extend and connect the cable modem's network cable, directly to PC2, when needed. This would be a hassle every day, sometimes more than once. This also needed me to change the MAC address of PC2's network card. So, I thought of something that wouldn't need me to buy a network switch with eight ports (which is expensive for use with just two computers).

I did a little trick. Actually, not a trick, but Windows has this as an option for each network card. First, I changed the MAC address of PC2's network card to be the same as of PC1's first network card (which connects to the cable modem). I used the free little program called "MACAddressChanger" to do this. Then, I opened the network card's properties and removed the 192.168.1.2 IP that I gave it earlier. I then set the IP and DNS to auto configure. I set the 192.168.1.2 IP on the alternate configuration tab.

Now, when PC1 was switched off, I would just connect the cable to the modem's network port. And, when PC1 would be on, I would switch it back to PC1's second network card. PC2 would always detect what IP it had to use. I could use a four-pole, two way switch to switch the connection easily, but this method is okay and still easier than connecting the cable from the modem to PC2 and changing the configuration settings every time.

No comments:

Post a Comment