Configuring OSPF with multiple areas

If you need to give your routers' routing tables a rest, take a look at EIGRP. Oh, but wait. Your network has routers from different vendors so you can't use EIGRP! Never fear, Todd Lammle is here to help you configure OSPF.

Open Shortest Path First (OSPF) is a fast, strong routing protocol that can be used effectively in large, multivendor routed networks. Remember from my last Daily Drill Down ”Getting to know OSPF” that if you have all Cisco routers, you’ll be better off running Enhanced IGRP (EIGRP). EIGRP is a Cisco proprietary protocol that runs great in very small to very large Cisco networks, but it will not work in networks with multivendor routers.

As hard as this may be to believe, not all networks have all Cisco routers (no!), and a routing protocol must be used that can work in a large internetwork with multiple router vendors. OSPF has this capability, but unfortunately, it is much harder to configure than EIGRP in a larger network.

OSPF in multiple areas
“Getting to know OSPF” focused on the basics of OSPF and how to configure OSPF in a single area. Remember that OSPF must have an area 0 and that any other area must connect to area 0.

I’ll use the same network here I used in that Daily Drill Down. See Figure A for a review of the network. We’ll use the same IP addresses, but each Ethernet network will be in a different OSPF area (except the Ethernet network off of the 1005A router, since that router does not run OSPF).

Figure A

Typically, you will not use your WAN network as area 0, but this network will still work as an example of a multiple area OSPF network.

Configuring multiple area OSPF networks
Since we are still using the same IP addresses from my last Daily Drill Down, I’ll just remove OSPF on the 2500C, D, and E routers and then reconfigure OSPF. This is the easiest option. The 1005A and 2500B routers do not need to be configured since they are already running EIGRP between each other and we have already redistributed OSPF into EIGRP and EIGRP into OSPF on the 2500B router.

Let’s start by reconfiguring the 2500C router. Interface Ethernet0 is now going to be in area 1, and serial0 will be in area 0. We need to be careful here and use a granular approach when configuring each interface.

Notice the wildcard, which tells the OSPF process 1 to find the IPaddress listed on an active interface and place the found interface into the area listed in the command string.This is the best approach when configuring multiple areas since it would prevent us from accidentally configuring a network range into the wrong area with an overlap.

To configure the 2500D router, we’ll remove OSPF and then place Ethernet0 into area 2 and serial0 into area 0.

I did not have to use the process ID of 34 again; I could have used any number. Remember that the process ID in OSPF is irrelevant. The only time it matters is if you have an Autonomous System Boundary Router (ASBR) (which means that the router connects to two or more Autonomous Systems).

Now, I’ll configure the last router. Router 2500E places Ethernet0 into area 3 and serial0 into the backbone area 0.

Now, let’s take a look at the routing table of the 2500B router, which should show any OSPF inter-area routes.

Cool. Notice that the O IA areas are what the 2500B router is receiving. Here is the 1005A routing table, which looks the same as when we had only one OSPF area. The D EX is a route received from an external AS.

Verifying OSPF
It is important to understand the command used to verify OSPF. The first command you typically will use is the show ip route command, but since we already covered that in the previous Daily Drill Down, we will use the more advanced OSPF commands here instead.

From the 2500B router, the command show ip ospf neighbor command will show us this.

Notice the first thing shown is the RID of each neighbor. This is the highest IP address of each router. This is important because the highest RID decides which router is the Designated Router (DR) for each area.

From the 2500C router, here is the show ip ospf interface command. Notice that it shows the RID of the router under each interface as well as the area each interface is assigned. The hello time is shown as 10 and the dead time as 40 seconds. If the 2500B does not hear a hello message from a neighbor router in four update periods, it will consider that neighbor dead.

Another thing to notice from this output is the network type. By default, a LAN interface will be broadcast network type and a WAN interface will be point-to-point.

OSPF area types
The reason you would create multiple area types is to avoid overwhelming routers with a huge routing table and topology database when they do not need to understand this information.

To reduce router overhead in a large OSPF network, you can create different types of areas. In the example above, I created what was called a standard area. This is an area that is connected to the backbone, and the Area Border Router (ABR) communicates to the routers in the internal area.

Another type of area that can be used is called a stub area. This reduces router overhead since the ABR will only send a default route to the internal routers in the area.

If you have an entirely Cisco network, you can use what is called a totally stubby area, which will reduce the overhead associated with OSPF further. The totally stubby area does not receive type 5 LSAs, which means that external routes will not be advertised into the area, only a default route, just like a stub route. However, the totally stub area will not receive summary routes from the ABR; the stub network will. (Understand that this is Cisco proprietary.)

If you wanted to create a stub network that does not receive summary routes but that does receive external redistributed routes, then you would use the not-so-stubby area (NSSA).

Configuring area types
In this section, I will show you how to configure each type of area. Configuring a stub area is pretty simple. From the ABR, just use the area 1 stub command. For example, on the 2500C router, you would use this command.

We cannot verify this command, because we would need another router within area 1 to check the routing table. If we did have a router in area 1, that router would now only receive a default route to the ABR. This is used to save memory on internal area routers because the internal routers will not have to have all routes to all networks in the routing table. They only need the path out of the area.

To configure a totally stubby area, where a summary route will not be advertised to internal routers in an area, we use this command, demonstrated on 2500D.

The internal routers that would be in area 2 would now receive a default route out of the area, but they would not receive any summary routes, while area 1 would still receive summary routes.

The last type of area to configure is an NSSA. Basically, we are trying to get an OSPF area to receive only redistributed routes from another protocol. By default, it would receive summary route updates and redistributed routes. There are some circumstances when we want to only receive either a summary route or a redistributed route. Here is the configuration, as demonstrated on the 2500E router.

Any router in the internal area 3 would now receive a default route with a path out of the area, as well as any redistributed routes being advertised on the network.

Creating a totally stubby area is the most common choice in a Cisco environment since receiving redistributed routes is not going to provide you anything that a totally stubbed area won’t provide.

OSPF can work well in a large network environment where you have multiple router vendors (a typical situation when you have a large network environment). It would be hard to find a huge network that has only Cisco routers. If you did have only Cisco routers, then EIGRP would be the better choice since it can now create stub areas like OSPF and is very easy to configure and run.

Remember that creating stub areas is very important in large networks because the memory involved in large OSPF configurations is immense. By creating a stub network, you can effectively have smaller routers with low memory participate in a very large OSPF network.

Editor's Picks

Free Newsletters, In your Inbox