Redistribution: Default-Information Originate (OSPF)

Default-Information Originate (Always?)

We know that default routes are generated in OSPF when stub and total stub areas are involved.

We also know that you can’t make Area 0 a stub area.

What we can do is run the OSPF command default-information originate with the always option to send a default route to all other OSPF routers — and that includes routers in Area 0.

The always option allows the router to propagate a default route without actually having one in its routing table.

Without that option, the router must have a default route in its table in order to advertise one. If there is no default route to advertise, neighbors will not receive a default route.

Advanced OSPF: Authentication

To enable authentication between OSPF neighbours, we have 2 options:

  • Plain Text
  • Message Digest 5

The configuration is slightly different with the 2 options.

Plain Text

1. Set your key – Under the physical interface that the adjacency is formed on…

ip ospf authentication-key KEY TO GO HERE (8 character limit and IOS warning is dependant on having IOS 12.4 or later…)

2. Enable authentication:

ip ospf authentication 

….and that is it! Of course this must be set on both neighbours, otherwise the adjacency will drop.

Message Digest 5

1. Set your key – Under the physical interface that the adjacency is formed on…

ip ospf message-digest-key 1 md5 KEY TO GO HERE

2. Enable authentication:

ip ospf message-digest

The two main reasons OSPF authentication fails:

  • Authentication is configured on only one neighbor
  • Password is misspelled

*With OSPF, debug ip ospf adj is the king of debugs and the first command to use to diagnose most OSPF issues.

Advanced OSPF: More Route Summarisation

When summarizing OSPF, the router will help you out by not allowing you to misuse the summary-address and area range commands.

  • summary-address Use on ASBR to summarize routes being redistributed into OSPF. (Redistributed routes)
  • area range Use on ABR to summarize routes advertised from one area to another. (Interarea Routes) Area number used in the command is the area the routes are being advertised from.

Just to reiterate the importance of the show ip protocols command:

R1#show ip protocols
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID
It is an area border and autonomous system boundary router
Redistributing External Routes from, connected, includes subnets in redistribution rip, includes subnets in redistribution
Number of areas in this router is 2. 2 normal 0 stub 0 nssa
Address Summarization:
Maximum path: 4
Routing for Networks: area 1 area 1 area 1 area 1 area 1 area 0
Routing Information Sources:
Gateway Distance Last Update
(this router) 110 01:08:12 110 00:05:21 110 00:05:21
Distance: (default is 110)

Advanced OSPF: Route Summarisation

Route Summarisation – Interarea Only (Redistributed to follow..)

OSPF does not perform auto-summarization when routes are sent across classful network boundaries, as RIPv2 and EIGRP do.

We configure route summarization with the area range command. (This is configured on an ABR only)


R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router ospf 1
R1(config-router)#area 1 ?
authentication Enable authentication
default-cost Set the summary default-cost of a NSSA/stub area
nssa Specify a NSSA area
range Summarize routes matching address/mask (border routers only)
stub Specify a stub area
virtual-link Define a virtual link and its parameters
R1(config-router)#area 1 range network and summary mask go here..

*Note that the number between area and range is the number of the area containing the routes to be summarized, not the area to which the summary is being sent.


Advanced OSPF: Router Types

OSPF Router Types

Internal Routers and Backbone Routers

An OSPF internal router is a router that has all its interfaces in a single area.

Backbone routers have at least one interface in Area 0. That’s the only requirement.

*Routers can fill both of these roles.

Area Border Routers

An ABR is a router that has one interface in Area 0 and another in a non backbone area.

Autonomous System Border Routers

An ASBR is an OSPF router that takes routes learned via another protocol and places those routes into the OSPF domain.

*You can see the ABRs and ASBRs of any given OSPF area by running show ip ospf border-routers.

Advanced OSPF: OSPF Route Types + Deans Conclusion on OSPF Areas.

OSPF Route Types

R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

O – A route to a destination in the same area.

O IA – A route to a destination in another OSPF area.

O E2 AND O E1: Both codes indicate external routes. OSPF external routes are routes learned via redistribution. Before an area becomes a stub area, it will have E2 routes.

The difference between E2 and E1 routes is that the metric of an E2 route only reflects the cost of the path between the ASBR and the final destination.

The metric of an E1 route reflects the OSPF cost of the entire path from the local router to the final destination.

E2 Example:

O E2 [110/20] via, 00:33:21, Ethernet0
O E2 [110/20] via, 00:33:21, Ethernet0

The metric is 20. This is the cost from the ASBR to the destination. E2 is the default route type for routes learned via redistribution.

E1 Example:

To redistribute routes into OSPF as E1 routes, use the metric-type option.

