Open In App

GATE | Gate IT 2008 | Question 81

Like Article
Like
Save
Share
Report

Host X has IP address 192.168.1.97 and is connected through two routers R1 and R2 to an­other host Y with IP address 192.168.1.80. Router R1 has IP addresses 192.168.1.135 and 192.168.1.110. R2 has IP addresses 192.168.1.67 and 192.168.1.155. The netmask used in the network is 255.255.255.224. 


Given the information above, how many distinct subnets are guaranteed to already exist in the network?
 

(A)

6
 

(B)

3
 

(C)

2
 

(D)

1
 



Answer: (B)

Explanation:

Given IP addresses are of Class C

default Mask for class C = 24

Here given mask is 27 bits ( 11111111 11111111 11111111 11100000)

subnet ID: 3 bits

existing subnets: 011, 010 and 100 

Alternative approach – 
Each link which connects a router-router, or a router-host(s) has a different subnet. In this case, there are 3 subnets, 
 

  1. One connecting Host X to Router R_1
  2. One connecting Router R_1  to Router R_2
  3. One connecting Router R_2  to Host Y


We can also find the number of subnets by couting the number of network prefixes as each network ID corresponds to a subnet. Subnet Mask – 255.255.255.224 or /27. 
In the following table, Network ID only displays bits 24 to 26 since bits 0 to 23 are the same for all subnets. Subnet ID is obtained after AND the IP address with the subnet Mask. 

Therefore option (C) is correct. 
 



Quiz of this Question
Please comment below if you find anything wrong in the above post

Last Updated : 26 Oct, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads