OSPF Configuration Part 5 : Areas & Area Border Routers

In order to demonstrate the efficient usage of OSPF areas we would make quite a change to the previous scenario we
had, we would remove the eth1 interface on R2 pointing to the 20.20.20.0 network.

OSPF Network Scenario

Figure 1 - Network Scenario

In this scenario R4 would be in area 1.1.1.1 and R1 and R2 would be residing on area 0.0.0.0 (backbone area) and
finally R3 would be our area border router which connects the two areas 0.0.0.0 and 1.1.1.1 together. Remember
that all other areas excluding area zero (which is the backbone area itself) should be directly connected to the
backbone area, so if you plan to extend the network and create more areas make sure all areas are directly
connected to the backbone via an area border router.
Lets configure eth0 and lo (loopback interface) on R4 to be in area 1.1.1.1 and also eth1 on R3 to be configured
as an interface in the 1.1.1.1 area, if you have followed the steps from the very beginning you should possibly
change some configurations before proceeding to the next step so lets take a look at our prerequisites
Removing the eth1 interface on R2
In case of using Vyatta and VMware you can disable the interface or even remove it while the router is in shutdown
mode, remove the relevant interface from ospf:

vyatta@r2# delete protocols ospf area 0.0.0.0 network 10.10.10.0/24
vyatta@r2# commit

Let’s configure R3 and R4 with the new area:

vyatta@r4# set protocols ospf area 1.1.1.1
vyatta@r4# set protocols ospf area 1.1.1.1 network 20.20.20.0/24
vyatta@r4# set protocols ospf area 1.1.1.1 network 127.4.4.0/24
vyatta@r4#commit


vyatta@r3# set protocols ospf area 1.1.1.1 network 20.20.20.0/24
vyatta@r3# commit


Now after we have configured our network with the new area let’s take a look at our databases on R3 and see the
effect it would have to simplify our database. (You may well know that the reason we use areas in OSPF is to limit
the scope of route information distribution thus reducing the size of our LSA databases over the network.)
We have printed out the ospf database on R4 in 5 different intervals:
First: right after we configured the R4 router with the new area 1.1.1.1
Second: quite a couple of minutes later which we just left the network idle to see how the LSADB would react
Third: normally LSA entries age out after 3600 seconds, in this interval LSA’s not being used anymore are going to
be aged-out.
Fourth: previous router LSA’s have aged out but there is one remaining LSA which belongs to the loopback interface
of R4 and is considered to be in the 0.0.0.0 area, well although we know that this loopback interface is no longer
in this area and there are no links attached to it, this LSA would remain in the LSA DB until the next reboot in
case any changes occur.
Fifth: after the final reboot

FIRST INTERVAL
vyatta@r4:~$ show ip ospf database
OSPF Router with ID (127.4.4.4)
Router Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# CkSum Link count
10.10.10.2 10.10.10.2 1457 0x80000001 0xb7cb 1
127.1.1.1 127.1.1.1 1389 0x80000004 0x0463 2
127.2.2.2 127.2.2.2 1389 0x80000005 0xc19a 2
127.3.3.3 127.3.3.3 1382 0x80000003 0xd1e9 3
127.4.4.4 127.4.4.4 923 0x80000006 0xa79f 0
Net Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# CkSum
10.10.10.1 127.1.1.1 1389 0x80000002 0xf52d
Router Link States (Area 1.1.1.1)
Link ID ADV Router Age Seq# CkSum Link count
127.3.3.3 127.3.3.3 868 0x80000003 0xd4e2 1
127.4.4.4 127.4.4.4 863 0x80000002 0x1fed 2
Net Link States (Area 1.1.1.1)
Link ID ADV Router Age Seq# CkSum
20.20.20.3 127.3.3.3 869 0x80000001 0xbac3
Summary Link States (Area 1.1.1.1)
Link ID ADV Router Age Seq# CkSum Route
10.10.10.0 127.3.3.3 1112 0x80000001 0xab01 10.10.10.0/24
127.1.1.1 127.3.3.3 1112 0x80000001 0xde5f 127.1.1.1/32
127.2.2.2 127.3.3.3 1112 0x80000001 0xbd7d 127.2.2.2/32

SECOND INTERVAL
vyatta@r4:~$ show ip ospf database
OSPF Router with ID (127.4.4.4)
Router Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# CkSum Link count
10.10.10.2 10.10.10.2 1983 0x80000001 0xb7cb 1
127.1.1.1 127.1.1.1 1915 0x80000004 0x0463 2
127.2.2.2 127.2.2.2 1914 0x80000005 0xc19a 2
127.3.3.3 127.3.3.3 1908 0x80000003 0xd1e9 3
127.4.4.4 127.4.4.4 1449 0x80000006 0xa79f 0
Net Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# CkSum
10.10.10.1 127.1.1.1 1915 0x80000002 0xf52d
Router Link States (Area 1.1.1.1)
Link ID ADV Router Age Seq# CkSum Link count
127.3.3.3 127.3.3.3 1394 0x80000003 0xd4e2 1
127.4.4.4 127.4.4.4 1389 0x80000002 0x1fed 2

Net Link States (Area 1.1.1.1)
Link ID ADV Router Age Seq# CkSum
20.20.20.3 127.3.3.3 1395 0x80000001 0xbac3
Summary Link States (Area 1.1.1.1)
Link ID ADV Router Age Seq# CkSum Route
10.10.10.0 127.3.3.3 94 0x80000002 0xa902 10.10.10.0/24
27.1.1.1 127.3.3.3 525 0x80000002 0xdc60 127.1.1.1/32
127.2.2.2 127.3.3.3 295 0x80000002 0xbb7e 127.2.2.2/32


THIRD INTERVAL
vyatta@r4:~$ show ip ospf database
OSPF Router with ID (127.4.4.4)
Router Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# CkSum Link count
127.1.1.1 127.1.1.1 3600 0x80000004 0x0463 2
127.2.2.2 127.2.2.2 3600 0x80000005 0xc19a 2
127.3.3.3 127.3.3.3 3600 0x80000003 0xd1e9 3
127.4.4.4 127.4.4.4 1343 0x80000007 0xa5a0 0
Net Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# CkSum
10.10.10.1 127.1.1.1 3600 0x80000002 0xf52d
Router Link States (Area 1.1.1.1)
Link ID ADV Router Age Seq# CkSum Link count
127.3.3.3 127.3.3.3 1289 0x80000004 0xd2e3 1
127.4.4.4 127.4.4.4 1283 0x80000003 0x1dee 2
Net Link States (Area 1.1.1.1)
Link ID ADV Router Age Seq# CkSum
20.20.20.3 127.3.3.3 1289 0x80000002 0xb8c4
Summary Link States (Area 1.1.1.1)
Link ID ADV Router Age Seq# CkSum Route
10.10.10.0 127.3.3.3 1789 0x80000002 0xa902 10.10.10.0/24
127.1.1.1 127.3.3.3 468 0x80000003 0xda61 127.1.1.1/32
127.2.2.2 127.3.3.3 158 0x80000003 0xb97f 127.2.2.2/32

FOURTH INTERVAL
vyatta@r4:~$ show ip ospf database
OSPF Router with ID (127.4.4.4)
Router Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# CkSum Link count
127.4.4.4 127.4.4.4 1430 0x80000007 0xa5a0 0
Router Link States (Area 1.1.1.1)
Link ID ADV Router Age Seq# CkSum Link count
127.3.3.3 127.3.3.3 1376 0x80000004 0xd2e3 1
127.4.4.4 127.4.4.4 1370 0x80000003 0x1dee 2
Net Link States (Area 1.1.1.1)
Link ID ADV Router Age Seq# CkSum
20.20.20.3 127.3.3.3 1376 0x80000002 0xb8c4
Summary Link States (Area 1.1.1.1)
Link ID ADV Router Age Seq# CkSum Route
10.10.10.0 127.3.3.3 15 0x80000003 0xa703 10.10.10.0/24
127.1.1.1 127.3.3.3 555 0x80000003 0xda61 127.1.1.1/32
127.2.2.2 127.3.3.3 245 0x80000003 0xb97f 127.2.2.2/32

FIFTH INTERVAL
vyatta@r4:~$ show ip ospf database
OSPF Router with ID (127.4.4.4)
Router Link States (Area 1.1.1.1)
Link ID ADV Router Age Seq# CkSum Link count
127.3.3.3 127.3.3.3 146 0x8000000b 0xcedf 1
127.4.4.4 127.4.4.4 146 0x80000008 0x29dc 2
Net Link States (Area 1.1.1.1)
Link ID ADV Router Age Seq# CkSum
20.20.20.4 127.4.4.4 146 0x80000001 0x9bde
Summary Link States (Area 1.1.1.1)
Link ID ADV Router Age Seq# CkSum Route
10.10.10.0 127.3.3.3 345 0x80000005 0xa305 10.10.10.0/24
127.1.1.1 127.3.3.3 855 0x80000005 0xd663 127.1.1.1/32
127.2.2.2 127.3.3.3 625 0x80000005 0xb581 127.2.2.2/32



