Content deleted Content added
added a concept graphic |
m trying to get size right on image |
||
Line 9:
[[Image:IP_Address_Match.png|400px|right]]
CIDR is principally a [[bitwise]], prefix-based standard for the interpretation of IP addresses. It facilitates [[routing]] by allowing blocks of addresses to be grouped together into single [[routing table]] entries. These groups, commonly called '''CIDR blocks''', are identified using a syntax similar to that of IP addresses: a four-part dotted-decimal address, followed by a slash, then a number from 0 to 32: ''A.B.C.D/N''. The dotted-decimal portion is interpreted, like an IP address, as a 32-bit binary number that has been broken into four 8-bit bytes. The number following the slash is the '''prefix length''', the number of significant bits, counting from the left-hand side of the address. When speaking in abstract terms, the dotted-decimal portion is sometimes omitted, thus a ''/20'' is a CIDR block with
An IP address is part of a CIDR block, and is said to ''match'' the CIDR prefix, if the initial N bits of the address and the CIDR prefix are the same. Thus, understanding CIDR requires that IP address be visualized in [[binary]]. Since the length of an IP address is fixed at 32 bits, an N-bit CIDR prefix leaves <math>32-N</math> bits unmatched, and there are <math>2^{(32-N)}</math> possible combinations of these bits, meaning that <math>2^{(32-N)}</math> IP addresses match a given N-bit CIDR prefix. ''Shorter'' CIDR prefixes match more IP addresses, while ''longer'' CIDR prefixes match fewer. An IP address can match multiple CIDR prefixes of different lengths.
|