Route Summarization

Route Summarization is one of the more challenging areas of networking, so I thought I would outline my calculator, in order that you can…

Route Summarization

Route Summarization is one of the more challenging areas of networking, so I thought I would outline my calculator, in order that you can check your solutions. The key thing is to determine the bits that are common in the bit sequences (starting from the left-hand side). All the examples given here are included on this Web page.

Tests

There following are two related tests:

Example 1

For example: 172.16.128.0–172.16.159.255 gives:

10101100.00010000.10000000.00000000 (172.16.128.0)
10101100.00010000.10000001.00000000 (172.16.129.0)
10101100.00010000.10000010.00000000 (172.16.130.0)
...
10101100.00010000.10011111.11111111 (172.16.159.255)

where the common part is:

10101100.00010000.100

where 10101100 is 172 where 00010000 is 16 where 100xxxxx is 128 which gives: 172.16.128.0 and since we using 19 bits (8+8+3) to give a route summarization of: 172.16.128.0/19

Example 2

For example: 192.168.98.0 192.168.99.0 192.168.100.0 192.168.101.0 192.168.102.0 192.168.105.0 we get:

11000000.10101000.01100010.00000000 (192.168.98.0)
11000000.10101000.01100011.00000000 (192.168.99.0)
11000000.10101000.01100100.00000000 (192.168.100.0)
11000000.10101000.01100101.00000000 (192.168.101.0)
11000000.10101000.01100110.00000000 (192.168.102.0)
11000000.10101000.01101001.00000000 (192.168.105.0)

We can see that the first part is common to all the bit sequences: 11000000.10101000.0110 where 1100 0000 is 192 where 1010 1000 is 168 where 0110 0xxx is 96 giving: 192.168.96.0 and we have 20 bits shared, thus the result is 192.168.96.0/20

Example 3

In this example we have: 172.1.4.0 172.1.4.128 172.1.5.0 172.1.6.0 172.1.7.0 which gives:

10101100.00000001.00000100.00000000 (172.1.4.0)
10101100.00000001.00000100.10000000 (172.1.4.128)
10101100.00000001.00000101.00000000 (172.1.5.0)
10101100.00000001.00000110.00000000 (172.1.6.0)
10101100.00000001.00000111.00000000 (172.1.7.0)

which gives a common part of:

10101100.00000001.000001

where 10101100 is 174 where 00000001 is 1 where 000001xx is 4 which gives 174.1.4.0 and we have used 22 common bits to give: 172.1.4.0/22

Example 4

For example: 100.16.0.0 100.17.0.0 100.18.0.0 100.19.0.0 which gives:

01100100.00010000.00000000.00000000 (100.16.0.0)
01100100.00010001.00000000.00000000 (100.17.0.0)
01100100.00010010.00000000.00000000 (100.18.0.0)
01100100.00010011.00000000.00000000 (100.19.0.0)

The common part is:

01100100.000100

Where 01100100 is 100 Where 000100xx is 16 to give: 100.16.0.0/14

Other examples

There are other examples at: http://www.asecuritysite.com/IP/routesum

Examples:

  • 192.168.128.0–192.168.159.0 [Link]
  • 172.16.0.0–172.31.255.255 [Link]
  • 172.16.128.0–172.16.159.255 [Link]
  • 100.16.0.0 100.17.0.0 100.18.0.0 100.19.0.0 [Link]
  • 172.16.50.0 172.16.60.0 172.16.70.0 172.16.80.0 172.16.90.0 172.16.100.0 172.16.110.0 172.16.120.0 [Link]
  • 10.1.0.0 10.1.1.0 10.1.2.0 10.1.3.0 10.1.4.0 10.1.5.0 10.1.6.0 10.1.7.0 [Link]
  • 172.16.8.0 172.16.9.0 172.16.10.0 172.16.11.0 172.16.12.0 172.16.13.0 172.16.14.0 172.16.15.0 gives 172.16.8.0 /21 [Link][Check]
  • 72.16.50.0 72.16.60.0 72.16.70.0 72.16.80.0 72.16.90.0 72.16.100.0 72.16.110.0 72.16.120.0 gives 72.16.0.0/17 [Link][Check]
  • 172.16.12.0 172.16.13.0 172.16.14.0 172.16.15.0 gives 72.16.0.0/17 [Link][Check]
  • 172.16.0.1–172.31.1.1 gives 172.16.0.0/12 [Link][Check]
  • 192.168.0.0 192.168.1.0 192.168.2.0 192.168.3.0 gives gives 192.168.0.0/22 [Link][Check]
  • 10.1.138.0 10.1.138.64 10.1.138.32 gives gives 10.1.138.0/25 [Link][Check]