This question already has an answer here:
This problem comes from Tannanebaum's CN book and the full description of it is as follows:
A large number of consecutive IP addresses are available starting at 184.108.40.206. Suppose that four organizations, A, B, C, and D, request 4000, 2000, 4000, and 8000 addresses, respectively, and in that order. For each of these, give the first IP address assigned, the last IP address assigned, and the mask in the w.x.y.z/s notation.
The answer given is as follows:
To start with, all the requests are rounded up to a power of two. The starting address, ending address, and mask are as follows: A: 220.127.116.11 – 18.104.22.168 written as 22.214.171.124/20 B: 126.96.36.199 – 188.8.131.52 written as 184.108.40.206/21 C: 220.127.116.11 – 18.104.22.168 written as 22.214.171.124/20 D: 126.96.36.199 – 188.8.131.52 written as 184.108.40.206/19
With my understanding of subnetting, this answer doesn't make sense.
If my understanding is correct to find the number of bits for the host log 2 of 2000 = 11 bits for the host. In other words we need to reserve 11 bits in total to identify the host.
The mask would be 11111111.11111111.11111|000.00000 = 255.255.248.0.
The first address is in the case that we leave all of the host bits as 0s:
In that case we get: 220.127.116.11 To find end address all host bits need to be 1s:
198.16.(5 bits reserved)111, 111111111 Then we get: 198.16.10001111.11111111 = 18.104.22.168 Which is a wrong answer.
The right answer is: 22.214.171.124 – 126.96.36.199 written as 188.8.131.52/21.
Where did I go wrong and how is that answer computed?