Thursday 8 March 2018

networking - Attach third computer to shared internet connection


I have 3 computers, all of which I want on the internet. The first is a laptop, which has a wireless connection and an ethernet connection.
The second is a desktop, with 2 ethernet connections.
The third is a desktop, with 1 ethernet connection.
The laptop gets the internet from the wireless, and shares that on the ethernet connection to the first computer - this works fine. I want to attach the second desktop, so that it can have internet access.


I have tried to implement internet sharing on the first desktop, but it said it could not. I tried to create a bridge, but I was unable to get the internet on the second desktop.


How can I connect the second desktop to the first desktop, and have it accessing the internet?



Answer



Place an ethernet switch on the ethernet link of the laptop


attach both desktops to that switch




since you got no extra hardware ...


internet connection sharing (ICS) remains as it is on the laptop.


find out what ip subnet you are using. -> choose another 2 private nets e.g. 192.168.10.0/24 and 192.168.11.0/24 ... i'll refer to them as XXX.XXX.XXX.XXX and YYY.YYY.YYY.YYY


now configure the ethernet port on the laptop:
IP: XXX.XXX.XXX.1 subnet mask 255.255.255.0


ethernet port 1 on desktop 1 (connect to laptop ethernet)
IP: XXX.XXX.XXX.2
subnet mask 255.255.255.0
default gateway XXX.XXX.XXX.1
primary DNS: 8.8.8.8


ethernet port 2 on desktop 1 (connect to desktop 2 ethernet port 1)
IP: YYY.YYY.YYY.1
subnet mask 255.255.255.0


ethernet port 1 on desktop 2 (connect to desktop 1 ethernet port 2)
IP: YYY.YYY.YYY.2
subnet mask 255.255.255.0
default gateway YYY.YYY.YYY.1
primary DNS 8.8.8.8


now you need to enable the IPRouting on desktop 1 ... for windows XP or 7 that would be a new registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
IPEnableRouter
type dword
value 1


for a linux system ... echo "1" > /proc/sys/net/ipv4/ip_forward


(a windows machine needs a reboot after you enable the IP Router)


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...