Docsity

Subnetting and Classless Interdomain Routing (CIDR) - Understanding Network Addressing, Slides of Computer Science

Partial preview of the text

Download Subnetting and Classless Interdomain Routing (CIDR) - Understanding Network Addressing and more Slides Computer Science in PDF only on Docsity!

Subnetting & CIDR

Announcements

  • Participate in NASCON, FAST-NU Islamabad
  • Assignment 1 deadline extended to Tuesday

due to no BIT-7 classes on Monday

  • From last time:
    • Packet bursting: An approach to increasing the speed of 802.11g-based wireless networks by unwrapping short 802.11g packets and rebundling them into a larger packet to reduce the impact of mandatory gaps between packets (jwire.com)

Subnetting

CLASS “B” e.g. Company 10 Net ID^ Host-ID

2 14 16

10 Net ID Host-ID

2 14 16 0000 Subnet ID (20) (^) Host ID (12)Subnet

10 Net ID Host-ID

2 14 16 1111 Subnet ID (20) (^) Host ID (12)Subnet

10 Net ID Host-ID

2 14 16 000000 Subnet ID (22) (^) Host ID (10)Subnet

10 Net ID Host-ID

2 14 16 1111011011 Subnet ID (26) (^) Host ID (6)Subnet

e.g. Site

e.g. Dept

Routing in the presence of subnets

  • The rest of the Internet is not aware of subnets within a network
  • Levels: site, subnet, host
  • Routing now involves delivery to the site, then the subnet and finally the host

Classless Interdomain Routing (CIDR)

Addressing  The IP address space is broken into line segments, or blocks  e.g. Block of 2 addresses, block of 128 addresses etc.  Each block is described by a prefix.  A prefix is of the form x/y where x indicates the prefix of all addresses in the block, and y indicates the length of the prefix.  e.g. The prefix 128.9/16 represents the block containing addresses in the range: 128.9.0.0 … 128.9.255..

0 232 -

128.9/

128.9.0.

216

142.12/ 65/

128.9.16.

Classless Interdomain Routing (CIDR)

Addressing

0 232 -

128.9/

128.9.16.

128.9.16/20 128.9.176/

128.9.19/ 128.9.25/

Most specific route = “longest matching prefix”

Size of the Routing Table at

the core of the Internet

Source: http://www.cidr-report.org/

Prefix Length Distribution

Source: Geoff Huston, Jan 2006

0

20000

40000

60000

80000

100000

8 11 14 17 20 23 Prefix length (bits)

Number of entries

Finding the first address

  • What is the first address in the block if one of the addresses is 167.199.170.82/27?
  • Solution: The prefix length is 27, which means that we must keep the first 27 bits as is and change the remaining bits (5) to 0s. The following shows the process:

Address in binary: 10100111 11000111 10101010 01010010 Keep the left 27 bits: 10100111 11000111 10101010 01000000 Result in CIDR notation: 167.199.170.64/

Finding the first address

  • What is the first address in the block if one of the

addresses is 140.120.84.24/20?

Example

  • Find the number of addresses in the block

if one of the addresses is

  • Solution: The prefix length is 20. The

number of addresses in the block is 2^32 −^20

or 2^12 or 4096. Note that this is a large

block with 4096 addresses.

Example 2

  • Find the last address in the block if one of the

addresses is 140.120.84.24/20.

  • Solution
    • We found in the previous examples that the first address is 140.120.80.0/20 and the number of addresses is 4096. To find the last address, we need to add 4095 (4096 − 1) to the first address.
    • Or, set all bits that are not part of the CIDR prefix to 1
      • 140.120.(0101 1111) (^) 2. (1111 1111) 2 = 140.120.95.