Unit Home Info Notes Assigns Quiz Activity


BTEC-Cisco Routing, Switching & Virtual LANs

  
 
 

 Chapter 1 - Introduction to Classless Routing


Route Aggregation and Supernetting

These notes discuss the how classless addressing with CIDR allows for route aggregation and supernetting.

Introduction

IP Address Classes and CIDR

Route Aggregation and Supernetting

Another Example  

Exercises

Summary

 
 

Introduction

During the early 1990's, problems with the IP addressing scheme (IPv4) were becoming apparent. The number of networks was growing rapidly and not only did this create a demand for public IP addresses but as the number of networks increased so did routing tables, which were growing large and unwieldy. By 1990, most Class A and B addresses had been allocated, leaving only the smaller Class C address ranges available - far too small for many new networks. Matters were reaching crisis levels.

So, in 1993, a new regime of IP addressing, called Classless Inter-Domain Routing (CIDR) was introduced. One of the benefits of CIDR is that it allows for a more flexible allocation of address blocks, freeing up many unused addresses. Another major benefit of CIDR is that it allows for several routes to be combined into a single entry in the routing tables, thus reducing large unwieldy routing tables to a more manageable and efficient size. The combining of several network addresses together is called ‘route aggregation’ and the combined network is called a supernet. CIDR makes all this possible and it's introduction helped prevent the Internet from collapsing under it's own dinosaur weight.

On completion of these notes you should be able to...

  • Understand and describe CIDR
  • Understand route aggregation and supernetting
  • Be able to calculate summary routes
 

IP Address Classes and CIDR

CIDR is a method that was developed to try and ease the ever increasing demand for public IP addresses. The CIDR addressing scheme allows for more efficient allocation of IP addresses than the Class A, B, and C address scheme. A CIDR address uses the standard 32-bit IP address but additionally included information on how many bits are used for the network prefix. A CIDR address is represented as A.B.C.D/n, where "/n" is called the network prefix.

Class
Network Address Bits
CIDR Prefix
A 8 /8
B 16 /16
C 24 /24

Class A, B and C IP addresses written using the CIDR notation are shown below:-

10.0.0.5/8      -->    /8 means the first 8 bits are the network address

140.2.3.4/16 -->    /16 means the first 16 bits are the network address

200.2.3.4/24 -->    /24 means the first 24 bits are the network address

You may wonder - what is the benefit of this notation? Well CIDR can uses prefixes other than the standard Class A, B and C prefixes of 8, 16 or 24.

For example, 200.2.3.4/25 means the first 25 bits are the network part with the remaining 7 bits used for identifying hosts. This is why CIDR stands for Classless Inter-Domain Routing, because the addresses are not limited to the Class boundaries.

Let's say a network has 500 hosts. Using classful IP addressing, this network needs a Class B address where the maximum number of hosts is up to 65,534 hosts. If a Class B public IP network address is purchased (e.g. 194.1.0.0), this means 65,034 IP addresses are being wasted. Moreover, these redundant IP addresses cannot be used by another network elsewhere.

On the other hand, with CIDR addressing, a /23 network prefix can be used, leaving 9 bits for the host part allowing for up to 510 IP addresses. This would give the required number of addresses.

As you will see next, CIDR also permits what is called route aggregation and supernetting, where contiguous network addresses can be combined to form a supernet address. You can think of supernetting as the means for specifying multiple networks or subnetworks using one address.

~Now try the activity~

 Activity A
  1. Specify the number of bits allowed for the host part of each CIDR IP address below and the number of hosts the network can address.
      
    1. 200.10.50.4/26
    2. 170.13.45.77/18
    3. 116.54.31.6/10
         
         
      You can check your answers here
 

Route Aggregation and Supernetting

Consider the extremely large number of independent network addresses that exist on the Internet. Now imagine your router has to keep a record of every one of those addresses in it's routing table. Here we have a dilemma. If your router does not keep a record of all possible addresses, then your packets may be dropped due to destination unknown problems. If it does keep a record of all the addresses then it's routing table will be HUGE.

Aha, you might say, the obvious solution is to store addresses based on classes. Well, let's consider the problem from the point of view of an ISP. An ISP may have the responsibility for allocating a vast range of network addresses. Suppose our particular ISP is responsible for 3 different Class B addresses from 172.16.28.0 to 172.16.30.0. (Yes, this is a really small ISP)

Would an external Internet router need to store the 3 different network addresses in it's routing table? The diagram below shows this situation.

Rather than store each separate network addresses, a more efficient way would be to store one single supernet network address that represents the three Class B network addresses. An Internet router could just keep a single supernet entry in it's routing table and route any packets for the supernet to the ISP's router. The ISP's router could deal with the matter of getting the packet to the appropriate network in the supernet.

Is it possible combine the three routes into a single address? Well yes! Combining network addresses together is called route aggregation and the combined network is called a supernet. You can imagine supernets as the opposite of subnets.

Let's aggregate the routes in the example above to form one supernet address. The three separate network addresses of 172.28.0.0/16, and 172.29.0.0/16 and 172.30.0.0/16 can be aggregated into the single super network address of 172.28.0.0/14.

Let's see how I calculated the supernet address.

Step 1: Convert each address into binary

 Step 1
   172.28.0.0
   10101100.00011100.00000000.00000000
   172.29.0.0
   10101100.00011101.00000000.00000000
   172.30.0.0
   10101100.00011110.00000000.00000000

  
