Internet Connection Sharing (ICS)

To use one internet connection in two or more computers, we need to share the internet connection on the computer where the internet connection is present using technique called Internet Connection Sharing or ICS. To share an Internet connection – we can use direct LAN cable, Hub/Switch and Wi-Fi (WLAN). To share an Internet connection that is coming from a LAN cable, we must use a switch or hub. The table below represents number of computers, incoming internet connection type and sharing method combination. Most of our sharing methods, direct sharing via LAN won’t work except Type B. Where, Switch/Hub, Wi-Fi will be the method of sharing for Type A, B, C and D.

Type Number of computers Incoming Internet connection type       Sharing method
A two LAN       Switch/Hub, Wi-Fi
B two Dial-up, USB Data card, Smartphone       Direct LAN , Switch/Hub, Wi-Fi
C greater than two LAN       Switch/Hub, Wi-Fi
D greater than two Dial-up, USB Data card, Smartphone       Switch/Hub, Wi-Fi

Note: We are assuming that all of our computers has one Ethernet port.

Share a always on PPPoE/Cable broadband connection that comes from Fast Ethernet (LAN) via Switch/Hub

  1. Configure the modem for always on PPPoE/Cable connection and get connected to the internet.
  2. Plug in the Fast Ethernet cable to any of the port on the Switch/Hub.
  3. Connect all computers via straight LAN cable to the Switch/Hub.
  4. Turn on the Switch/Hub and configure IP addresses of all computers as below
    • PC1: IP-192.168.1.2, Subnet Mask-255.255.255.0, Default Gateway-192.168.1.1
    • PC2: IP-192.168.1.3, Subnet Mask-255.255.255.0, Default Gateway-192.168.1.1
    • PC3: IP-192.168.1.4, Subnet Mask-255.255.255.0, Default Gateway-192.168.1.1
    • And so on…

Note: 192.168.1.1 is the modem/router’s IP address (Default Gateway).

Share internet connection that is connected via Dial-up/USB Data card/Smartphone

Configure these settings on the computer with internet connection – Windows XP/7/8

On Windows XP/7/8:

  1. Get connected to the internet via Dial-up/USB Data card/Smartphone.
  2. On Windows 7/8
    1. Open Control Panel > Network and Sharing Center > Change adapter settings
    2. Open properties of the adapter that have internet connection we want to share > Open Sharing
    3. Check Allow other network users to connect through this computer’s Internet.
    4. Select Home networking connection that we want to share with >press OK.
    5. Press Settings > check services that we need (http/https/ftp etc.) > press OK > OK.
    6. The connection we want to share with will be configured with following IP.
  • IP:                               192.168.137.1
  • Subnet Mask:        255.255.255.0
  1. On Windows XP
    1. Open Control Panel >Network Connections > Open properties of the adapter that have internet connection we want to share > Open Sharing tab > Open Advanced
    2. Check Allow other network users to connect through this computer’s Internet.
    3. Press Settings > check services that we need > press OK > OK.
    4. Back to Network Connections > Open properties of the connection that we want to share with.
    5. Select Internet Protocol (TCP/IP) > Properties > Enter the following details > OK > OK.
  • IP:                               192.168.137.1
  • Subnet Mask:        255.255.255.0
  1. Now, disconnect and re-connect the internet connection.
  2. Open Command prompt > type nslookup and press enter > note the IP address.

Note: The nslookup command will return only the primary DNS address. In case,if the primary DNS is not working we need to get the secondary DNS. Alternative way to get DNS is to use ipconfig/all command. It’s recommended to use a secondary DNS – if available.

On Ubuntu 12.04:

  1. Press ALT+F2 > type Network Connections and enter > Mobile Broadband >select connection to share.
  2. Press Edit > Open IPv4 Settings tab > set Method to Shared to other computers > press Save.

Configure these settings on the computer(s) to be connected to the Internet – Windows XP/7/Ubuntu 12.04

  1. On Windows 7/8
    1. Open Control Panel > Network and Sharing Center > Change adapter settings.
    2. Open properties of the LAN adapter > select Internet Protocol (TCP/IP) > open properties > select Use the following IP address.
  2. On Windows XP
    1. Open Control Panel > Network Connections.
    2. Open properties of the LAN adapter > select Internet Protocol (TCP/IP) > select Use the following IP address.
    3. Enter the following details.
  • IP address:                         192.168.137.2
  • Subnet Mask:                    255.255.255.0
  • Default gateway:             192.168.137.1 (host computer’s IP)
  • Preferred DNS server:   The IP address we got from the host PC by nslookup/ipconfig command.
  1. Press OK > Close.
  2. On Ubuntu 12.04 (Linux)
    1. Press ALT+F2 > type Network Connections and enter > open Wired tab> select the LAN adapter > press Edit…
    2. Open IPv4 Settings tab > Select Method: Manual > Press Add > enter the following details.
  • Address:              192.168.137.2
  • Netmask:            255.255.255.0
  • Gateway:            192.168.137.1 (host computer’s IP)
  • DNS servers:      The IP address we noted early from the host PC by nslookup command.
  1. Press Save… > Close.

Sharing internet connection over Wi-Fi (WLAN)

Configuring the Wi-Fi Hotspot on the host computer

  1. On Windows XP
    1. Open Control Panel > Wireless Network Setup Wizard > Next > Set up a new wireless network.
    2. Next > put a name > select Automatically assign a network key or Manually assign a network key.
    3. Next > Set up a network manually > Finish.
  2. On Windows 7/8
    1. Open Control Panel > Network and Sharing Center > Set up a new connection or network.
    2. Select Set up a wireless ad hoc > Next > Next > put any Name, Security type as needed.
    3. Press Next > Close.
  3. On Ubuntu (Linux)
    1. Press ALT+F2 > type Network Connections and enter > Add > select Wi-Fi > Create…
    2. Enter the Hotspot name in SSID > select Mode: Ad-hoc > go to Wi-Fi Security
    3. Select Security > put a Password if needed.
    4. Go to IPv4 Settings > select Method: Shared to other computers > check Available to all users.
    5. Press Save… > Close.
    6. Go to taskbar > click on network icon > click on Create New Wireless Network…
    7. Select Connection that we previously created on step 1 > Press Create…

Connecting a client computer to the host computer

  1. Turn on Wi-Fi.
  2. On Windows 7/8
    1. Go to task bar > click on network icon > select a Wi-Fi network under Wireless Network Connection.
    2. Click on the Connect button > enter valid login credentials if needed.
  3. On Windows XP
    1. Click on network icon in the status bar > click View Available Wireless Networks.
    2. In Connect to Wireless Network, under Available Networks, click on the wireless network that we want to connect to.
    3. Enter valid login credentials if needed.
  4. On Ubuntu (Linux)
    1. Go to taskbar > click on network icon > click on the wireless network that we want to connect to.
  5. Configure IP address of WLAN adapter if needed (configuration is same as Wired LAN).

 

Note: We need to configure ICS and IP addresses as per our needs.

Leave a Reply

Your email address will not be published. Required fields are marked *