1

What are the components of the IETF's CIDR Prefix Notation called?

172.16.0.0/16 contains two parts:

  • 172.16.0.0
  • /16

In the RFC the entire term 172.16.0.0/16 is defined as the "Prefix Notation" for the network 172.16.0.0 with the subnet mask of 255.255.0.0

  • My (potentially incorrect) understanding is:
  • 172.16.0.0 would be considered the Network Name or Network ID
  • /16 is the CIDR Notation for that network name.

Unfortunately, that definition does not exist within the RFC!

Hoping to get clarification! Writing a paper for my degree and I want to be sure that I define my terms correctly.

6
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer.
    – Ron Maupin
    Commented Dec 25, 2018 at 9:03
  • FYI, I created a two-part answer to the question linked in my answer that explains all IPv4 addressing and subnetting.
    – Ron Maupin
    Commented Jan 22, 2019 at 18:04
  • @RonMaupin Ron apologies for the delay in responding to you. I appreciate your answer from last summer! My only concern is that in 172.16.0.0/16 the address 172.16.0.0 could not be a host address as it is the network address. If I am mistaken in that conclusion then please let me know! Otherwise I very much like your answer and appreciate you taking the time to post it :)
    – Shrout1
    Commented Jan 23, 2019 at 16:19
  • That address is a host address, but not a usable host address because it is the network address. That is all explained in the answer I linked. It could be a network and usable host address for a /31 network, and that is also explained in the answer. I incorporated answers to a lot of different questions we get here into that one answer, which is why it is so large it takes two answers to cover.
    – Ron Maupin
    Commented Jan 23, 2019 at 16:23
  • @RonMaupin Excellent! If you will amend a sentence long version (or so) of that explanation into the answer then I'll totally go ahead and mark it as answered :) Thanks again for taking the time to respond!
    – Shrout1
    Commented Jan 23, 2019 at 16:29

1 Answer 1

3

For your example of 172.16.0.0/16, the 172.16.0.0 is both the IPv4 network address and a host address, but not a usable host address. It could be the network address, and it may be a usable host address with a different mask length (for example, it is a usable host address with a /11 or shorter mask length). It could even be both a network address and a usable host address if the mask length is /31. The /16 tells you the length of the mask (number of consecutive 1 bits), and I call it the mask length (can be called the prefix length, depending on the context).

An IPv4 address is a 32-bit unsigned integer (a binary cardinal number from 00000000000000000000000000000000 to 11111111111111111111111111111111, or 0 to 4294967295 in decimal). Don't read anything into the fact that it is expressed as four decimal octets; that is simply to make it easier for humans to read; network devices deal with the binary number, not the text representation.

A network mask for IPv4 is also a 32-bit unsigned integer, but it consists of consecutive bits set to 1, followed by any other bits set to 0. The mask determines which part of the IP address is the network, and which part is the host number in the network.

If you do a bitwise AND of the IP address and the mask, you will get the network address. You need to do IP math in binary; trying to use decimal will lead to stupid errors.

IPv4 address 172.16.0.0 -> 10101100000100000000000000000000
Mask length 16          -> 11111111111111110000000000000000
Bitwise AND             -> ================================
IPv4 network address    -> 10101100000100000000000000000000

If you have an address and mask, you have everything you need to calculate everything about the IPv4 address. See the question, How do you calculate the prefix, network, subnet, and host numbers? for how to do IP math.


IPv6 addressing works the same way, except that IPv6 addresses are 128 bits instead of the IPv4 32 bits, and all IPv6 addresses in a network are usable host addresses because IPv6 does not have broadcast.

5
  • Ron, thank you! My understanding was always that the very first address in a subnet remained unused as it identified the network. When I went through my CCNA courses (almost a decade ago) it was identified as the "network name" since it was unusable. All subnets had a name and a broadcast address, making those two addresses "un-assignable". I'm wondering if Network Name or Network ID is the appropriate term for that first, unusable IP address.
    – Shrout1
    Commented Jul 14, 2018 at 17:17
  • That is simply the network address. In your CCNA course, you would have needed to know four things: the network address (all zeroes host address), the first usable host address, the last usable host address, and the broadcast address (all ones host address). In IPv4, the network and broadcast addresses cannot be used for hosts, except for /31 or /32 networks. With IPv6, there is no such thing as broadcast, and all addresses in a network can be used as host addresses, including the all zeroes and all ones host addresses.
    – Ron Maupin
    Commented Jul 14, 2018 at 17:24
  • I would call it the prefix length instead of the mask length, but both names will be understood. I just don't think in mask notation anymore, so I guess that name faded away in my brain :) Commented Jul 14, 2018 at 18:47
  • @SanderSteffann, well, when dealing with routing protocols, I would call it the prefix length, but when dealing with a network and hosts, I call it the mask length. I guess I see it as routers exchanging prefixes, but not when I am dealing with an individual network or host address on the network level.
    – Ron Maupin
    Commented Jul 14, 2018 at 18:50
  • @Ron: Makes sense Commented Jul 15, 2018 at 23:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.