192.168.1.X and 192.168.2.X in the same network

rm69

Honorable
Jan 28, 2014
8
0
10,510
There is a network with 2 switches and no routers. The administrator has configured some PCs with 192.168.2.X series and some with 192.168.1.X series. Network mask is 255.255.255.0 - same for all

1. Can 1.X machines ping other 1.X machines? like 192.168.1.2 ping 192.168.1.8 ?

2. 192.168.1.X should not be able to ping 2.X, right?

3. If one PC is 192.168.1.10 and if another machine is 192.168.2.10, then won't the two be having the same host ID effectively? Won't there be a clash? How will the arp table build in a third machine?

4. Will the very act of having 1.X and 2.x series with same mask (255.255.255.0) create errors in the network, considering there are connected to same switch? What kind of problems could arise?
 
Solution
1.- Yes they should be able assuming their own firewalls allow it.

2.- Yes, they won't be able to ping each other unless there's a router or layer 3 switch between them.

3.- No, there won't be any issue since they're on different subnets due to the mask 255.255.255.0, a third machine's ARP table would look something like this:

---------------------------PC1----------------PC2
MAC Address----------A--------------------B
IP Address------------192.168.1.10-----192.168.2.10

4.-The 255.255.255.0 mask is exactly the reason you won't have errors in the network while having them connected to the same switch, the mask is matching their octets to separate them in two networks (192.168.1.x and the next network 192.168.2.x).
1.- Yes they should be able assuming their own firewalls allow it.

2.- Yes, they won't be able to ping each other unless there's a router or layer 3 switch between them.

3.- No, there won't be any issue since they're on different subnets due to the mask 255.255.255.0, a third machine's ARP table would look something like this:

---------------------------PC1----------------PC2
MAC Address----------A--------------------B
IP Address------------192.168.1.10-----192.168.2.10

4.-The 255.255.255.0 mask is exactly the reason you won't have errors in the network while having them connected to the same switch, the mask is matching their octets to separate them in two networks (192.168.1.x and the next network 192.168.2.x).
 
Solution

ShadeTreeTech

Distinguished
Jun 23, 2011
95
0
18,660
1) Yes, two computers can ping each other that are using the same network ID. i.e. 192.168.1.x can ping another 192.168.1.x machine.

2) Correct, 192.168.1.x machines cannot ping 192.168.2.x without a router to "route" the ICMP request across the two separate networks.

3) No, they are using the same host IP(.10), but they are on separate logical networks(192.168.1 and 192.168.2), so no. Think of it as your street address is 123 abc street, and the other host is 123 xyz street. Same number, different street, therefore no conflict.
The devices on the network will build their arp table like they always do. I'm not really following the question.

4) No, there is no conflict. Switches are a layer 2 device. IP addresses are a layer 3 handle. Switches don't know and don't care about IP addresses. They align MAC addresses to ports.

I think you are confused about what IP addresses and subnet masks do. The subnet mask tells the device which part of the IP address you have is the street name, and which is the house you are going to. If you "increase" the subnet mask it allows for more streets, but allows for less house numbers on that street. If you "decrease" the subnet mask you allow for less streets, but you can have more house numbers on that street. Yes, the subnet mask is important, but it is a filter ON the IP address, not a part of it.