0

I am connecting two PC's to each other trough an Ethernet cable in order to share files, this is working as intended. If relevant, I am doing it like this.

The problem: The first PC (PC1) is intended to access shared files from PC2 and is connected with an Ethernet cable to internet, and with an another Ethernet cable straight to the PC2. I have two network connections, the first one is called Internet and the second one I call PCConn (which is the PC2).

When the file-sharing connection is disabled internet is available and working, the problem occur once I enable the second connection (called PCConn) in Network Connections which make the computer, PC1, lose internet. It says it is connected to both as intended but I cannot browse internet. PC2 is not connected to internet at all if that is relevant.

As soon as I disable the connection to PC2 internet will start working again.

In order for you to help me I have relevant info from ipconfig -all on PC1 which is connected to the internet and the other computer:

Windows IP Configuration:

PC2:

Ethernet Adapter PCConn:
DHCP Enabled: No
Autoconfiguration Enabled: Yes
IPv4 Address: 192.168.1.21<Preferred>
Subnet mask: 255.255.255.0
Default gateway: 192.168.1.20
5
  • Don't use a subnet already in use for your point-to-point link. Since your home network uses 192.168.1.0/24, use something different for your PC link, like 192.168.2.0/24. And don't set any gateway on the PC link. Commented Jan 10, 2017 at 23:20
  • @user4556274 So you mean that I should change IPv4 Address: 192.168.1.21 to something else as you suggested for the PC2 Network? Could you please explain more in detail, thanks :)
    – Eri.
    Commented Jan 10, 2017 at 23:57
  • @user4556274 And btw, by not using any gateway on the link to the PC2, will that not break the connection?
    – Eri.
    Commented Jan 10, 2017 at 23:58
  • yes. For example, set the addresses as PC1: 192.168.2.21 and PC2: 192.168.2.22. A default gateway specifies how to contact computers which are not on directly attached subnets. Your default gateway should be left as is on the Internet link, and not set on PCConn. By setting a default gateway on PCConn, you are telling the machine that the PCConn link is a way to reach the broader internet--which it is not. Thus you lose internet connectivity because PC1 is attempting to reach (for example) superuser.com on your ethernet link now. Commented Jan 11, 2017 at 9:49
  • @user4556274 Thank your for the explanation!
    – Eri.
    Commented Jan 11, 2017 at 22:50

1 Answer 1

0

You should not be setting a default gateway on the link between the two PCs. Nothing is reachable on that link other than the other PC -- there is no gateway on that network.

5
  • All right, I will try this. So I should basically leave the Default gateway in the IPv4 settings for the Network to the PC2 (PCConn) empty? Change 192.168.1.20 to nothing instead? Will this not break my link?
    – Eri.
    Commented Jan 10, 2017 at 23:54
  • This solved the problem, what do you suggest regarding the claim to change to 192.168.2.21 and PC2: 192.168.2.22 instead of 192.168.1.21 and PC2: 192.168.1.22 - would this make more sense/have any advantages?
    – Eri.
    Commented Jan 11, 2017 at 22:50
  • Since it's a different physical network, it should use different network addresses. Otherwise, things get very complicated. It's much simpler just to use totally different blocks. Commented Jan 12, 2017 at 0:25
  • By "block", I mean a set of contiguous IP addresses. I'm not sure what third computer you're talking about. Commented Jan 12, 2017 at 16:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .