Ip – What range of IP addresses is represented by the CIDR block 172.16.0.0/12

ip

A solution I was given for this question…

*THE CIDR block includes all addresses of the form 1010 1010 0001 **** **** **** **** **** (where * may be 0 or 1). Thus this block represents the IP addresses from 172.16.0.0 to 172.31.255.255. The netid is 1010 1010 0001 and the CIDR block contains 2^20 addresses.*

I fully understand that the CIDR block has 2^20 host ID addresses and that it is in a Class B network. I thought I could simply state that the netid is 172.16 but I am meant to provide it in binary form, however I cannot understand how this translates to 1010 1010 0001.

I understand that 00010000 represents 16 and I understand why there are only 12 bits of the netid but I don't understand where 1010 1010 came from as this represents 170. I would have put 1010 1100 representing 172.

I also don't understand how the block represents the IP addresses from 172.16.0.0 to 172.31.255.255. I have done alot of research on the internet but I can't seem to find anything that will help out.

If anyone could possibly provide an explanation I would really appreciate it.

Best Answer

The answer is incorrect (hey, it happens).

You are right that 172 is 0x10101100. That was a mistake on their part.

The 20 bits of host address, when added to the netid, give you all the addresses from 172.16.0.0 to 172.31.255.255.

Honestly, IMO, they're making it more complicated than it needs to be. I've been doing this a long time and the only time I see things like "netid" is in textbooks.

One more point: Address classes (A,B, C) were replaced by CIDR (The C stands for Classless), so it makes no sense to say it's a class B address. Furthermore all that happened in 1993 (I'm guessing before you were born), so address classes are very much obsolete. Yet, for some reason, they keep teaching it.

Related Topic