Who am I?
分类: 信息化
2013-09-10 21:14:33
CIDR notation is a compact representation of an IP address and its associated routing prefix. The notation is constructed from the IP address and the prefix size, the latter being equivalent to the number of leading 1bits in the routing prefix mask. The IP address is expressed according to the standards of IPv4 or IPv6. It is followed by a separator character, the slash ('/') character, and the prefix size expressed as a decimal number.
The address may denote a single, distinct interface address or the beginning address of an entire network. The maximum size of the network is given by the number of addresses that are possible with the remaining, least-significant bits below the prefix. This is often called the host identifier.
For example:
Before CIDR notation, IPv4 networks were represented using dot-decimal notation for both the address and thesubnet mask. Thus, 192.168.100.0/24 would be written as 192.168.100.0/255.255.255.0.
The number of addresses of a subnet defined by the mask or prefix can be calculated as 2address size - prefix size, in which the address size is 128 for IPv6 and 32 for IPv4. For example, in IPv4, a prefix size of /29 gives: 232-29 = 23 = 8 addresses.