Now as you see our database only includes LSA entries in the 1.1.1.1 area and we also have 3 new link state
advertisements which are type 3 LSA known as the summary LSA’s these LSA’s are generated by the ABR’s (area border
routers) namely R3 which is actually connecting the 1.1.1.1 area to the 0.0.0.0 area.
As you see the entries in our routing table have reduced significantly (from 9 entries to 6 entries and we don’t
need to include all LSA’s in other areas in our database) and therefore resulting into a remarkable decrease in
CPU usage, network traffic and local resources.

Now let’s take a look at R3 OSPF database (lines which should draw your attention have been marked with a bold
font-size)
vyatta@r4:~$ show ip ospf
OSPF Routing Process, Router ID: 127.4.4.4
Supports only single TOS (TOS0) routes
This implementation conforms to RFC2328
RFC1583Compatibility flag is disabled
OpaqueCapability flag is disabled
Initial SPF scheduling delay 200 millisec(s)
Minimum hold time between consecutive SPFs 1000 millisec(s)
Maximum hold time between consecutive SPFs 10000 millisec(s)
Hold time multiplier is currently 2
SPF algorithm last executed 10m24s ago
SPF timer is inactive
Refresh timer 10 secs
Number of external LSA 0. Checksum Sum 0x00000000
Number of opaque AS LSA 0. Checksum Sum 0x00000000
Number of areas attached to this router: 1
Adjacency changes are logged
Area ID: 1.1.1.1
Shortcutting mode: Default, S-bit consensus: no
Number of interfaces in this area: Total: 2, Active: 2
Number of fully adjacent neighbors in this area: 1
Area has no authentication
Number of full virtual adjacencies going through this area: 0
SPF algorithm executed 5 times
Number of LSA 6
Number of router LSA 2. Checksum Sum 0x0000f8bb
Number of network LSA 1. Checksum Sum 0x00009bde
Number of summary LSA 3. Checksum Sum 0x00022ee9
Number of ASBR summary LSA 0. Checksum Sum 0x00000000
Number of NSSA LSA 0. Checksum Sum 0x00000000
Number of opaque link LSA 0. Checksum Sum 0x00000000
Number of opaque area LSA 0. Checksum Sum 0x00000000


Now that we have 2 different areas, executing the border-routers command in any area should result to R3 where it
acts as the ABR.
From R4
vyatta@r4:~$ show ip ospf border-routers
============ OSPF router routing table =============
R 127.3.3.3 [10] area: 1.1.1.1, ABR
via 20.20.20.3, eth0

From R1
vyatta@r1:~$ show ip ospf border-routers
============ OSPF router routing table =============
R 127.3.3.3 [10] area: 0.0.0.0, ABR
via 10.10.10.3, eth0

First take a look at the DR/BDR election and then see which routers have been elected as DR’s & BDR’s
vyatta@r3:~$ show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface RXmtL RqstL DBsmL
127.1.1.1 1 Full/DR 30.939s 10.10.10.1 eth0:10.10.10.3 0 0 0
127.2.2.2 1 Full/DROther 37.851s 10.10.10.2 eth0:10.10.10.3 0 0 0
127.4.4.4 1 Full/DR 31.348s 20.20.20.4 eth1:20.20.20.3 0 0 0

vyatta@r2:~$ show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface RXmtL RqstL DBsmL
127.1.1.1 1 Full/DR 38.925s 10.10.10.1 eth0:10.10.10.2 0 0 0
127.3.3.3 1 Full/Backup 30.363s 10.10.10.3 eth0:10.10.10.2 0 0 0


Now as you see based on the re-elections states have been changed R1is now known as the designated router in the
0.0.0.0 area R4 is also the designated router but in the 1.1.1.1 area R2 remains as DROther and R3 has changed its
state to serving both areas as the backup designated router.
For example on R1 this is what we had as the database before we created the 1.1.1.1 area

vyatta@r1:~$ show ip ospf database
OSPF Router with ID (127.1.1.1)
Router Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# CkSum Link count
127.1.1.1 127.1.1.1 258 0x8000000a 0x0c53 2
127.2.2.2 127.2.2.2 908 0x80000012 0x981e 3
127.3.3.3 127.3.3.3 907 0x8000000b 0xcbe6 3
127.4.4.4 127.4.4.4 903 0x8000000e 0x07f9 2

Net Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# CkSum
10.10.10.3 127.3.3.3 251 0x80000003 0xb564
20.20.20.3 127.3.3.3 907 0x80000006 0xbb34



After we created the 1.1.1.1 area things were about to change, our DR/BDR’s changed relatively, the LSA entries
changed as well, in the new ospf database of R1 we discovered 3 different types of link states, lets take a look
at them:
vyatta@r1:~$ show ip ospf database
OSPF Router with ID (127.1.1.1)
Router Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# CkSum Link count
127.1.1.1 127.1.1.1 1100 0x80000008 0xfb67 2
127.2.2.2 127.2.2.2 1097 0x80000009 0xb99e 2
127.3.3.3 127.3.3.3 820 0x80000009 0xbb91 2
Net Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# CkSum
10.10.10.1 127.1.1.1 1100 0x80000006 0xed31
Summary Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# CkSum Route
20.20.20.0 127.3.3.3 822 0x80000001 0x424c 20.20.20.0/24
127.4.4.4 127.3.3.3 808 0x80000001 0x7bb9 127.4.4.4/32


first ones are the router link states which are advertised by the routers in the area 0.0.0.0 which are namely R1,
R2 & R3 we also have the network link states which have been generated by the designated router in area 0.0.0.0
which is R1 and also some summary link states which have been advertised by the area border router which namely is
R3 and allows the router to calculate routes to 1.1.1.1 area.
at that moment the R3 router was responsible to be the DR so it was advertising the network link state
advertisements but based on the new area structure and the new re-election R3 is no longer the DR and its state
has changed to BDR, in this case R1 and R4 are the DR’s relatively in each area and would advertise network link
states
Let’s take a look at the R3 database which includes both databases on area 0.0.0.0.0 and also area 1.1.1.1

vyatta@r3:~$ show ip ospf database
OSPF Router with ID (127.3.3.3)
-----------------------------Router Link States (Area 0.0.0.0) ----------------------------------------------------
Link ID ADV Router Age Seq# CkSum Link count
127.1.1.1 127.1.1.1 321 0x80000011 0xe970 2
127.2.2.2 127.2.2.2 317 0x80000012 0xa7a7 2
127.3.3.3 127.3.3.3 39 0x80000012 0xa99a 2
Net Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# CkSum
10.10.10.1 127.1.1.1 321 0x8000000f 0xdb3a
Summary Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# CkSum Route
20.20.20.0 127.3.3.3 1456 0x80000009 0x3254 20.20.20.0/24
127.4.4.4 127.3.3.3 385 0x8000000a 0x69c2 127.4.4.4/32
-----------------------------Router Link States (Area 1.1.1.1)----------------------------------------------------
Link ID ADV Router Age Seq# CkSum Link count
127.3.3.3 127.3.3.3 36 0x80000014 0xbce8 1
127.4.4.4 127.4.4.4 30 0x80000011 0x17e5 2
Net Link States (Area 1.1.1.1)
Link ID ADV Router Age Seq# CkSum
20.20.20.4 127.4.4.4 30 0x8000000a 0x89e7
Summary Link States (Area 1.1.1.1)
Link ID ADV Router Age Seq# CkSum Route
10.10.10.0 127.3.3.3 305 0x8000000e 0x910e 10.10.10.0/24
127.1.1.1 127.3.3.3 895 0x8000000e 0xc46c 127.1.1.1/32
127.2.2.2 127.3.3.3 485 0x8000000e 0xa38a 127.2.2.2/32


Now as you see in area 0.0.0.0 R1 (127.1.1.1) has attempted to advertise link states in its own area and
relatively R4 (127.4.4.4) in the 1.1.1.1 area has advertised the network link state advertisement.
Let’s take a look at the ospf route command on R4 and discuss some of the new entries.
N: marks the Network Routes - R: marks the Router Routes - IA: marks the Inter-Area Routes: When a route crosses
an OSPF Area Border Router (ABR), the route is known as an OSPF Inter-Area route.

vyatta@r4:~$ show ip ospf route
============ OSPF network routing table ============
N IA 10.10.10.0/24 [20] area: 1.1.1.1
via 20.20.20.3, eth0
N 20.20.20.0/24 [10] area: 1.1.1.1
directly attached to eth0
N IA 127.1.1.1/32 [30] area: 1.1.1.1
via 20.20.20.3, eth0
N IA 127.2.2.2/32 [30] area: 1.1.1.1
via 20.20.20.3, eth0
============ OSPF router routing table =============
R 127.3.3.3 [10] area: 1.1.1.1, ABR
via 20.20.20.3, eth0
============ OSPF external routing table ============



CONTINUE TO PART 6 - AUTONOMOUS SYSTEM BORDER ROUTERS