Can these 2 computers with different IP address but same mask communicate with each other or not?
Comp 1: IP: 192.168.0.20, Mask: 255.255.255.0, Gateway: 192.168.0.1 DNS 192.168.0.1
Comp 2: IP: 192.168.1.21, Mask: 255.255.255.0, Gateway:192.168.1.1 DNS: 192.168.0.1
option1:DNS is valid for computer 2 but not for computer 1
option2The computers cannot communicate with each other
option3There is nothing wrong with this configuration
So I read this article http://www.think-like-a-computer.com/2011/03/04/co... and it seems like there is nothing wrong with this cnofiguration based on "Class 3 address" bc they have same mask and both start with 192.168
am i right? but what does the DNS change my answer?
anyone with more IT knowledge can confirm this or not?
- DeMoNsLaYeR575Lv 74 years agoFavorite Answer
wrong... they are on different subnets
the subnet mask says the first 3 numbers describe the network location
so for comp 1 its network is 192.168.0 and its identifier is 20
comp 2 is on network 192.168.1 and its identifier is 21
The class C address is what we are most familiar with. This uses the first 3 numbers to define the network id and the last number to define the host id.
A class C IP address is identified by the first number ranging from 192-223. The range that you will come across the most is 192.168.0.x. Again as an example a computer with an IP address of 192.168.0.23 can communicate with a computer with an IP address of 192.168.0.234 but not with 192.168.1.5. This is because 192.168.0.x and 192.168.1.x are separate networks.
for ease a class A network ALWAYS uses 255.0.0.0 as the mask (the first 3 numbers)
Class B uses 255.255.0.0
Class C uses 255.255.255.0
- 4 years ago
I am the author of the above referenced post and answered him on my website stating that option 3 is correct.
I will explain why I chose this: Firstly the question is actually poorly written because option 2 and 3 can both be correct based on the limited information we have been given - it doesn't tell us the state of any routers. Because of this we must make an assumption: is there a router in this scenario which is configured correctly or not? If the former then option 3 is correct because they can communicate via the router and this is what I based my answer off. If there is no router then option 2 is correct, they cannot communicate. But here, is the caveat, even if there is no router option 3 is still correct - although they wouldn't be able to communicate, they configuration is still correct.
So based on the above option 3 will always be correct in both scenarios, option 2 will only be correct if there is no router between the two machines. Since the question lacks any info about the router we must go with which is the most likely correct answer, which is option 3.