Tuesday, 4 October 2016

OSPF Route Summarization

Route summarization - as the name suggests allows you to summarize a group of networks - by specifying a single prefix - for example if we had the following subnets:

192.168.0.0/24
192.168.1.0/24
192.168.2.0/24
192.168.3.0/24

we could summarize them as:

192.168.0.0/22

Route summarization in OSPF can only be performed on the ABR or ASBR - this is because the LSDB (Link State Database) must be exactly the same on all routers within the area.

Note: It is only possible to summarize LSA type 3 (for inter-area routers) and type 5 (external networks that are redistributed into OSPF.)

While route summarization can be useful since it helps reduce the number of routes present in the routing table - it is not enabled by default and must be manually configured.

Another advantage of route summarization is that if we have summarized the above routes as 192.168.0.0/22 and the link to 192.168.2.0/24 goes down - we will not have to change our routing table (no flooding of LSA's needed) and hence save computation power for performing the SPF algorithm of each router and of course bandwidth.

For this example we will have a simple topology - two routers - R1 acting as the DR in Area 0 and R2 acting as an ABR in Area 0 and 1:



Firstly we shall setup the basic OSPF configuration:

R1>
enable
conf t
int e0/0
ip address 10.0.0.1 255.255.255.252
no shutdown
ip ospf 1 area 0

router ospf 1
router-id 1.1.1.1
network 10.0.0.0 0.0.0.3 area 0

R2>
enable
conf t
int e0/0
ip address 10.0.0.2 255.255.255.252
no shutdown
ip ospf area 0

router ospf 1
router-id 2.2.2.2
network 10.0.0.0 0.0.0.3 area 0

Now the adjacency has formed we will add several loopback adapters (which we will summarize) e.g.:

R2>
int loopback 1
ip address 192.168.0.1 255.255.255.255

int loopback 2
ip address 192.168.1.1 255.255.255.255

int loopback 3
ip address 192.168.2.1 255.255.255.255

int loopback 4
ip address 192.168.3.1 255.255.255.255

router ospf 1
network 192.168.0.1 0.0.0.0 area 1
network 192.168.1.1 0.0.0.0 area 1
network 192.168.2.1 0.0.0.0 area 1
network 192.168.3.1 0.0.0.0 area 1

Wait for the changes to propagate and then check the routing table on R1:

do show ip route

Now we will firstly perform Type 3 summarization - i.e. intera-area summarization - this is performed on the ABR (R2 in our case) using the 'range' keyword:

R2>
router ospf 1
area 1 range 192.168.0.0 255.255.255.0
end
wri mem

Then on R1 we can verify that the summarized route is present with:

do show ip route

Now as stated earlier we can also summarize Type 5 (External) LSA's - this can be performed when cooked up to another routing protocol such as EIGRP - on the ASBR we simply need to identify the routes we wish to summarize:

show ip ospf database | begin Type-5

and use the 'summary-address' command:

conf t
router ospf 1
summary-address 172.16.0.0 255.255.0.0

0 comments:

Post a Comment