Saturday, March 16, 2013

Internet Connection Sharing

Good Afternoon!

This post will be about sharing Internet connection in many different scenarios which can come handy time to time.



Possible Scenarios:

1. Internet from USB based 3G/4G Modem shared over wired Ethernet from a Desktop or Laptop. 


Details:

1. Let's say you have two computers but only one USB internet modem and you want to use internet on both machines. You cant plug one USB modem in two different machines at any given time, here's how you can use the one internet on both systems.


Let's take a look what we need for this project.

1. Ethernet cable (can be CAT5/5E/6),
2. Working Ethernet port on both systems (you need to make sure that both of them have proper driver installed, enabled and working).

Procedure:









So how you are going to do this?


1. Plug your USB modem on your system. Connect to the internet.

2. Go to Network & Sharing Center  ( On the task-bar you can see this icon . Right click & Open Network and Sharing Center)









3. Now click the change adapter settings on the top left.
4.



You will see your existing installed hardware.  Here in my system Ethernet 2 is USB WiMAX modem & Ethernet is GbE and I will be using this Ethernet port to connect to another system.

5. Now right click on the Ethernet 2 (or the one you want to share) click properties. Then select Sharing Tab.
6. Check both of them & click OK.
7. You can control services from "Settings".



8. After clicking OK,IP will be automatically assigned to your other network Adapter ( the one through you are going to share)
Ethernet > Properties > IPv4



As you can see 192.168.137.1 has automatically been assigned.

9. Now get to your other machine & open up network & sharing center. Go to change adapter settings. Then go to the properties of your adapter that you are going to use. Set IPv4 & IPv6 to auto.


that means check the radio buttons "Obtain an IP address automatically" & "Obtain DNS server address automatically". Press OK.

10.  Now connect the cable & You are done!


2. [][]

Next let's say you have a phone that has 3G/4G connectivity but you need to use the same internet in any other phone, how can you do that? Well that's pretty simple too.

For this you won't actually need anything more then just two phones.

So assume you have a phone with internet connectivity via 3G/4G, in this case it's 3G.


So here it can be seen that this phone is connected to a HSDPA network, now I want to share this internet via WiFi. First I will get to the settings.



Next stop the More options.

Next I'm gonna go to Tethering.


As I was saying that I will be using WiFi so all I have to do is set up Wi-Fi hotspot, which is maybe give a proper name and password then just start the hotspot. 


Here you can see the security type and password is given to this SSID and in this particular phone when no device is connected it will automatically turn off the Wi-Fi hotspot so save battery, by default its 8 minutes. So after launching the hotspot you can see it in any other device.


Here the hotspot is being discovered by the other device. 


Like connecting to any other Wi-Fi router all I needed to do is to type in the password and as you can see it is connected and internet using is possible. 



Let's share some more internet!

Now let's say you have an internet connection, a broadband one via an Ethernet cat 5/5e/6 cable with RJ45 port and you have maybe a laptop or a desktop with a WiFi adapter and maybe a phone. You want to use internet in all of them at the same time but don't wanna get a router or you will just use for short time. Yes it can be done.

So like I was saying you will need an internet connection and at-least a wireless adapter, could be an USB dongle or could be the built-in WiFi of a laptop or desktop.

Now first thing's first you gonna have to make sure that hosted network feature is supported. For this you have to type in the following command in command prompt.

netsh wlan show drivers

Here we can see that hosted network is supported, if you find a No in here, make sure to install proper driver for your wireless dongle or adapter.  

Next stop will be starting an ad-hoc wireless network. To do so you have to type in


netsh wlan set hostednetwork mode=allow ssid=<Enter the network name> key=<Enter the password for this>




In this case you can see I have set it up the SSID as Internet and password is something.

Now you have to start this network, to do so type in the following command and press enter.


netsh wlan start hostednetwork



From My mobile phone I can see that the wireless network is available.



Now, you have to share the wired internet on this ad hoc network. To do so go to "Network and Sharing center", can be found in control panel. 



From there go to the "Change Adapter Settings" and figure out which one is your internet connection, for me it is the Ethernet 2. Now you have to share it over the ad-hoc network that was created. To do so you have to go to the "Properties" of Ethernet 2 and get into the "Sharing" tab. From there share it over the Local Area Connection*6(or whatever you have, look for microsoft hosted network).


After pressing okay you should see the network is shared.



Now connect your phone or tab or whatever you want to connect to and see if internet is on!




 And internet is available!


Although I have found something quite interesting here, the speed which I'm getting via this is actually slightly lower than directly connecting it to the router. Well I wasn't really expecting to saturate this, I have a slow internet connection so was expecting full speed, and the Wireless network is an Intel AC one so it should have performed better I guess. Maybe windows is the culprit here! Who knows.


The blue ones are the results when connecting the phone directly to the router and the red ones are via this method. Anyway If you want to turn it off, simply Turn off the sharing from the adapter settings. Then go to the command prompt and type in


netsh wlan stop hostednetwork


Here we can see it has stopped and also the connection 6 is no longer available.




Hope you have enjoyed the post! Have a nice day!



4 comments:

  1. start writing regularly, it will become a nice blog.
    also from your dashboard, check out the dynamic theme, that one could be nicer to look :)

    ReplyDelete
  2. thanks for the tips!

    will try to write something daily :)

    will check the dynamic themes too

    ReplyDelete
  3. Sir,
    That really was helpful. Well, I want to share the internet in a wifi router (TP-LINK 150mbps). Do I need to configure it? if yes, how (please). For your kind information, I had a broadband connection before and I was using the router as a wifi device. The router was configured in that connection.
    Now, do I need to configure it again?

    ReplyDelete
    Replies
    1. yes. u need to set the WAN settings to Dynamic. and u said its working right?

      Delete