Anda di halaman 1dari 2

IP Supernetting or CIDR

CIDR stands for "Classless Inter-Domain Routing". It is a new addressing scheme for the
Internet, intended to replace the old classful (Class A, B, C) address scheme. CIDR
allows a more efficient allocation of IP addresses and uses routing aggregation for
minimizing the routing table entries, and is also called supernetting.
A recapitulation of classful IP addressing shows us the following:

Address Class Number of Number of Hosts Decimal Address


Network Bits Bits Range
Class A 8 bits 24 bits 1-126
Class B 16 bits 16 bits 128-191

 126 class A networks with up to 16,777,214 hosts each


 65,000 class B networks with up to 65,534 hosts each
 Over 2 million class C networks with 254 hosts each

If a provider needed 10,000 IP addresses for a project, then it would receive a class B
network, and 55,534 IP addresses would not be used. If however, the provider had been
assigned 40 class C networks for that 10,000 IP addresses, it could not match its needs
(not all the IP addresses would be in the same network) and the routing tables of routers
on the Internet would grow with 40 new routes.
CIDR is an addressing scheme that supports masks not only of 8, 16, or 24 bits as in
classful routing but of arbitrary length. The CIDR notation is:

xxx.xxx.xxx.xxx/n

where xxx.xxx.xxx.xxx is the IP address of the network and "n" is the number of '1' bits
in the mask. For example, the class C network 192.168.1.0 with the mask 255.255.255.0
is written in CIDR as 192.168.1.0/24.
The CIDR masks for classes A, B, and C respectively are /8, /16, and /24.
For the earlier example with the provider requesting 10,000 IP addresses, with CIDR the
provider would be assigned a network having a mask of /18, meaning the subnet mask
would be 255.255.192.0 with 16,382 usable IP addresses and only one prefix in all the
routing tables in the world.
Nowadays, providers are assigned large blocks of addresses that their customers can buy
instead of every customer having different IP classes. For example, the provider that was
assigned a /18 network can give 64 of its customers a class C IP class (a /24). This is
called aggregation, and it significantly reduces the size of the routing tables on the
Internet.

Page 1 of 2
Let's have a look at the CIDR prefixes down to /16 (class B):

CIDR Prefix Subnet Mask Number of IP Addresses


/32 255.255.255.255 /32 is used in CIDR to specify a single
host or IP address. If the prefix is
missing, /32 is assumed
/30 255.255.255.252 4
/29 255.255.255.248 8
/28 255.255.255.240 16
/27 255.255.255.224 32
/26 255.255.255.192 64
/25 255.255.255.128 128
/24 255.255.255.0 256
/23 255.255.254.0 512
/22 255.255.252.0 1024
/21 255.255.248.0 2048
/20 255.255.240.0 4096
/19 255.255.224.0 8192
/18 255.255.192.0 16384
/17 255.255.128.0 32768
/16 255.255.0.0 65536

How the Internet Works

Large providers are assigned large IP blocks for them and for their customers. When
accessing an IP address outside the provider's network, the data must travel through
certain routers to get to the destination IP. The Internet Protocol is responsible for routing
the packet to the destination.
Providers have some large, carrier-class routers located at the edge of their network
where they interconnect to other providers. Every provider that has at least two
interconnections with two different other providers must have an Autonomous System
(AS) number to be identified in the exchange of routing information.
All the Internet is based on BGP (Border Gateway Protocol), which is a dynamic routing
protocol used to exchange information between providers about the networks they have.
A provider having the Autonomous System number 1 (AS 1) has two interconnections:
one with AS 2 and another with AS 3. Depending on the agreement between the
providers, AS 1 can route to either of them only their own networks (Local Exchange or
Local Peerings), or it can announce all the routes received from other peers (Full
Exchange or Full BGP).
AS 3 can receive the routes to AS 1 networks directly from AS 1, and can also receive
them from AS 2 and AS 4. The router finds the best path to AS 1 networks and sends
packets to those networks on that path, and if that link fails, on the next best path. (e.g.
AS 3 sends the packets to AS 1 directly on their interconnection. If that link fails, it will
send them to AS 2, which will forward the packets to AS 1.)

Page 2 of 2

Anda mungkin juga menyukai