# GATE | Gate IT 2008 | Question 81

• Last Updated : 26 Oct, 2021

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) 1
(B) 2
(C) 3
(D) 6

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
2. One connecting Router to Router
3. One connecting Router to Host Y

We can also find the number of subnets by counting 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’ing the IP address with the subnet Mask.

Therefore option (C) is correct.

This explanation is provided by Chirag Manwani.

Quiz of this Question

My Personal Notes arrow_drop_up