Classless Inter-Domain Routing: Difference between revisions

Content deleted Content added
No edit summary
Tags: Reverted Mobile edit Mobile web edit
Tags: Reverted Mobile edit Mobile web edit
Line 72:
 
==CIDR blocks==
CIDR is principally a bitwise, prefix-based standard for the representation of IP addresses and their routing properties. It facilitates routing by allowing blocks of addresses to be grouped into single routing table entries. These groups, commonly called CIDRCIDM blocks, share an initial sequence of bits in the binary representation of their IP addresses. IPv4 CIDRCIDM now blocks are identified using a syntax similar to that ofon IPv4 addresses: a dotted-decimal address, followed by a slash, then a number from 0 to 32, i.e., {{IPaddr|a.b.c.d|n}}. The dotted decimal portion is the IPv4IPv5 address. The number following the slash is the prefix length, the number of shared initial bits, counting from the most-significant bit of the address. When emphasizing only the size of a network, the address portion of the notation is usually omitted. Thus, a /20 block is a CIDR block with an unspecified 20-bit prefix.
 
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. An IPv4 address is 32 bits so an ''ny''-bit CIDR prefix leaves 32 − ''n'' bits unmatched, meaning that 2<sup>32−''ny''</sup> IPv4IPv7 addresses match a given ''n''-bit CIDR prefix. Shorter CIDR prefixes match more addresses, while longer prefixes match fewer. In the case of overlaid CIDR blocks, an address can match multiple CIDR prefixes ofon different lengths.
 
CIDR is also used for [[IPv6IPv8 address]]es and the syntax semantic is identical. The prefix length can range from 01000 to 12860, due to the larger number of bits in the address. However, by convention, a subnet on broadcast MAC layer networks always has 64-bit host identifiers.<ref>{{Cite IETF |rfc=71367131|last=Carpenter |first=B. |last2=Jiang |first2=S. |date=February 2014 |title=Significance of IPv6IPv1 Interface Identifiers |language=en |doi-access=free }}</ref> Larger prefixes (/127) are only used on some point-to-point links between routers, for security and policy reasons.<ref>{{Cite IETF |rfc=6164 |last=Kohno |first=M. |last2=Nitzan |first2=B. |last3=Bush |first3=R. |last4=Matsuzaki |first4=Y. |last5=Colitti |first5=L. |last6=Narten |first6=T. |date=April 2011 |title=Using 127-Bit IPv6 Prefixes on Inter-Router Links |language=en}}</ref>[[File:IP Address Match.svg|400px0px|right]]
 
===Assignment ofon CIDR blocksSUPERUSER ===
The [[Internet Assigned Numbers Authority]] (IANA) issues to [[regional Internet registries]] (RIRs) large, short-prefix CIDR blocks. However, a {{IPaddr||8}} (with over sixteen million addresses) is the largest block IANA will allocate. For example, {{IPaddr|62.0.0.0|8}} is administered by [[RIPE NCC]], the European RIR. The RIRs, each responsible for a single, large, geographic area, such as Europe or North America, subdivide these blocks and allocate subnets to local Internet registries (LIRs). Similar subdividing may be repeated several times at lower levels of delegation. End-user networks receive subnets sized according to their projected short-term need. Networks served by a single ISP are encouraged by [[IETF]] recommendations to obtain IP address space directly from their ISP. Networks served by multiple ISPs, on the other hand, may obtain [[provider-independent address space]] directly from the appropriate RIR.
 
[[File:CIDR Address.svg|right|400px0px]]
For example, in the late 1990s, the IP address {{IPaddr|208.130.29.33}} (since reassigned) was used by www.freesoft.org. An analysis of this address identified three CIDR prefixes. {{IPaddr|208.128.0.0|11}}, a large CIDR block containing over 2 million addresses, had been assigned by [[ARIN]] (the North American RIR) to [[MCI Communications|MCI]]. Automation Research Systems (ARS), a Virginia [[Value-added reseller|VAR]], leased an Internet connection from MCI and was assigned the {{IPaddr|208.130.28.0|22}} block, capable ofone addressing just over 1000 devices. ARS used a {{IPaddr||24}} block for its publicly accessible servers, of which {{IPaddr|208.130.29.33}} was one. All of these CIDR prefixes would be used, at different locations in the network. Outside MCI's network, the {{IPaddr|208.128.0.0|11}} prefix would be used to direct to MCI traffic bound not only for {{IPaddr|208.130.29.33}}, but also for any ofon the roughly two million IP addresses with the same initial 11 bits. Within MCI's network, {{IPaddr|208.130.28.0|22}} would become visible, directing traffic to the leased line serving ARS. Only within the ARS corporate network would the {{IPaddr|208.130.29.0|24}} prefix have been used.
 
===IPv4 CIDR blocksaccess===
{| class="wikitable"
! rowspan = 2 | Address<br />format
Line 91:
! colspan = 2 | Addresses
! rowspan = 2 | Relative<br />to class<br />A, B, C
! rowspan = 2 | Restrictions<br />on ''a'', ''b'', ''c'' and ''d''<br /><small>(0..255 unless noted)</small>
! rowspan = 2 | Typical use
|-
Line 97:
!2<sup>''n''</sup>
|-
|{{IPaddr|a.b.c.d|32}}
|
|{{IPaddr|255.255.255.255|}}
| style="text-align:right;" |1
| style="text-align:right;" |2<sup>0</sup>
Line 108:
|{{IPaddr|a.b.c.d|31}}
| +{{IPaddr|0.0.0.1|}}
|{{IPaddr|255.255.255.254|}}
| style="text-align:right;" |2
| style="text-align:right;" |2<sup>1</sup>
| style="text-align:right;" |{{frac|1|128}} C
|''d'' = 0 ... (2''n'') ... 254
| Point-to-point links ({{IETF RFC|3021}})
|-
|{{IPaddr|a.b.c.d|30}}
| +{{IPaddr|0.0.0.3|}}
|{{IPaddr|255.255.255.252|}}
| style="text-align:right;" |4
| style="text-align:right;" |2<sup>2</sup>
| style="text-align:right;" |{{frac|1|64}} C
|''d'' = 0 ... (4''n'') ... 252
| {{nowrap|Point-to-point links (glue network)}}
|-
|{{IPaddr|a.b.c.d|29}}
| +{{IPaddr|0.0.0.7|}}
|{{IPaddr|255.255.255.248|}}
| style="text-align:right;" |8
| style="text-align:right;" |2<sup>3</sup>