Archive for the ‘ospf’ Category

Multiple Area OSPF Networks on Cisco – Part 2 of 2

Friday, January 30th, 2009

Had a nice week everyone? I’ve been writing a lot and working a lot, but anyways here is part 2 of 2!

Link State Database / Topology Table
What’s that? you may ask – maybe only because I forgot to mention it in the previous article, well it’s a database which contains data on how the routers ‘see’ the network topology (link states), all the routers in an AS will have a copy of this table.
This table is getting changed as the network topology changes, as for example if a prefix is moved or an interface goes down.

One time during this week I suddenly realized that I should probably mention that OSPF supports VLSM (Variable length Subnet Masks), that some people still stick to the usage of routing protocols that does not support VLSM is way beyond my understanding.

LSAs and LSA Types
There are 7 types of LSA (Link state advertisements) in OSPF;

  1. Router Link Advertisements, generated by each router and is flooded in a single area.
  2. Network Link Advertisements, flooded throughout the network and is generated by the DRs. Describes a set of routers connected to a network.
  3. Type 3 are summary link advertisements. These are generated by the Area Border Routers and describes Inter-area routes, generating a quad zero route by the command default information originate also generates a type 3 LSA.
  4. Type 3 and type 4 is very often described at the same time, the type 4 LSA describes routes to an ASBR.
  5. These are generated by the ASBR, and describes routes that are redistributed into OSPF from AS’s or routing protocols.  These are flagged in the routing table with O E1 and O E2 (external type 1 or 2) and are flooded to all areas except for stub areas.
  6. Group membership link entry LSAs are generated by multicast OSPF routers.
  7. Type 7 LSAs are only flooded to not-so-stubby-areas and are generated by ASBRs. When external routes are injected to areas other than the backbone area 0 are type 7, these are converted to type 5 by area border routers before they are injected into the backbone area.

Route summarization
My feeling is that at least once (a day?) in every network administrators life they’d wish the routing table was smaller and had a bunch of fewer prefixes, but what can we do?

We can use route summarization to make the routers summarize all routes in an area.

The configuration is as follows

Router(config-router)# network area 0
Router(config-router)# network area 1
Router(config-router)# area 0 range
Router(config-router)# area 1 range

This router will act as an area border router (ABR) between area 0 and area 1, the area areaid range command tells the router to summarize all routes that area to that summary address before advertising them in another area.

Multiarea OSPF Configuration on Cisco IOS

The scenario are 4 routers, preconfigured with IP addresses and daisy chained.
R1: Area 0
R2: Area 0
R3: Area 0 and area 1
R4: Area 1

Area 0 =
Area 1 =

We will use route summarization.

To configure R3 to be both in area 0 and area 1, let us say we use /30-ranges for connecting the routers.

R3(config-router)#network area 0
R3(config-router)#network area 1
R3(config-router)#area 0 range
R3(config-router)#area 1 range

Configure all the other routers as usual, but R4 should be configured as only area 1.
I configured all routers to redistribute connected and static subnets.

To verify that you see the area 1 as instead of (now)

R1#sh ip route
Gateway of last resort is not set is variably subnetted, 2 subnets, 2 masks
C is directly connected, FastEthernet0/0
O IA [110/2] via, 00:01:56, FastEthernet0/0

There you go!

Multiple Area OSPF Networks on Cisco – Part 1 of 2

Sunday, January 18th, 2009

Multi-area OSPF networks are widely used, in this article I am going to show some of the logic behind multi-area OSPF Networks. I will write a series of all 2 (yey!) posts about multiple area OSPF the next couple of weeks. Stay tuned in!

Single areas can be considered subsets of a larger autonomous system.

What are the benefits of splitting networks up in multiple areas?

You can solve situations like

  1. Every time a route flaps, it initiates shortest-path-first algorithm calculations on all routers in that area.
    This causes high CPU utilization that could be used for something more productive.
  2. The routing table is getting too large and equipment that can handle less IPv4 routes will have trouble operating.
  3. The Link-state Topology table (we will get back to this) is getting unmanageable.

Terms and definitions
There are some terms and definitions that you should know:

  1. Backbone area / Transit area / area 0
    This refers to the area with area id 0, which can be a group of routers acting as the main path for traffic between OSPF areas.
  2. ABR
    Area Border Router, technically – a router that is connected to area 0 and at least another area, and therefore maintains two link-state databases are considered ABRs.
  3. ASBR
    Autonomous System Border Router is a router that are between the OSPF network and another routing protocol network, for example BGP or IGRP.
  4. IR
    Internal router, this type have all its interfaces connected to a single area.

You should be familiar with terms like LSU, LSA and the different types.

This IMPORTANT rule applies to multiarea OSPF networks:
All areas needs to be connected to area 0, if it is impossible to physically connect an area directly to area 0, you can utilize a virtual-link to create a logical path for the traffic from this area to reach the backbone area.

Different area types

  1. Standard/normal area
    A default route (0/0) is generally not generated by routers in a normal area, but it can be forced with this command under router ospf

    Router( config-router)# default-information originate always

    Normal areas (like in single area setups) can receive external route information, link updates and route summaries.

  2. Stub area
    While stub areas can’t receive external routes, they can receive inter-area routes, intra-area routes and default routes.

  3. Totally stubby area
    This area does not receive summary routes from other areas in the network, and it does not receive external routes. To reach networks outside the area it will always use the default route (0/0)
  4. Not So Stubby Area (NSSA)
    This is a stubby area which can receive a part of external routes from outside the AS.
    The LSA it can receive is Type 7 LSA.

  5. Backbone area
    ..or “transit area” always has the area id 0, every other area must have a link to area 0. Either physically or via a logical ‘virtual-link’.
  6. That was the area types, these are defined under the router ospf configuration.
    So, every 30 minute all the OSPF routers floods the area with so called LSU (Link state updates) just to make sure that every router in that area agree about the link state database. These LSUs are received by the other routers and flooded across the area until all the routers agree about the current link-state database.

    Network events and LSA flooding
    When an event happens, for example an interface goes down; the router will send a LSA and a LSU packet to – the multicast address for the BR and BDR – which in turn will flood this packet out on all their active interfaces on the multicast address – which is the multicast address that all routers should listen on, and they will then do the same until the network agrees about the topology and is so called ‘converged’.

    In my next post I will cover the configuration and route summarization and LSA types.

    Have a nice OSPF Sunday!