I have two computers connected via LAN network , one of them has internet connection , How can I access the internet from the another computer using the connection in the first one ?
Access internet through another computer
internetlan
Related Solutions
You need to ensure the following:
You need to run NAT (Network address Translation) on Computer A on the WIFI interface - presumably you would use "connection sharing" in Windows.
You would treat your WIFI router as an Access Point + Switch - you want to disable DHCP on it as Computer A would be doing the connection sharing. You would also want to ensure nothing is connected to the WAN port of the WIFI router, and that its LAN port is statically assigned in the address range associated with the WIFI interface on Computer A, but outside the DHCP range.
Set up computer B (and other devices like it) as you regularly would if connecting to a Wireless Access Point.
To summarise, your computer has the following network interfaces:
- "To Internet"
192.168.0.169/24
, Gateway:192.168.0.1
(aka default route)
- "Internal" / "To Control System"
172.17.13.11/24
, Gateway:172.17.13.1
With these connections established, you'll end up with two gateways, and I'm not sure how Windows will handle this... You may find:
- That you intermittently have access to the internal network or to the internet (possibly swapping after a reboot)
- That you only have access to the internal network
- That you only have access to the internet
I'd suggest that your "Internal" network doesn't have a gateway configured, and you instead set up an explicit route so that you can access your "control system" at 172.18.4.4
, via this router. Get a privileged command prompt and type the following:
route -p add 172.18.4.4/32 172.17.13.1
If you need access to other hosts (or to the whole subnet, possibly 172.18.4.0/24
), then either run the command again for each host, or run the following for access to the full /24
subnet:
route -p add 172.18.4.0/24 172.17.13.1
NOTE: You didn't provide details on the subnet that the 172.18.4.4
host is on, and I've presumed it's a /24
subnet.
Routes can be viewed with:
route print
Routes can be removed with:
route delete 172.18.4.0/24
Best Answer
What OS are both of the computers running? What type of connection is currently providing Internet access to the one computer?
Having not mentioned OS, I'm going to assume Windows. Also, by connection via "LAN" I'm assuming you mean via ethernet, and having both of their ethernet ports filled I'm assuming that the Internet connected one is probably using a wifi connection.
If this is all correct, then you should do the following on the computer WITH Internet access:
Open the Control Panel and go to Network Connections. Depending on your version of Windows, you may need to follow an additional link named "Network Connections" or "Manage Network Connections".
You should now see individual icons for each network connection type your computer supports (probably two: "Local Area Connection" and "Wireless Network Connection")
You want to right click on the method by which the internet connection is available (wireless) and select "Properties".
Within the "Properties" window, go to the "Advanced" tab.
Here, all you need to do is check the box labeled "Allow other network users to connect through this computer's Internet connection".
If there are more than 2 network connections available, there will be a drop-down list to select on which network connection you want to provide Internet access.