Classless
Interdomain Routing (CIDR) was introduced to improve both address space
utilization and routing scalability in the Internet.
It was needed because of
the rapid growth of the Internet and growth of the IP routing tables held in
the Internet routers.
CIDR
moves way from the traditional IP classes (Class A, Class B, Class C, and so
on). In CIDR , an IP network is represented by a prefix, which is an IP address
and some indication of the length of the mask.
Length means the number of
left-most contiguous mask bits that are set to one. So network 172.16.0.0/255.255.0.0. can be represented as 172.16.0.0/16. CIDR also depicts a more
hierarchical Internet architecture, where each domain takes its IP addresses
from a higher level. This allows for the summarization of the domains to be
done at the higher leveL.
For
example, if an ISP owns network 172.16.0.0/16, then the ISP can offer
172.16.1.0/24, 172.16.2.0/24, and so on to customers. Yet, when advertising to
other providers, the ISP only needs to advertise 172.16.0.0/16.
Sample
Config
Routers
A and B are connected via serial interface.
Router
A
hostname router'a'
!
ip routing
!int e 0
ip address 172.16.50.1 255.255.255.0
!(subnet 50)
int e 1 ip address 172.16.55.1 255.255.255.0
!(subnet 55)
int t 0 ip address 172.16.60.1 255.255.255.0
!(subnet 60) int s 0
ip address 172.16.65.1 255.255.255.0 (subnet
65)
!s 0 connects to router B
router rip
network 172.16.0.0
Router
B
hostname router'b'
!
ip routing
!int e 0
ip address 192.1.10.200 255.255.255.240
!(subnet 192)
int e 1
ip address 192.1.10.66 255.255.255.240
!(subnet 64)
int s 0
ip address 172.16.65.2 (same subnet as router
A's s 0)
!Int s 0 connects to router A
router rip
network 192.1.10.0
network 172.16.0.0
Host/Subnet
Quantities Table:
Class
B Effective Effective
#
bits Mask Subnets Hosts
------- --------------- ---------
---------
1
255.255.128.0 2 32766
2
255.255.192.0 4 16382
3
255.255.224.0 8 8190
4
255.255.240.0 16
4094
5
255.255.248.0 32 2046
6
255.255.252.0 64 1022
7
255.255.254.0 128 510
8
255.255.255.0 256 254
9
255.255.255.128 512 126
10
255.255.255.192 1024 62
11
255.255.255.224 2048 30
12
255.255.255.240 4096 14
13
255.255.255.248 8192 6
14
255.255.255.252 16384 2
Class
C Effective Effective
#
bits Mask Subnets Hosts
------- --------------- ---------
---------
1
255.255.255.128 2 126
2
255.255.255.192 4 62
3
255.255.255.224 8 30
4
255.255.255.240 16 14
5
255.255.255.248 32 6
6
255.255.255.252 64 2
*Subnet
all zeroes and all ones included. These
might not be supported on some legacy systems.
*Host
all zeroes and all ones excluded.
No comments:
Post a Comment