Classless Inter-Domain Routing: Difference between revisions

Content deleted Content added
Refactor somewhat, vavrious improvements
Line 1:
'''Classless Inter-Domain Routing''' ('''CIDR'''), introduced starting in 1993, wasis the alatest refinement to the way traffic was routed betweenway [[Internet Protocol|IP address]]es networksare interpreted. It allowedreplaced increasedthe flexibilityprevious whengeneration dividingof rangesIP ofaddress syntax, [[IPclassful Addressnetwork]]ess. intoIt separateallowed networks,increased andflexibility thuswhen promoteddividing more efficient useranges of increasingly scarce IP addresses. CIDRinto isseparate definednetworks. inIt RFCthereby 1519.promoted:
 
* More efficient use of increasingly scarce [[IPv4]] addresses.
* Greater use of [[hierarchy]] in address assignments (''prefix aggregation''), lowering the overhead of the [[Internet]]-wide [[routing]].
 
==Background==
[[IP address]]es in [[IPv4|Internet Protocol version 4]] are 32 bits long and are separated into two parts: the ''network address'' (which identifies a whole network or subnet), and the ''host address'' (which identifies a particular machine's connection or interface to that network). A [[Subnetwork mask|subnet mask]] is a [[Mask (computing)|bitmask]] which shows where the network address ends and the host address begins.
 
[[IP address]]es in [[IPv4|Internet Protocol version 4]] are 32 bits long and are separated into two parts: the ''network address'' (which identifies a whole network or subnet), and the ''host address'' (which identifies a particular machine's connection or interface to that network). AThis [[Subnetwork mask|subnet mask]]division is aused [[Maskto (computing)|bitmask]]control whichhow showstraffic wherewas therouted network address endsin and theamong host[[Internet addressProtocol|IP]] beginsnetworks.
Historically, the IP address space was divided into three main '[[classful network|classes of network]]', where each class had a fixed network size. Classes A, B and C had 8, 16, and 24 bit network address fields respectively. The class, and hence the length of the subnet mask and the number of hosts on the network, could always be determined from the most significant three bits of the IP address. Without any other way of specifying the length of a subnet mask, [[routing|routing protocols]] necessarily used the class of the IP address specified in route advertisements to determine the size of the routing prefixes to be set up in the [[routing table]]s.
 
Historically, the IP address space was divided into three main '[[classful network|classes of network]]', where each class had a fixed network size. Classes A, B and C had 8, 16, and 24 bit network address fields respectively. The class, and hence the length of the subnet mask and the number of hosts on the network, could always be determined from the most significant three bits of the IP address. Without any other way of specifying the length of a subnet mask, [[routing|routing protocols]] necessarily used the class of the IP address specified in route advertisements to determine the size of the routing prefixes to be set up in the [[routing table]]s.
 
==CIDR and masks==
CIDR uses '''variable length subnet masks''' ('''VLSM''') to allocate IP addresses to subnets according to individual need rather than some general network-wide rule. Thus the network/host division can occur at any bit boundary in the address. Because the normal class distinctions are ignored, the new system was called '''classless routing'''. This led to the original system being called, by back-formation, '''classful routing'''.
 
A [[Subnetwork mask|subnet mask]] is a [[Mask (computing)|bitmask]] which shows where the network address ends and the host address begins. CIDR uses '''variable length subnet masks''' ('''VLSM''') to allocate IP addresses to subnets according to individual need, rather than some general network-wide rule. Thus the network/host division can occur at any bit boundary in the address. BecauseThe theprocess normalcan classbe distinctions[[recursion|recursive]], arewith ignored,a portion of the newaddress systemspace wasbeing calledfurther '''classlessdivided routing'''.into Thiseven ledsmaller toportions, through the originaluse systemof beingmasks called,which bycover back-formation,more '''classful routing'''bits.
 
Because the normal class distinctions are ignored, the new system was called '''classless routing'''. This led to the original system being called, by back-formation, '''classful routing'''.
 
CIDR/VLSM network addresses are now used throughout the public Internet, although they are also used elsewhere, particularly in large private networks. An average desktop LAN user generally does not see them in practice, as their LAN network is usually numbered using special private [[Private IP address|RFC 1918 addresses]].
 
== Prefix aggregation ==
 
Another benefit of CIDR is the possibility of '''routing prefix aggregation'''. For example, sixteen contiguous /24 networks could now be aggregated together, and advertised to the outside world as a single /20 route (if the first 20 bits of their network addresses match). Two contiguous /20s could then be aggregated to a /19, and so forth. This allowed a significant reduction in the number of routes that had to be advertised over the Internet, preventing 'routing table explosion' from overwhelming routers, and stopping the Internet from expanding further.
 
Nowdays, most [[ISP]]s on the public Internet will not route anything smaller than a /19 prefix, effectively preventing small networks from obtaining full public Internet routing, at least without going through a routing aggregator such as an ISP.
 
==CIDR notation==
 
The standard notation for a CIDR address range begins with the network address (padded on the right with the appropriate number of zero-valued bits - up to 4 [[octet]]s for [[IPv4]], and up to 8 16-bit [[hexadecimal]] fields for [[IPv6]]). This is followed by a "/" character and a prefix length, in bits, defining the size of the network in question (the prefix is actually the length of the subnet mask).
Line 21 ⟶ 37:
* 192.168.0.0 '''/22''' could be written 192.168.0.0 '''255.255.252.0'''
 
==External linklinks==
 
* [http://www.ietf.org/rfc/rfc1518.txt RFC 1518] - An Architecture for IP Address Allocation with CIDR
Another benefit of CIDR is the possibility of '''routing prefix aggregation'''. For example, sixteen contiguous /24 networks could now be aggregated together, and advertised to the outside world as a single /20 route (if the first 20 bits of their network addresses match). Two contiguous /20s could then be aggregated to a /19, and so forth. This allowed a significant reduction in the number of routes that had to be advertised over the Internet, preventing 'routing table explosion' from overwhelming routers and stopping the Internet from expanding further.
* [http://www.ietf.org/rfc/rfc1519.txt RFC 1519] - Classless Inter-Domain Routing (CIDR): an Address Assignment and Aggregation Strategy
 
Nowdays, most [[ISP]]s on the public Internet will not route anything smaller than a /19 prefix, effectively preventing small networks from obtaining full public Internet routing without going through a routing aggregator such as an ISP.
 
CIDR/VLSM network addresses are used throughout the public Internet, although they are also used elsewhere, particularly in large private networks. An average desktop LAN user generally does not see them in practice, as their LAN network is usually numbered using special private [[Private IP address|RFC 1918 addresses]].
 
 
==External link==
* RFC 1518 - An Architecture for IP Address Allocation with CIDR
* RFC 1519 - Classless Inter-Domain Routing (CIDR): an Address Assignment and Aggregation Strategy
* [http://www.bgp4.as/ BGP & Advanced Routing Resources]