prefix length
The number after the slash in an address such as 192.0.2.42/24, saying how many leading bits identify the network.
In more detail
With /24 the first 24 bits (192.0.2) name the network and the last 8 bits name the host, giving 256 addresses. CIDR, Classless Inter-Domain Routing, is the name for writing addresses this way. Routers pick routes by matching prefixes, preferring the longest match.
Example
ip=192.0.2.42 p=24 net=192.0.2.0 host=42 splits an address at a 24-bit prefix.Related terms
- subnet — A range of IP addresses sharing the same network prefix, such as 192.0.2.0/24, whose members can reach each other without a router.
- netmask — The older dotted way of writing a prefix length, such as 255.255.255.0 for /24, where one bits mark the network part.
- network and host bits — The two halves of an IP address split by its prefix length: the network bits name the subnet and the host bits name one interface within it.
- longest prefix match — The rule that when several routes match a destination, the one with the longest prefix, the most specific, wins.
Taught in
- IP Addresses, Netmasks And Subnets — Linux Fundamentals & Systems Administration
- Interfaces, Routes And The Default Gateway — Linux Fundamentals & Systems Administration