## Scenario 1-4: Summarization with EIGRP and OSPF

In this scenario, given the address ranges in Table 1-9, you see how to configure summarization with EIGRP and OSPF.

Table 1-9 displays the IP address ranges to be summarized, as well as the binary representation of the third octet or the subnet port of the IP address space.

#### Table 1-9. IP Address Ranges

 IP Subnet Subnet Mask Binary Representation of Third Octet 151.100.1.0 255.255.255.0 00000001 151.100.2.0 255.255.255.0 00000010 151.100.3.0 255.255.255.0 00000011 151.100.4.0 255.255.255.0 00000100 151.100.5.0 255.255.255.0 00000101 151.100.6.0 255.255.255.0 00000110 151.100.7.0 255.255.255.0 00000111 151.100.8.0 255.255.255.0 00001000 151.100.9.0 255.255.255.0 00001001 151.100.10.0 255.255.255.0 00001010 151.100.11.0 255.255.255.0 00001011 151.100.12.0 255.255.255.0 00001100 151.100.13.0 255.255.255.0 00001101 151.100.14.0 255.255.255.0 00001110 151.100.15.0 255.255.255.0 00001111 151.100.16.0 255.255.255.0 00010000

Before configuring EIGRP or OSPF summarization, you first need to decide whether summarization is possible at all. Table 1-9 displays 16 subnets, numbered from 1-16. The first 15 subnets all have one thing in common when viewed in binary: The first four bits or high-order bits are always 0. Therefore, you can summarize the first 15 networks using the subnet mask 255.255.255.240. (240 in binary is 1111000 where the first four bits are common.) The last four bits contains the networks 1 to 15 or in binary encompass all networks from 0000 to 1111.

The last remaining subnet 151.100.16.0 is the odd network out. Although it is contiguous, you cannot summarize it along with the first 15 network, because any summary address range encompasses networks beyond 151.100.16.0, which may reside in other parts of the network.

Configure EIGRP to summarize these routes out of a serial port (serial 0/0 in this example). Example 1-9 displays the configuration required to disable automatic summarization and the two required summary address commands on the serial 0/0 on a router named R1.

#### Example 1-9. EIGRP Summary

```R1(config)#router eigrp 1

R1(config-router)#

no auto-summary

R1(config)#interface serial 0/0

R1(config-if)#

ip summary-address eigrp 1 151.100.1.0 255.255.255.240

R1(config-if)#

ip summary-address eigrp 1 151.100.16.0 255.255.255.0

```

In Example 1-9, the router R1 sends only two updates: one for the networks ranging from 151.100.1.0 to 151.100.15.0 and another for 151.100.16.0. These two are instead of 16 separate IP route entries. Even in a small scenario like this, you saved 14 IP route entries. Reducing IP routing tables means when a router performs a routing table search, the time it takes to determine the outbound interface is reduced allowing end-user data to be sent faster over a given medium.

With OSPF, you do not need to disable automatic summarization, because OSPF does not automatically summarize IP subnets. Hence, to summarize the same block of addresses of a router (OSPF ABR), you apply two commands under the OSPF process. Example 1-10 displays the summary commands required.

#### Example 1-10. OSPF Summary

```R1(config)#router ospf 1
R1(config-router)#no area 1 range 151.100.16.0 255.255.255.240
R1(config-router)#area 1 range 151.100.16.0 255.255.255.0

```