Classless Inter-Domain Routing (CIDR)
With the advent of CIDR, the classful restrictions no longer exist.
Address space may be allocated and assigned on bit boundaries,
and routers may use one aggregated route (like 194.145.96.0/20) instead
of advertising 16 class C addresses
[RFC-1518].
addrs | bits | prefix | class | mask |
1 | 0 | /32 | - | 255.255.255.255 |
2 | 1 | /31 | - | 255.255.255.254 |
4 | 2 | /30 | - | 255.255.255.252 |
8 | 3 | /29 | - | 255.255.255.248 |
16 | 4 | /28 | - | 255.255.255.240 |
.. | .. | .. | .. | .. |
512 | 9 | /23 | 2C | 255.255.254.0 |
1K | 10 | /22 | 4C | 255.255.252.0 |
.. | .. | .. | .. | .. |
64K | 16 | /16 | 1B | 255.255.0.0 |
128K | 17 | /15 | 2B | 255.254.0.0 |
256K | 18 | /14 | 4B | 255.252.0.0 |
512K | 19 | /13 | 8B | 255.248.0.0 |
1M | 20 | /12 | 16B | 255.240.0.0 |
2M | 21 | /11 | 32B | 255.224.0.0 |
4M | 22 | /10 | 64B | 255.192.0.0 |
.. | .. | .. | .. | .. |
128M | 27 | /5 | 8A | 248.0.0.0 |
256M | 28 | /4 | 16A | 240.0.0.0 |
512M | 29 | /3 | 32A | 224.0.0.0 |
1024M | 30 | /2 | 64A | 192.0.0.0 |
|
where:
- 'addrs' represents the
number of addresses available; note that the number of addressable hosts
normally is 2 less than this number because the host parts with all
equal bits
(all 0s and all 1s) are reserved.
- 'bits' represents the
size of the allocation/assignment in bits of address space.
- 'prefix' represents the
length of the route prefix covering this address space. This is sometimes
used to indicate the size of an allocation/assignment.
- 'class' represents the
size of the address space in terms of classful network numbers.
- 'mask' represents the
network mask defining the routing prefix in dotted decimal notation.
|
CITS3002 Computer Networks, Lecture 7, The TCP/IP protocol suite, p11, 17th April 2024.
|