Step 2:
Determine which bits of the address are the same and which bits are variable.

 Step 2
   172.28.0.0
   10101100.00011100.00000000.00000000
   172.29.0.0
   10101100.00011101.00000000.00000000
   172.30.0.0
   10101100.00011110.00000000.00000000


Step 3:
Work out the network prefix.

 Step 3

Count all the bits from the left that are the same

10101100.000111    =   14 bits the same

The supernet bit mask is:-

11111111.11111100.00000000.00000000

The supernet address using CIDR notation can be obtained by using the lowest network address and the new bit mask.

The supernet address is - 172.28.0.0/14

So now, any Internet router can store the single supernet address of 172.28.0.0/14 in it's routing table instead of the three separate network addresses, thus reducing the number of routing table entries required.

For route summarization and supernetting to work properly a router must be able to support CIDR and classless routing. Instead of relying on the class of an address to route packets, a router that supports CIDR can now use the /n prefix to route. This brings about tremendous flexibility, in that address allocations can be tailored to the actual needs of an organisation.

The power of CIDR and route aggregation becomes apparent when you realise that contiguous blocks of address space all over the Internet can be aggregated. It is possible for a single routing entry to represent many addresses lower down the hierarchy. A single routing entry may point to the supernet address of one ISP, another entry to the supernet address of another ISP and so on. In fact, without route aggregation, the growth in the routing tables would have eventually brought the Internet to a standstill.

~Now try the activity~

 Activity B
  1. Suppose an ISP maintains the following four Class B address blocks:
      
    • 150.12.0.0/16
    • 150.13.0.0/16
    • 150.14.0.0/16
    • 150.15.0.0/16
        
    Aggregate these four address blocks into a single route.

You can check your answers here

 

Another Example

Let's consider another example. Suppose we have a slightly larger ISP that manages the block of addresses from 200.7.1.0 to 200.7.255.0. These 255 Class C network addresses can be aggregated to a supernet address of 200.7.0.0/16. Internet routers need only maintain the single supernet address in their routing tables. A packet addressed to say 200.7.5.3/16 would be routed to our particular ISP's internetwork.

Now consider Company XYZ that requires enough addresses for 500 hosts. Purchasing a single Class B address would be pricey and wasteful of addresses. Two Class C networks would supply enough addresses. The drawback would be that both the network's routers and external Internet routers would have to maintain two separate routing table entries.

Now, with classless addressing and CIDR, an organisation can request a block of addresses from an ISP. The ISP will then allocate a block of addresses to the organisation from the address space it manages. Our particular ISP might allocate 200.7.7.0/24 and 200.7.8.0/24 to Company XYZ as shown in the diagram below.

The ISP's router could maintain two separate entries in its routing table. One for each of the two Class C network addresses. Again, storing the company's supernet address would be even more efficient. So let's calculate the supernet address.

Step 1: Convert each address into binary

 Step 1
   200.7.7.0
   11001000.00000111.00000111.00000000
   200.7.8.0
    11001000.00000111.00001000.00000000  

  
Step 2:
Determine which bits of the address are the same and which bits are variable.

 Step 2
   200.7.7.0
    11001000.00000111.00000111.00000000
   200.7.8.0
    11001000.00000111.00001000.00000000  

  
Step 3:
Work out the network prefix.

 Step 3

Count all the bits from the left that are the same

11001000.00000111.0000    = 20 bits the same

The supernet bit mask is:-

11111111.11111111.11110000.00000000

The supernet address using CIDR notation can be obtained by using the lowest network address and the new bit mask.

The supernet address is - 200.7.7.0/20

There are many similar cases, where organisations purchase a range of network addresses to suit their particular addressing needs. Many medium sized networks commonly purchase several Class C network addresses rather than a larger more expensive Class B network address. Moreover, Class B addresses are harder to come by, since most of them are already allocated.

~Now try the activity~

 Activity C
  1. Suppose we have four IP subnets on the four LAN interfaces of our router:
      
    • 210.6.0.0/24
    • 210.6.1.0/24
    • 210.6.2.0/24
    • 210.6.3.0/24
        
    Summarize these networks into a single route that can be advertised across the WAN.

You can check your answers here

 

Exercises

Here are some more exercises.

 Activity D
  1. Calculate the supernet address for the networks...
          
    • 172.19.0.0/16
    • 172.20.0.0/16
    • 172.21.0.0/16
       
  2. Summarize the following network addresses..
          
    • 172.16.169.0/24
    • 172.16.170.0/24
    • 172.16.171.0/24
        
  3. Summarize the following network addresses..
          
    • 200.198.48.0/24
    • 200.198.52.0/24
    • 200.198.56.0/24
        
    You can check your answers here
 

Summary

On completing these notes you should:-

  • Understand that CIDR is a more flexible replacement for the old classful method of assigning IP address spaces based on class boundaries
  • Realise the power of CIDR and how it makes possible route aggregation and supernetting
  • Be able to calculate summary routes
 


 

Site Home

Top

Unit Home


   

BTEC National Diploma
  

 

Folder101 Home

 

   
This Unit 

Unit Information

Assessment

Syllabus

Scheme of Work

Learning Resources

Notes & Lessons

Assignments

Quizzes

Activities

Resources

Books & Things

Links