CCNA 3.2.b: Network mask
A prefix is simply the network address. A prefix-length is simply a shorthand way to express a network mask using CIDR notation.
- A network mask may also be called a subnet mask or netmask for short
- Let’s read a few of the entries in the routing table and determine their network masks:
- The prefix-length is /0, therefore the network mask is 0.0.0.0.
- You may recognize this as the default route.
- If no other entry in the routing table matches, then the packets will get routed out this default route.
- The prefix-length is zero so it is the shortest prefix-length in the routing table and therefore the last option to be considered as a route.
- The prefix-length is /16, which means the network mask is 255.255.0.0
- This is a summary route for the four 172.16.x.x networks on this device
- Because it's a summary route it doesn't have a routing code or next hop. It's helpful information describing how the routing table is organized.
- The prefix-length is /24 and the network mask is 255.255.255.0
- The prefix-length is /32 and the network mask is 255.255.255.255
- This is the most specific prefix-length possible in IPv4
- Being more specific than the /24 directly above, this route will be preferred for this specific IP address
- Your turn! What are the prefix-lengths below? For extra credit, what are the network masks?