in Computer Networks edited by
10,328 views
29 votes
29 votes

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.
in Computer Networks edited by
10.3k views

2 Comments

$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.
33
33
Standard problem

takes 2 minutes to solve
0
0

4 Answers

54 votes
54 votes
Best answer

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.

edited by
by

4 Comments

I had to open GateOverFlow just because they didn't mention this explicitly that they are not Class C networks
0
0
through the nature of net mask
0
0
@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.
3
3
12 votes
12 votes
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
4 votes
4 votes
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
–4 votes
–4 votes
ans d)

3 Comments

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

Related questions