Overview:
A prefix is simply the network address. A prefix-length is simply a shorthand way to express a network mask using CIDR notation.
Study Notes:
- 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:
- 0.0.0.0/0
- 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.
- 172.16.0.0/16
- 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.
- 172.16.1.0/24
- The prefix-length is /24 and the network mask is 255.255.255.0
- 172.16.1.1/32
- 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?
- 172.16.2.0/24
- 172.16.3.0/24
- 172.16.4.0/28
- 192.168.0.0/16
- 209.165.200.0/24
- 209.165.200.224/30
- 209.165.200.224/32
- 209.165.200.225/32
- 209.165.200.228/30
- 209.165.200.232/30
- 209.165.200.233/32
- 0.0.0.0/0