Sie sind auf Seite 1von 15
CIDR – Classless Inter-Domain Routing
CIDR – Classless Inter-Domain Routing

CIDR Classless Inter-Domain Routing

CIDR – Classless Inter-Domain Routing

Beulah A.

AP/CSE

IPv4 Classful Addressing

32 bit address

How many do we get?

½ are class A

¼ are class B

1/8 are class C

Rest are D & E

2 Unit III

Beulah A.

get?  ½ are class A  ¼ are class B  1/8 are class C

22-Aug-12

Wastage using classes rigidly Class A Allocations

2 32 = 4 294 967 296

½ of these are class A = 2 147 483 648

Class A only given to big organisations

Governments etc

Each class A has (2 24 2) hosts = 16 777 216

A lot of hosts!!

3
3

Unit III

Beulah A.

22-Aug-12

Class B Allocations

2 16 = 65536 hosts per class B

1 073 741 824 addresses in total 16 384 different class B addresses

128.0.0.0 to 191.255.255.255

Given to large companies

4
4

Unit III

Beulah A.

22-Aug-12

Class C Allocations

536 870 912 host addresses in all

2 8 2 = 254 hosts per class C address 192.0.0.0 to 223.255.255.255

2 097 152 class C addresses available

Not large enough for big company, too many for small

company.

5
5

Unit III

Beulah A.

22-Aug-12

Classless Interdomain Routing

1993 (see RFCs 1517, 1518, 1519, 1520 )

CIDR helps keep Internet from running out of IP addresses

Allocates only the amount of address space needed Wastage of address space reduced.

Supernetting - classful subnet masks extended so that a network address and subnet mask can specify multiple Class

C subnets with one address

Classless routing

6
6

Unit III

Beulah A.

22-Aug-12

Example

A company need 1800 IP addresses ( A, B or C? NO!)

2 11 = 2048 (don’t forget to lose 2 of them)

11 host bits needed

Mask will be 32 11 = 21 i.e. /21

ISP can allocate this space

Appears in ISP routing table as 1 entry

Advertised back to Internet core as 1 address

7
7

Unit III

Beulah A.

22-Aug-12

IP Allocation by ISPs

Big ISPs are allocated large chunks of address space

ISP's customers are then allocated networks from the big

ISP's pool

ISP has 155.100.0.0 to 155.255.255.255

10011011. 01100100. 00000|000. 00000000 Divided as network| hosts

8
8

Unit III

Beulah A.

22-Aug-12

Example

10011011. 01100100. 00000|000. 00000000

Network address

10011011. 01100100. 00000|111. 11111111

Broadcast address (without subnetting)

Convert to decimal

155.100.0.0 /21 to 155.100.7.255 /21

Customer can subdivide as sees fit

9
9

Unit III

Beulah A.

22-Aug-12

Another Example

200.10.24.0 = 11001000 00001010 00011000 00000000

200.10.25.0 = 11001000 00001010 00011001 00000000

200.10.26.0 = 11001000 00001010 00011010 00000000

200.10.27.0 = 11001000 00001010 00011011 00000000

200.10.28.0 = 11001000 00001010 00011100 00000000

200.10.29.0 = 11001000 00001010 00011101 00000000

200.10.30.0 = 11001000 00001010 00011110 00000000

200.10.31.0 = 11001000 00001010 00011111 00000000

Note the common bits in green

Mask is therefore /21

200.10.24.0 /21 is the aggregate address

10
10

Unit III

Beulah A.

22-Aug-12

Advertising Upstream

200.10.24.0 /21 advertised back upstream

ISP itself will advertise all of its addresses aggregated

too

Keeps core routing tables manageable

11
11

Unit III

Beulah A.

22-Aug-12

First Address & Last Address

In IPv4 addressing, a block of addresses can be defined as x.y.z.t /n in which x.y.z.t defines one of the

addresses and the /n defines the mask.

The first address in the block can be found by setting the rightmost 32 − n bits to 0s.

The last address in the block can be found by setting the

rightmost 32 − n bits to 1s.

12 Unit III

Beulah A.

22-Aug-12

Example

A block of addresses is granted to a small organization.

The organization has 6 subnets. We know that one of the

addresses is 205.16.37.39. What is the first address in the

block?

The binary representation of the given address is

11001101

00010000

00100101

00100111

What is the value of n?

If we set 32−28 rightmost bits to 0, we get

11001101

00010000

00100101

00100000

or 205.16.37.32 First Address

13
13

Unit III

Beulah A.

22-Aug-12

Example Cont…

Find the last address for the previous example

The binary representation of the given address is

11001101

00010000

00100101

00100111

If we set 32 − 28 rightmost bits to 1, we get

11001101 00010000 00100101 00101111 or

205.16.37.47 Last Address

14
14

Unit III

Beulah A.

22-Aug-12

Example Cont…

Example Cont… 15 Unit III Beulah A. 22-Aug-12

15 Unit III

Beulah A.

22-Aug-12