Sunteți pe pagina 1din 2

Monday, February 22, 1999 ISP/IXP Networking Workshop

CIDR – Classless InterDomain Routing


In the Internet community you will see networks expressed in CIDRised shorthand. For example, a
block of 32 networks would be expressed as:

203.127.224.0/19

When you configure this CIDR block in BGP, you can express the network as:

network 203.127.224.0 mask 255.255.224.0

Again, if this network needs to be configured into OSPF, you will need to apply a wild-card mask:

network 203.127.224.0 0.0.31.255 area 0

There follows a table which summarises the subnet mask and wild mask for a particular prefix.

Subnet Mask Wild-Card Mask Prefix


0.0.0.0 255.255.255.255 /0
128.0.0.0 127.255.255.255 /1
192.0.0.0 63.255.255.255 /2
224.0.0.0 31.255.255.255 /3
240.0.0.0 15.255.255.255 /4
248.0.0.0 7.255.255.255 /5
252.0.0.0 3.255.255.255 /6
254.0.0.0 1.255.255.255 /7
255.0.0.0 0.255.255.255 /8
255.128.0.0 0.127.255.255 /9
255.192.0.0 0.63.255.255 /10
255.224.0.0 0.31.255.255 /11
255.240.0.0 0.15.255.255 /12
255.248.0.0 0.7.255.255 /13
255.252.0.0 0.3.255.255 /14
255.254.0.0 0.1.255.255 /15
255.255.0.0 0.0.255.255 /16
255.255.128.0 0.0.127.255 /17
255.255.192.0 0.0.63.255 /18
255.255.224.0 0.0.31.255 /19
255.255.240.0 0.0.15.255 /20
255.255.248.0 0.0.7.255 /21
255.255.252.0 0.0.3.255 /22
255.255.254.0 0.0.1.255 /23
255.255.255.0 0.0.0.255 /24
255.255.255.128 0.0.0.127 /25
255.255.255.192 0.0.0.63 /26
255.255.255.224 0.0.0.31 /27
255.255.255.240 0.0.0.15 /28
255.255.255.248 0.0.0.7 /29
255.255.255.252 0.0.0.3 /30
255.255.255.254 0.0.0.1 /31
255.255.255.255 0.0.0.0 /32
Cisco Systems, Inc. 1
170 West Tasman Drive.
San Jose, CA 95134-1706
Phone: +1 408 526-4000
Fax: +1 408 536-4100
Monday, February 22, 1999 ISP/IXP Networking Workshop

The following table lists the number of subnets which are available per prefix size.

Prefix Network Bits Host Bits Useable Host


addresses per
subnet
/1 1 31
/2 2 30
/3 3 29
/4 4 28
/5 5 27
/6 6 26
/7 7 25
/8 8 24
/9 9 23
/10 10 22
/11 11 21
/12 12 20
/13 13 19
/14 14 18
/15 15 17
/16 16 16 65534
/17 17 15 32766
/18 18 14 16382
/19 19 13 8190
/20 20 12 4094
/21 21 11 2046
/22 22 10 1022
/23 23 9 510
/24 24 8 254
/25 25 7 126
/26 26 6 62
/27 27 5 30
/28 28 4 14
/29 29 3 6
/30 30 2 2
/31 31 1 0
/32 32 0 1

A host address which has all bits set to zero represents the subnetwork and is reserved. A host address
which has all bits set to one is the broadcast address of the subnetwork and is reserved. Therefore,
each prefix has two available host addresses than is theoretically possible.

Notice that for a /31 network mask it isn’t actually possible to have a useable host address –there are
only two bits, bit 0 which represents the network, and bit 1 which is the broadcast.

There is no limitation on the network addresses possible (unlike in the old classful Internet days).

Cisco Systems, Inc. 2


170 West Tasman Drive.
San Jose, CA 95134-1706
Phone: +1 408 526-4000
Fax: +1 408 536-4100

S-ar putea să vă placă și