10,328 views

Two computers $C1$ and $C2$ are configured as follows. $C1$ has IP address $203.197.2.53$ and netmask $255.255.128.0$. $C2$ has IP address $203.197.75.201$ and netmask $255.255.192.0$. Which one of the following statements is true?

1. $C1$ and $C2$ both assume they are on the same network
2. $C2$ assumes $C1$ is on same network, but $C1$ assumes $C2$ is on a different network
3. $C1$ assumes $C2$ is on same network, but $C2$ assumes $C1$ is on a different network
4. $C1$ and $C2$ both assume they are on different networks.

$Remark:$
A host knows its own IP address and the subnet mask, when a host wants to send a packet to another host, it checks if the destination host is in the same network, if the destination host is in the same network, Source Host directly sends the packet to it else it sends the packet to the router.
Standard problem

takes 2 minutes to solve

Subnetmask for C1 is $255.255.128.0.$ So, it finds the network ID as:

$203.197.2.53$ AND $255.255.128.0 = 203.197.0.0$
$203.197.75.201$ AND $255.255.128.0 = 203.197.0.0$

Both same.

Bow subnetmask for $C2$ is $255.255.192.0.$ So, the respective network IDs are:

$203.197.2.53$ AND $255.255.192.0 = 203.197.0.0$
$203.197.75.201$ AND $255.255.192.0 = 203.197.64.0$

Both not same. So, option C.

by

I had to open GateOverFlow just because they didn't mention this explicitly that they are not Class C networks
through the nature of net mask
@ritik gupta

Given IP addresses aren’t class C addresses because in a class C network, 24 bits are allocated to network id part. Assuming only 1 subnet(which is minimum), subnet mask is $255.255.255.0$. Given subnet masks are $255.255.128.0$ and $255.255.192.0$. In third byte there is no $255$ so directly we can infer that they aren’t class C addresses.
Subnetmask for C1 is 255.255.128.0. So, we can network ID reserved first 17 bits as it it classless.

Similarly, for C2  255.255.192.0. network ID reserved first 18 bits.

for C1:  203.197.2.53 AND 255.255.128.0 = 203.197.0.0 /17
for C2:  203.197.75.201 AND 255.255.192.0 = 203.197.65.0/18

as C2 has reserved 1 extra bit for subnet ID,

C1 assume the C2 is inside its network.

so,

C1 assumes C2 is on same network, but C2 assumes C1 is on a different network
by
To solve these types of questions, our approach is to be in one network and find network id of both the networks

Suppose you are in A's network. Router will look at subnet of A and bitwise and it with IP address of A and B

He will find that (255.255.128.0)^(203.197.2.53) and (255.255.128.0)^(203.197.75.201) both are yeilding same network id which is 203.197.128.0

so as per A, both are in the same network

Now if you repeat the same thing while standing in B's network, you will realise that B will think that A is in different network.

So the answer is $C1$ assumes $C2$ is on same network, but $C2$ assumes $C1$ is on a different network
by
ans d)

no.. it's (C)
i agree its option c.
Can anyone explain why is it 'c' ?