Example of RIP routes injected into OSPF:

R1(config-router)#redistribute rip subnets metric-type 1
O E1 [110/94] via, 00:04:13, Ethernet0
O E1 [110/94] via, 00:04:14, Ethernet0

The routes now show a larger metric – 94. That’s because this is the OSPF cost for the entire path from R4 to each of the destination networks.

Oddly enough I personally thought this would  be the other way round and E2 routes would be the default, however there is slight justification/logic as these routes are normally learned via redistribution, which is only performed on a ASBR. Me personally I would prefer to use E1 as a default, as you will have a true metric/believability from the OSPF router and the destination.

N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2

These route types will obviously be found only in NSSAs. It can be a little confusing to keep up with the different route types that can be found in stub, total stub, and not-so-stubby areas, so here’s a summary:

  • Stub areas can contain O, O IA, and O* IA routes.
  • Total stub areas can contain O and O* IA routes only.
  • NSSAs can contain O, O IA, O N2, O* N2, O N1, and O* N1 routes.

My own overview on OSPF are types!

These OSPF area types can really be a headache, so this is in my own words as if I want a colleague or fellow Cisco candidate (or myself) to understand OSPF area types. This is not from any book, just my own brain and experience so is a test for me.

Stub Area

A stub area is usually an area that is a dead end and only has 1 way out or exit point. Therefore the next hop IP Address being the same for all routes. We can make the routing table more efficient by replacing all learned routes with a single default route. By making the area a stub, we also are minimising overall LSA updates as Type 5 LSAs will never flood into a stubby area.

When we make an OSPF area a ‘stub’, it will not receive Type 5 LSAs. A Type 5 LSA is a route that is external or learned via route redistribution. These routes will appear in the table as E2 by default. By just making an area a stub, we can remove all E2 routes and replace them with one default route that will show in the routing table as O*IA. (Candidate default/interarea default route)

Totally Stubby Area

We can go one step further than this and make an OSPF area ‘totally stubby’. A totally stubby area will not received Type 3,4 and 5 LSAs or a better way of understanding it, will not receive any external routes or Inter-area routes. (Known routes in other OSPF areas with the Autonomous System)

We already know that type 5 LSAs are routes learned by route redistribution. Type 3 and 4 LSAs are generated by the ABRs flooding LSU updates into other areas. When an area is made totally stubby, we have the same overall objective as a stub, but it is just one step further with the overall efficiency. By filtering out LSA types 3, 4 and 5 we will make the routing table very neat and tidy. 🙂

Not So Stubby Area

There is where things get a little nuts. A Not So Stubby Area or an NSSA bends the rules.. Let me explain.. The overall goal of a NSSA is to still receive the external routes or Type 5 LSAs… all Type 3 and 4 LSA types for inter area routes will not be flooded into a NSSA. However as we know these LSA types are not flooded into a stub area, the LSA itself is flooded into the area as a Type 7 LSA. A Type 7 LSA is unique to a NSSA and is the end product of a route learned by redistribution. This will appear in the routing table as a N1 or N2 route. These Type 7 LSA is overall the same routing update as a Type 5 LSA, but is flooded as a Type 7… These LSA TYpe 7s are flooded into the NSSA by the ASBR, as this is the router performing route redistribution.

Not So Stubby Total Stubby Area

🙂 Your taking the mick right…..? Seriously! Ok this way is also way more nuts than a NSSA. 🙂 Here we go then.. These area types are extremely rare in the real world and hopefully in the CCIE. 🙂 A NSSTSA (!!!!) is a further extension of the NSSA, in the NSSA we already know that Type 7 LSAs exist, but no Type 3 or 4. However when the area is made a NSSTSA, summary TYpe 3 and 4 LSA types will not be flooded into this area and as a result a default route will now be added in addition to the N2 or N1 NSSA routes.


To be honest no matter how many times I try and explain OSPF stub areas and LSA types to people and myself it always sounds a little confusing. OSPF is a monster routing protocol as it is and these are the icing on the cake. 🙂 I look forward to plenty more of this in the CCIE. 🙂 Woah……! At the NP level I want to really start to master these, so I will keep coming back to them and hopefully when I step into the CCIE material I will be fairly solid with these concepts. It will be handy to actually start the CCIE workbooks and get more hands on experience in configuring OSPF areas I think that experience is truly the only way for this to permanently sink in.

An OSPF and EIGRP thought..

To truly refresh my mind on all of the NP high points to both OSPF and EIGRP, I have decided to create ‘flashcards’ for each topic. The idea is every now and then to have a glance, to ensure all the concepts are taken in before stepping into the IE material. More to follow!