GATE | GATE CS Mock 2018 | Set 2 | Question 55

Consider the given network implementation scenario. For the given classful NID 199.10.20.0/24, the requirement is to create 13 subnets. With given details, find the range of first and last valid IP in 15th subnet.

(A) 199.10.20.208 to 199.10.20.222
(B) 199.10.20.225 to 199.10.20.238
(C) 199.10.20.193 to 199.10.20.206
(D) Not of these


Answer: (B)

Explanation: Default mask : 255.255.255.0
We are supposed to create 13 subnets, which is not possible becuase subnets can be created only in powers of 2. Subnet leads to wastage of IP, that’s the reason we moved to VLSM.
No of subnets = 2^4 = 16 subnets

means, 4 host bits are borrowed. Which makes subnet mask



11111111.11111111.11111111.11110000
199     .10      .20      .240

Block size = 256-240 = 16
Valid IP per subnet ID = 2^n – 2 , where n = no of host bits left 2^4-2 = 14

First Subnet :
1st IP : 199.10.20.0
1st valid IP : 199.10.20.1
.
.
Last valid IP : 199.10.20.14
Last IP : 199.10.20.15

Likewise,
In 2nd Subnet, 1st IP : 199.10.20.16 and last IP : 199.10.20.31
In 3rd Subnet, 1st IP : 199.10.20.32 and last IP : 199.10.20.47
.
.
In 15th subnet, 1st IP : 199.10.20.224 , 1st Valid IP : 199.10.20.225
Last IP: 199.10.20.239 , Last Valid IP: 199.10.20.238

Answer : Option (b)


Quiz of this Question



My Personal Notes arrow_drop_up


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.