Monday, August 5, 2013

OSPF Review - especially stub zones

I've had OSPF on my list of important things to re-learn.  I had a pretty decent grasp of it a few years back, but simply haven't had much use of it in the field and need to go back over the particulars.  I remember there being questions and an interactive problem on the exam regarding a stub zone the first time I took the exam, so I want to be prepared.

So here goes, narrative on OSPF:

OSPF was developed in 1988 to address the scalability issues of RIP.  Where RIP is classful, OSPF is completely classless - so the subnet mask is sent along with every network of which OSPF is aware.  This resolves the problems with dis-contiguous networks, as each subnet and subnet mask is placed into the topology table, however, this can lead to increased router resource consumption.

OSPF will run Dijkstra's Shortest Path First (SPF) algorithm on each network as it arrives on the router. This can cause heavy load on the router if there are a large number of routers in the autonomous system, especially when a link rapidly goes up and down, which is called "link flapping."  Each router will receive an update each time the link changes state.

To minimize the effect of link state updates over a large network, OSPF breaks the autonomous systems into areas.  Routers that link multiple areas are called Area Border Routers (or ABR) and these routers have the responsibility to summarize routes within their area and present them to adjacent areas.  If there is a link failure within a summarized network, only the affected area is updated and the adjacent areas using the summary route are completely unaffected.

Area 0 is known as the backbone router, and all networks must be connected to the backbone in some way.  Routers that are either completely inside area 0 or have an interface in area 0 are known as "backbone routers."  The backbone is typically composed of fast network connections (100/1000 Mb/sec) because all interconnected areas send their traffic through it.  Routers that have an interface in are 0 and another area are ABRs for that connected area.

A stub area is used to minimize the amount of traffic and utilization on routers where a single path in and out of the area exists.  The stub area is an area where there is only one path in or out of the network.  This reduces the amount of information in the topolgy table, because the ABR replaces any routes learned through it with a default route to itself and advertises that default route to the other routers within that area.  Because area 0 is an interconnecting area, it can never be configured as a stub area.  All routers within the stub area must have it defined using the stub keyword, such as:

R1(config-router)#area 51 stub

Once configured as a stub on all routers, the routers that are not ABR have their gateway of last resort set, where they had none before the stub configuration.

OSPF path cost is calculated using Dijkstra's SPF algorithm, which is 10^8 divided by the link bandwidth in bps.  Therefore, costs to know are:

1 Gbs - cost 1
100 Mbs - cost 1
10 Mbs - cost 10
E1 - cost 48
T1 - cost 64
64K - cost 1562
56K -  cost 1785

Path cost is determined by adding all costs between two endpoints, and SPF will put the route with the lowest cost into the routing table.

I'll intend to lab this up tonight or tomorrow, and will have more thoughts on it.

No comments:

Post a Comment