In both routing protocols OSPF and EIGRP route summarization and default route propagation are crucial, especially if you have complex network with a lot of prefixes. Properly implemented summarization can save a lot of router resources. Let’s check how to implement both features and what is “mystery” null0 interface involved in summarization.
Here is the simple lab topology that I will be using in both cases OSPF and EIGRP, between R1-R2-R3-R4 there is EIGRP AS 4 implemented and OSPF area 1 (only R1-R2-R3). Between R2 and R4 there is Area 0, so R2 plays a role of ABR. R1, R2, R3 and R4 belong to us, there is also a cloud belongs to ISP with interface faced towards us with ip address 188.8.131.52 and loopback 184.108.40.206. I also created 8 loopbacks on R1 with addresses 172.30.1-8.0/24 which will be usefull to demonstrate summarization. On ISP router I added static routes lead to R1,R2,R3,R4 in order to get ping back.
Default Route Propagation
Ragarding OSPF we may propagate “default route” in 2 ways :
– with command “default-information originate” – this command has to be implemented on ABR, so the router that border with Area 0 and Area 1. This default route will be advertised to the other routers within Area 1. We have to have in routing table of R2 default route leads to R4, that we add manually “ip route 0.0.0.0 0.0.0.0 10.1.25.4“
– with command “default-information originate always” – similar to above, but you don’t need default route on R2! On each router within Area 1 will be created automatically route 0.0.0.0 0.0.0.0 with the next hop of next router.
I’ve marked on red colour the default route injection ways that we should use, the remained ways I show only in order to mark that they exist.
Default route may be deployed in 4 different ways on R4 (edge) router:
1. Static redistribution :
We add default route “ip route 0.0.0.0 0.0.0.0 220.127.116.11 ” and then redistribute as a static route “redistribute static metric x x x x” under “router eigrp 4“
We see that to all routers within eigrp 4 has been added default route with next hop of the next router, this is how it works! We may ping 18.104.22.168 easily from R1
2. “Ip default-network” command :
We add default network “ip route 22.214.171.124 255.255.255.0 fa1/0” (not 0.0.0.0 0.0.0.0!) and redistribute as a static “redistribute static metric x x x x ” under “router eigrp 4“.Next we send the command “ ip default-network 126.96.36.199” in <config mode>. On all others routers we add “network 188.8.131.52 0.0.0.255” under “router eigrp 4”
” Ip default-network” requires that each router in the network know how to reach external network to ISP. Also is a clasfull and deprecated and shouldn’t be use anymore. Has been invented for IGRP that is classfull rather EIGRP.
3. “network 0.0.0.0” command :
We add default route with “ip route 0.0.0.0 0.0.0.0 184.108.40.206” and advertise “network 0.0.0.0” under “router eigrp 4”
“Network 0.0.0.0” is not desirable and shouldn’t be used, because beside default route, EIGRP process is being advertised on ALL interfaces on the router, what may be troublesome and expose your router to threats.
4. “ip summary-address” command :
We add default route “ip route 0.0.0.0 0.0.0.0 220.127.116.11” then we summarize all routes on interface f0/0 “ip summary-address eigrp 4 0.0.0.0 0.0.0.0“
In both cases OSPF and EIGRP I will show summarization based on networks on router R1 172.30.1-8.0/24, created with loopbacks. Remember create them with “ip ospf network point-to-point” otherwise even if you gave prefix /24 they will be visible as single interface.
Summarization in OSPF can be done ONLY on the ABR router with command “area 1 range 172.16.0.0 255.255.240.0” under OSPF process of R2. Cause we want to summarize 8 networks /21 prefix wouldn’t be enough, we have to use prefix /20 (.240). Let’s implement everything and check in 3 steps:
Routing table of R4 before routes summarization on R2
Summarization on R2 (pay attention on null0 interface, explanation at the end)
Routing table of R4 after routes summarization on R2
In EIGRP we implement summarization on the interface so there is a huge difference to compare with OSPF. Because our networks are placed on R1, on both serial interfaces we have to summarize them, so under the interface configuration mode we do that with command “ip summary-address eigrp 4 172.30.0.0 255.255.240.0 95“. 95 stands for administrative distance. Default AD for EIGRP summarized routes is 5
This is how we conduct summarization on R1 s3/0 and s3/1 interfaces and how routing table entry regarding networks 172.30.1-8/24 looks:
and how routing table on R2 looks before and after implementation of summarization
Null0 interface plays very important role during summarization. Think about Null0 as about a “black hole” that unwanted packets get into. Let’s break our summarization down.
We summarize 8 networks from 172.30.1.0/24 up to 172.30.8.0/24. We have to use prefix /20 in order to do that. But prefix also contains networks 172.30.9.0, 172.30.10.0, 172.30.11.0, and so on up to 172.30.15.0, but we don’t have these networks behind R1! This is why we use Null0 interface, it’s a “bucket” that these packets will be forwarded to, in order to avoid loops! In case of OSPF if you take a look on R4 routing table after summarization on R2, you see entry 172.30.0.0/20 what means packet destined for example to network 172.30.10.0 will be unfortunately forwarded because belongs to pefix /20, but thankfully we have Null0 further on R2 router where packet will be dropped, because R2 knows that doesn’t have an access to these network!.