0% found this document useful (0 votes)
24 views22 pages

Share 'OSPF Fundamental Terminology Explained

This document provides a comprehensive overview of OSPF (Open Shortest Path First) terminology, including key concepts such as AS numbers, areas, and link-state advertisements (LSAs). It discusses the advantages and disadvantages of OSPF, its hierarchical area structure, and the different types of areas (standard, stub, totally stubby, and not-so-stubby). Additionally, it explains the neighbor discovery process, router ID selection, and the states that OSPF routers go through to establish neighbor relationships.

Uploaded by

Mazidul Islam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views22 pages

Share 'OSPF Fundamental Terminology Explained

This document provides a comprehensive overview of OSPF (Open Shortest Path First) terminology, including key concepts such as AS numbers, areas, and link-state advertisements (LSAs). It discusses the advantages and disadvantages of OSPF, its hierarchical area structure, and the different types of areas (standard, stub, totally stubby, and not-so-stubby). Additionally, it explains the neighbor discovery process, router ID selection, and the states that OSPF routers go through to establish neighbor relationships.

Uploaded by

Mazidul Islam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 22

1

OSPF Fundamental Terminology Explained


This tutorial explains OSPF terminology (AS Number, Public AS Numbers, Private AS Numbers, Area,
Backbone, Area off Backbone, ABR, IR, Link, State, LSA and LSDB) including basic concepts of OSPF
routing protocol, advantage & disadvantage of OSPF and difference between AS and Area in detail with
examples.
OSPF stands for Open Shortest Path First. OSPF is a link state open standard based routing protocol. It
was created in mid-1980. Since it is based on open standard, we can use it with any vendor’s router.
Features and advantage of OSPF

 It supports both IPv4 and IPv6 routed protocols.


 It supports load balancing with equal cost routes for same destination.
 Since it is based on open standards, it will run on most routers.
 It provides a loop free topology using SPF algorithm.
 It is a classless protocol.
 It supports VLSM and route summarization.
 It supports unlimited hop counts.
 It scales enterprise size network easily with area concept.
 It supports trigger updates for fast convergence.
Just like other routing protocols, OSPF also has its negatives.
Disadvantage of OSPF

 It requires extra CPU process to run SPF algorithm.


 It requires more RAM to store adjacency topology.
 It is more complex to setup and hard to troubleshoot.
Difference between AS and Area concept
Area concept is a feature of OSPF. It is limited only with OSPF. We cannot use it with other routing
protocol.
AS is an independent concept originally defined in RFC 1771. We can use it with any routing protocols
which understand its concept.
2
3

AS
An AS is a group of networks running under a single administrative control. This could be our company
or a branch of company. Just like Subnetting AS is also used to break a large network in smaller
networks.
AS creates a boundary for routing protocol which allow us to control how far routing information should
be propagated. Beside this we can also filter the routing information before sharing it with other AS
system. These features enhance security and scalability of overall network.
Basically AS concept was developed for large networks. Routing protocols which were developed for
small networks such as RIP do not understand the concept of AS systems.
There are two types of routing protocols IGP and EGP.
IGP (Interior Gateway Protocol) is a routing protocol that runs in a single AS such as RIP, IGRP, EIGRP,
OSPF and IS-IS.
EGP (Exterior Gateway Protocol) is a routing protocol that performs routing between different AS
systems. Nowadays only BGP (Border Gateway Protocol) is an active EGP protocol.
To keep distinguish between different autonomous systems, AS numbers are used. An AS number starts
from 1 and goes up to 65535. Same as IP addresses, AS numbers are divided in two types; Private and
public.
Public AS Numbers: - We only need to use public numbers if we are going to connect our AS with
Internet backbone through the BGP routes from Internet. IANA (Numbers Authority) controls the public
AS numbers.
Private AS Numbers: - Private AS numbers are used to break our internal network into the smaller
networks. We can use any valid AS number in our network unless we connect it with public network. In
above example we used two AS numbers 10 and 20 to divide our company network.
In OSPF implementation, routers which connect two different ASes are known as autonomous system
boundary router (ASBR). In an OSPF network any router can become ASBR.
Area
OSPF implements two levels hierarchy with areas: backbone and area off backbone.
Backbone
Backbone is the central point of this implementation. Routers running in this area required to maintain a
complete database of entire network. All areas need to connect with this area through a physical link or
via a virtual link if physical link is not possible.
Area off backbone
Area off backbone is the extension of backbone. Routes running in this area required to maintain an
area specific database instead of complete database. This is a cool feature. It will speed-up the
convergence time.
OSPF area types
OSPF uses an hierarchical architecture and build OSPF network with different Areas. There are many
specific Area types that are used with OSPF and these Area types has specific characteristics. So, what
are these areas? General OSPF Area types are:
OSPF relies on several types of Link State Advertisements (LSAs) to communicate link state information
between neighbors. A brief review of the most applicable LSA types:

 Type 1 - Represents a router


 Type 2 - Represents the pseudonode (designated router) for a multiaccess link
 Type 3 - A network link summary (internal route)
 Type 4 - Represents an ASBR
4

 Type 5 - A route external to the OSPF domain


 Type 7 - Used in stub areas in place of a type 5 LSA
Type 1 LSA – also known as router link advertisement (RLA), a Type 1 LSA is sent by every router to other
routers in its area. It contains the router ID (RID), interfaces, IP information, and current interface state.
Note that Type 1 LSAs are flooded only across their own area.
Type 2 LSA – also known as network link advertisement (NLA), a Type 2 LSA is generated by designated
routers (DRs) to send out information about the state of other routers that are part of the same
network. Type 2 LSAs are flooded across their own area only.
Type 3 LSA – also known as summary link advertisement (SLA), a Type 3 LSA is generated by area border
routers (ABRs) and sent toward the area external to the one where they were generated. It contains the
IP information and RID of the ABR that is advertising an LSA Type 3.
Type 4 LSA – informs the rest of the OSPF domain how to get to the ASBR. The link-state ID includes the
router ID of the described ASBR.
Type 5 LSA – also known as AS external link advertisements, a Type 5 LSA is sent by autonomous system
boundary routers (ASBRs) to advertise routes that are external to the OSPF autonomous system and are
flooded everywhere.

LSA types 1 and 2 are found in all areas, and are never flooded outside of an area. Whether the other
types of LSAs are advertised within an area depends on the area type, and there are many:

 Backbone area (area 0)


 Standard area
 Stub area
 Totally stubby area
 Not-so-stubby area (NSSA)
Standard area. Note that the backbone area is essentially a standard area which has been designated as
the central point to which all other areas connect, so a discussion of standard area behavior largely
applies to the backbone area as well.
This Area is the normal Area of OSPF. All Standard Areas must connect to the Area 0. A Standard Area
has no specific characteristics. It accepts, LSA Type 1, Type 2, Type 3, Type 4 and Type 5 LSAs.

Backbone Area (Area 0)


Backbone Area (Area 0) is the central of OSPF Network and all the other Areas are connected to thsese
Backbone Area. It is similar to Standard Area but it is build as Area 0.

Stub Area
Stub Area is the first specific Area. They are generally used to reduce LSA flooding, the LSDB and routing
table size. So, this type of Area is used for the places that is a little sensitive to high traffic.
To configure an Area as “Stub“, all routers in these Area must be configured as “Stub”.
Stub Area accepts Intra Area LSAs, Type 1,Type 2 LSAs. It also accepts, summary routes(Type 3, Type 4)
and external routes (Type 5) advertised only by a Default Route. Stub area does not accept external
routes(Type 5), it is replaced by Default Route.
5

Router(config-router)# area 10 stub

Totally Stubby Area


Totally Stubby Area is one step more strict Area than Stub Area. This is a Cisco Proprietary OSPF Area.
Router(config-router)# area 10 stub no-summary

Not-so-stubby Areas

An NSSA makes use of type 7 LSAs, which are essentially type 5 LSAs in disguise. This allows an ASBR to
advertise external links to an ABR, which converts the type 7 LSAs into type 5 before flooding them to
the rest of the OSPF domain.
An NSSA can function as either a stub or totally stubby area. To designate a normal (stub) NSSA, all
routers in the area must be so configured:
Router(config-router)# area 10 nssa

Summary

 Standard areas can contain LSAs of type 1, 2, 3, 4, and 5, and may contain an ASBR. The
backbone is considered a standard area.
 Stub areas can contain type 1, 2, and 3 LSAs. A default route is substituted for external routes.
 Totally stubby areas can only contain type 1 and 2 LSAs, and a single type 3 LSA. The type 3 LSA
describes a default route, substituted for all external and inter-area routes.
 Not-so-stubby areas implement stub or totally stubby functionality yet contain an ASBR. Type 7
LSAs generated by the ASBR are converted to type 5 by ABRs to be flooded to the rest of the
OSPF domain.
ABR
Area Border Router (ABR) is a bridge between Backbone and Area off backbone. With correct IP
addressing we can summarize routes information on this router.
IR
IR (Internal Router) is a router running in area off backbone. IR only needs to maintain an area centric
local database.
6

Link
Link is an interface running OSPF routing protocol. When we add an interface in OSPF process, it will be
considered as a link.
State
State is the information associated with a link (interface). A link (interface) contains several information
such as IP address, up/down status, subnet mask, type of interface, type of network , bandwidth and
delay. OSFP consider this information as state.
LSA
Link state advertisement (LSA) is data packet. It contains link-state and routing information. OSPF uses it
to share and learn network information.
LSDB
Every OSPF router maintains a Link state database (LSDB). LSDB is collection of all LSAs received by a
router. Every LSA has a unique sequence number. OSPF stores LSA in LADB with this sequence number.
OSPF neighbor discovery
Routers running OSPF need to establish a neighbor relationship before exchanging routing updates.
OSPF neighbors are dynamically discovered by sending Hello packets out each OSPF-enabled interface
on a router. Hello packets are sent to the multicast IP address of 224.0.0.5. If the two neighbors have
compatible OSPF parameters listed in the Hello packets, the neighbor relationship will be formed.
By default, Hello packets are sent out every 10 second on an Ethernet network (this interval is known as
the Hello interval). A Dead interval is four times the value of the Hello interval, so if a router on an
Ethernet network doesn’t receive at least one Hello packet from an OSFP neighbor for 40 seconds, the
routers will declares that neighbor to be down.
The following fields in the OSPF Hello packets must be the same on both routers in order for routers to
become neighbors:

 subnet
 area id
 hello and dead interval timers
 authentication
 area stub flag
 MTU
The neighnbor discovery process is explained in the following example:
7

Routers R1 and R2 are directly connected and run OSPF. Both routers will start sending Hellos to each
other in order to establish a neighbor relationship. If the routers have compatible OSPF parameters, the
neighbor relationship will be formed.
Each OSPF router is assigned a router ID. A router ID is determined by using one of the following
methods:

 using the router-id command under the OSPF process.


 using the highest IP address of the router’s loopback interfaces.
 using the highest IP address of the router’s physical interfaces.

OSPF neighbor states


Before establishing a neighbor relationship, OSPF routers go through several state changes (up to eight
possible states):
1. Down state – no Hellos have been received on the interface. All OSPF routers begin in this state.
2. Attempt state – neighbors must be manually configured. This state is used only in nonbroadcast
multi-access (NBMA) networks.
3. Init state – a router has received a Hello message from the other OSFP router, but the two-way
conversation has not yet been established.
4. 2-way state – the neighbor has received the Hello message and replied with a Hello message of his
own.
5. Exstart state – beginning of the LSDB exchange between both routers. Routers will start to
exchanging link state information.
6. Exchange state – DBD (Database Descriptor) packets are exchanged. DBDs contain LSAs headers.
Routers will use this information to see what LSAs need to be exchanged.
7. Loading state – one neighbor sends LSRs (Link State Requests) for every network it doesn’t know
about. The other neighbor replies with the LSUs (Link State Updates) which contain information about
requested networks. After all the requested information have been received, other neighbor goes
through the same process.
8. Full state – both routers have synchronized the link state database and are fully adjacent with each
other. OSPF routing can now begin.

Area ID
OSPF areas create a logical boundary for routing information. By default routers do not share routing
information beyond the area. So in order to become neighbor, two routers must belong to same area.
Here one confusing fact needs to clear. Area is associated with specific interface, not with entire router.
This allows us to configure the router in multiple areas. For example a router that has two interfaces;
Serial interface and FastEthernet interface, can run Serial interface in one area and FastEthernet in
another area. It means link which connects two routers need be in same area including its both ends
interface. Beside this interfaces should have same network ID and subnet mask.
RID
RID is a unique identifier of Router in OSPF network. It must be unique within the autonomous system.
Routers identify each other through the RID in AS.
8

How do routers choose RID?


An OSPF router looks in three places for RID:-

1. Manual configuration
2. Loopback interface IP configuration
3. Active interfaces IP configuration
Manual configuration
Because RID plays a significant role in network, OSPF allows us to configure it manually. RID is 32 bit
long. IP address is also 32 bit in length. We can use IP address as a RID. This gives us more flexibility over
RID. For example we can use a simple and sequential IP scheme such as 1.1.1.1 for R1, 1.1.1.2 for R2,
1.1.1.3 for R3, 1.1.1.4 for R4, 1.1.1.5 for R5 and so on.
We can assign RID from OSPF sub command mode.
Router(config)#router ospf 1
Router(config-router)#router-id ip_address
If we have assigned RID manually, OSPF will not look in next two options. Suppose we did not assign it
through the command. In this situation OSPF will look in next option to find the RID.
Loopback interface IP configuration
If loopback interface is configured, OSPF will choose its IP address as RID. If multiple loopback interfaces
are configured, highest IP address will be chosen from all loopback interfaces configuration.
If loopback interface is not configured, OSPF will look in next and last possible place to choose the RID.
Key points

 OSPF will follow the sequence (Manual configuration => Loopback interface => Active interface) of
options while selecting RID. If RID is found, it will not look in next option.
 OSPF will choose IP address only from operational IP interface. Operational means interface should be
listed as line is up and line protocol is up in the output of show ip interface brief command.
 When multiple IP addresses are available, OSPF will always pick highest IP address for RID.
 For network stability we should always set RID from either router-id command or by using loopback
interfaces.
 By default Router chooses OSPF RID when it initialized. Once RID is selected it will use that RID until next
reboot.
 OSPF will not consider any change in RID which we make after initialization. We have two options to
implement new RID. Either reboots the router or clear the OPSF process with clear ip ospf process
command.

 If OSPF fails to select the RID, it will halt the OSPF process. We cannot use OSPF process without RID.

 Choose RID and initialize the OSPF process


 Run OSPF instance on local interfaces which are configured through the network command such
as R1(config-router)#network 10.0.0.0 0.0.255.255 area 0.
DR and BDR
OSPF routers in a network which need DR (Designated router) and BDR (Backup designated router) do
not share routing information directly with all each other’s. To minimize the routing information
exchange, they select one router as designated router (DR) and one other router as backup designated
router (BDR). Remaining routers are known as DROTHERs.
9

All DROTHERs share routing information with DR. DR will share this information back to all DROTHERs.
BDR is a backup router. In case DR is down, BDR will immediately take place the DR and would elect new
BDR for itself.
Main reason behind this mechanism is that routers have a central point for routing information
exchange. Thus they need not to update each other’s. A DROTHER only need to update the central point
(DR) and other DROTHERs will receive this update from DR.
Practically this will cut the numbers of routing information exchange from O(n*n) to O(n) where n is the
number of routers in a multi-access segment.
For example following figure illustrates a simple OSPF network. In this network R4 is selected as DR and
R5 is selected as BDR. DROTHERs (R1, R2 and R3) will share routing information with R4 (DR) and R5
(BDR), but they will not share routing information with each other. Later DR will share this information
back to all DROTHERs.

DR and BDR Election process


OSPF uses priority value to select DR and BDR. OSPF router with the highest priority becomes DR. Router
with second highest priority becomes BDR. If there is a tie, router with the highest RID will be chosen.
Priority value is 8 bit in length. Default priority value is 1. We can set any value from range 0 to 255. We
can change it from Interface Sub-configuration mode with ip ospf priority command.
We can force any router to become DR (Highest) or BDR (Second highest) by changing its priority value.
If we set priority value to 0, it will never become DR or BDR.
For example following figure illustrates a simple OPSF network. In this network we have five routers. We
do not want that R3 becomes DR or BDR. So we changed its default priority value to 0. Now let’s see
how these routers select DR and BDR.
10

Condition 1:- Use the highest priority value


This condition says “Arrange all routes in high to low order and pick the highest for DR and second
highest for BDR”. If we arrange our routers in high to lower order, R3 will stand at last. Remaining
routers have equal priority value. So at the end of this condition we have a tie between four routers.
Condition 2:- If there is a tie use the highest RID
This condition says “If there is a tie, use RID value to choose”. In our network we have a tie between four
routers, so our routers will use RID to elect the DR and BDR. Arranging routers in high to low order will
give us the DR and BDR.
As we know that there are two types of network; networks which do not require DR and BDR for
exchange process and networks which require DR and BDR for exchange process.
In first type all routers will exchange routing information with each other’s. In second type DROTHERs
will exchange routing information with DR and BDR.
Routers which will exchange routing information are known as adjacent. Relationship between two
adjacent is known as adjacency. This terminology is associated with interfaces.
A router which has two interfaces can be adjacent in one interface and DROTHER in other interface.
LSDB
Every OSPF router maintains a Link state database (LSDB). LSDB is collection of all LSAs received by a
router. Every LSA has a sequence number. OSPF stores LSA in LADB with this sequence number.
LSR
Upon receiving DBDs, routers will compare it with their own LADB. Thus they will learn what they need
to order. For example R1 received a check list (DBDs) of A1 and B1. When it will compare this list with its
own LSA database (LADB), it will learn that it already has A1. So it does not need to order this LSA again.
But it does not have B1, so it needs to order for this LSA. After a complete comparison, both routers will
prepare a list of LSAs which they do not have in their own LADB. This list is known as LSR (Link State
Request).
What other have (DBDs) – What I have (LADB) = What I need to order (LSR)
OSPF DR/BDR Election explained
11

OSPF uses a DR (Designated Router) and BDR (Backup Designated Router) on each multi-access network.
Most students think that this DR/BDR election is done per area but this is incorrect. I’ll show you how
the election is done and how you can influence it. This is the topology we’ll use:

Here’s an example of a network with 3 OSPF routers on a FastEthernet network. They are connected to
the same switch (multi-access network) so there will be a DR/BDR election. OSPF has been configure so
all routers have become OSPF neighbors, let’s take a look:

R1#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface


192.168.123.2 1 FULL/BDR 00:00:32 192.168.123.2 FastEthernet0/0
192.168.123.3 1 FULL/DR 00:00:31 192.168.123.3 FastEthernet0/0

From R1 perspective, R2 is the BDR and R3 is the DR.

R3#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface


192.168.123.1 1 FULL/DROTHER 00:00:36 192.168.123.1 FastEthernet0/0
192.168.123.2 1 FULL/BDR 00:00:39 192.168.123.2 FastEthernet0/0

When a router is not the DR or BDR it’s called a DROTHER. I have no idea if we have to pronounce it like

“BROTHER with a D” or “DR-OTHER” Here we can see that R1 is a DROTHER.


12

R2#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface


192.168.123.1 1 FULL/DROTHER 00:00:31 192.168.123.1 FastEthernet0/0
192.168.123.3 1 FULL/DR 00:00:32 192.168.123.3 FastEthernet0/0

And R2 (the BDR) sees the DR and DROTHER.


Of course we can change which router becomes the DR/BDR by playing with the priority. Let’s turn R1 in
the DR:

R1(config)#interface fastEthernet 0/0


R1(config-if)#ip ospf priority 200

You change the priority if you like by using the ip ospf priority command:

 The default priority is 1.


 A priority of 0 means you will never be elected as DR or BDR.
 You need to use clear ip ospf process before this change takes effect.

R1#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface


192.168.123.2 1 FULL/BDR 00:00:31 192.168.123.2 FastEthernet0/0
192.168.123.3 1 FULL/DR 00:00:32 192.168.123.3 FastEthernet0/0

As you can see R3 is still the DR, we need to reset the OSPF neighbor adjacencies so that we’ll elect the
new DR and BDR.

R3#clear ip ospf process


Reset ALL OSPF processes? [no]: yes
R2#clear ip ospf process
Reset ALL OSPF processes? [no]: yes

I’ll reset all the OPSF neighbor adjacencies.

R1#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface


192.168.123.2 1 FULL/DROTHER 00:00:36 192.168.123.2 FastEthernet0/0
192.168.123.3 1 FULL/BDR 00:00:30 192.168.123.3 FastEthernet0/0

Now you can see R1 is the DR because the other routers are DROTHER and BDR.

R3#show ip ospf neighbor


Neighbor ID Pri State Dead Time Address Interface
192.168.123.1 200 FULL/DR 00:00:30 192.168.123.1 FastEthernet0/0
192.168.123.2 1 FULL/DROTHER 00:00:31 192.168.123.2 FastEthernet0/0

Or we can confirm it from R3, you’ll see that R1 is the DR and that the priority is 200.

Shortest Path First (SPF) Algorithm


13

As we know upon initialization or due to any change in routing information an OSPF router generates a
LSA. This LSA (Link State Advertisement) contains the collection of all link-states on that router. Router
propagates this LSA in network. Each router that receives this LSA would store a copy of it in its LSA
database then flood this LSA to other routers.
After database is updated, router selects a single best route for each destination from all available
routes. Router uses SPF algorithm to select the best route.
Just like other routing algorithm SPF also uses a metric component called cost to select the best route
for routing table.

Configure ospf on below network topology(Area 0)

First of all, start with IP address configuration on each router:


Router R1
R1(config)#int gig0/0
14

R1(config-if)#ip add 103.21.40.1 255.255.255.252


R1(config-if)#no shutdown
R1(config)#int gig0/1
R1(config-if)#ip add 59.152.100.1 255.255.255.252
R1(config-if)#no shutdown
R1(config)#int GigabitEthernet0/2
R1(config-if)#ip add 10.1.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config)#int lo0
R1(config-if)#ip add 1.1.1.1 255.255.255.255
Similarly, let’s configure IP addresses on other two routers.
Router R2
R2(config)#int gig0/0
R2(config-if)#ip add 103.21.40.2 255.255.255.252
R2(config-if)#no shutdown
R2(config)#int gig0/2
R2(config-if)#ip add 10.2.2.1 255.255.255.0
R2(config-if)#no shutdown
R2(config)#int lo0
R2(config-if)#ip add 2.2.2.2 255.255.255.255
Router R3
R3(config)#int gig0/1
R3(config-if)#ip add 59.152.100.2 255.255.255.252
R3(config-if)#no shutdown
R3(config)#int gig0/2
R3(config-if)#ip add 10.3.3.1 255.255.255.0
R3(config-if)#no shutdown
R3(config)# int lo0
R3(config-if)#ip add 3.3.3.3 255.255.255.255
Now, configure OSPF
OSPF on R1
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 103.21.40.0 0.0.0.3 area 0
R1(config-router)#network 59.152.100.0 0.0.0.3 area 0
R1(config-router)#network 10.1.1.0 0.0.0.255 area 0
R1(config-router)#exit
R1(config)#

configure OSPF on last two routers.


OSPF on R2
R2(config)#router ospf 2
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 10.2.2.0 0.0.0.255 area 0
R2(config-router)#network 103.21.40.0 0.0.0.3 area 0
15

R2(config-router)#exit
R1(config)#
OSPF on R3
R3(config)#router ospf 3
R3(config-router)#router-id 3.3.3.3
R3(config-router)#network 10.3.3.0 0.0.0.255 area 0
R3(config-router)#network 59.152.100.0 0.0.0.3 area 0
R2(config-router)#exit
R1(config)#
If we configure correctly, we will see log messages just like below –
Terminal log on R1
*Jul 30 19:12:25.214: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on GigabitEthernet0/1 from LOADING to
FULL, Loading Done
*Jul 30 19:19:01.444: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on GigabitEthernet0/0 from LOADING to
FULL, Loading Done
log on R2
*Jul 30 19:19:01.871: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on GigabitEthernet0/0 from LOADING to
FULL, Loading Done
Terminal log on R3
*Jul 30 19:12:30.940: %OSPF-5-ADJCHG: Process 3, Nbr 1.1.1.1 on GigabitEthernet0/1 from LOADING to
FULL, Loading Done
Finally, we will verify OSPF on each router.
Router – R1
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 1 FULL/DR 00:00:32 59.152.100.2 GigabitEthernet0/1
2.2.2.2 1 FULL/BDR 00:00:34 103.21.40.2 GigabitEthernet0/0
R1#
Seems like, we are doing great. Now verify other two.
Router – R2
R2#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 1 FULL/DR 00:00:33 103.21.40.1 GigabitEthernet0/0
R2#
Router – R3
R3#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 1 FULL/BDR 00:00:39 59.152.100.1 GigabitEthernet0/1
R3#
R2#show ip route
Codes: L - local, C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
16

+ - replicated route, % - next hop override, p - overrides from PfR


Gateway of last resort is not set
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
O 10.1.1.0/24 [110/2] via 103.21.40.1, 00:11:42, GigabitEthernet0/0
C 10.2.2.0/24 is directly connected, GigabitEthernet0/2
L 10.2.2.1/32 is directly connected, GigabitEthernet0/2
O 10.3.3.0/24 [110/3] via 103.21.40.1, 00:11:42, GigabitEthernet0/0
59.0.0.0/30 is subnetted, 1 subnets
O 59.152.100.0 [110/2] via 103.21.40.1, 00:11:42, GigabitEthernet0/0
103.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 103.21.40.0/30 is directly connected, GigabitEthernet0/0
L 103.21.40.2/32 is directly connected, GigabitEthernet0/0
R2#

OK, now let’s ping LAN interface of R3 from R2 router.


R2#ping 10.3.3.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.3.3.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/16/67 ms
R2#
Seems like it’s working. Now, ping from R2 to LAN PC under R3.
R2#ping 10.3.3.37
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.3.3.37, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 3/5/12 ms
R2#
OSPF Multi-Area Configuration
17

R1

interface GigabitEthernet0/1
ip address 192.168.12.1 255.255.255.0
!
interface GigabitEthernet0/2
ip address 192.168.13.1 255.255.255.0
!
router ospf 1
network 192.168.12.0 0.0.0.255 area 0
network 192.168.13.0 0.0.0.255 area 1
!

R2
18

interface GigabitEthernet0/1
ip address 192.168.12.2 255.255.255.0
!
interface GigabitEthernet0/2
ip address 192.168.24.2 255.255.255.0
!
router ospf 1
network 192.168.12.0 0.0.0.255 area 0
network 192.168.24.0 0.0.0.255 area 2
!

R3

interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface GigabitEthernet0/1
ip address 192.168.13.3 255.255.255.0
!
router ospf 1
network 3.3.3.3 0.0.0.0 area 1
network 192.168.13.0 0.0.0.255 area 1
!

R4

interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface GigabitEthernet0/1
ip address 192.168.24.4 255.255.255.0
!
router ospf 1
network 4.4.4.4 0.0.0.0 area 2
network 192.168.24.0 0.0.0.255 area 2
!

Those are all the network commands we need.


Verification
Let’s verify our work. First, let’s make sure we have OSPF neighbors:
19

R1#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface


192.168.24.2 1 FULL/DR 00:00:36 192.168.12.2 GigabitEthernet0/1
3.3.3.3 1 FULL/BDR 00:00:34 192.168.13.3 GigabitEthernet0/2

R2 has formed a neighbor adjacency with R2 and R3. Let’s check R2:

R2#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface


192.168.13.1 1 FULL/BDR 00:00:34 192.168.12.1 GigabitEthernet0/1
4.4.4.4 1 FULL/BDR 00:00:30 192.168.24.4 GigabitEthernet0/2

R3 has formed neighbor adjacencies with R1 and R4. The show ip ospf neighbor command however,
doesn’t tell me anything about the areas that are used. If you want to see this, you could add
the detail parameter like this:

R2#show ip ospf neighbor detail


Neighbor 192.168.13.1, interface address 192.168.12.1
In the area 0 via interface GigabitEthernet0/1
Neighbor priority is 1, State is FULL, 6 state changes
DR is 192.168.12.2 BDR is 192.168.12.1
Options is 0x12 in Hello (E-bit, L-bit)
Options is 0x52 in DBD (E-bit, L-bit, O-bit)
LLS Options is 0x1 (LR)
Dead timer due in 00:00:33
Neighbor is up for 00:17:30
Index 1/1/1, retransmission queue length 0, number of retransmission 0
First 0x0(0)/0x0(0)/0x0(0) Next 0x0(0)/0x0(0)/0x0(0)
Last retransmission scan length is 0, maximum is 0
Last retransmission scan time is 0 msec, maximum is 0 msec
Neighbor 4.4.4.4, interface address 192.168.24.4
In the area 2 via interface GigabitEthernet0/2
Neighbor priority is 1, State is FULL, 6 state changes
DR is 192.168.24.2 BDR is 192.168.24.4
Options is 0x12 in Hello (E-bit, L-bit)
Options is 0x52 in DBD (E-bit, L-bit, O-bit)
LLS Options is 0x1 (LR)
Dead timer due in 00:00:31
Neighbor is up for 00:15:57
Index 1/1/2, retransmission queue length 0, number of retransmission 0
First 0x0(0)/0x0(0)/0x0(0) Next 0x0(0)/0x0(0)/0x0(0)
Last retransmission scan length is 0, maximum is 0
Last retransmission scan time is 0 msec, maximum is 0 msec

Above you can see that interface GigabitEthernet0/1 is in area 0 and interface GigabitEthernet0/2 is in
area 2. Another good command to find area information is show ip protocols:
20

R2#show ip protocols
*** IP Routing is NSF aware ***

Routing Protocol is "application"


Sending updates every 0 seconds
Invalid after 0 seconds, hold down 0, flushed after 0
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Maximum path: 32
Routing for Networks:
Routing Information Sources:
Gateway Distance Last Update
Distance: (default is 4)

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 192.168.24.2
It is an area border router
Number of areas in this router is 2. 2 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
192.168.12.0 0.0.0.255 area 0
192.168.24.0 0.0.0.255 area 2
Routing Information Sources:
Gateway Distance Last Update
4.4.4.4 110 00:16:04
192.168.13.1 110 00:16:53
Distance: (default is 110)

Above you can see which networks belong to which area:

 Network 192.168.12.0 in area 0.


 Network 192.168.24.0 in area 2.
Let’s check our routing tables. Let’s start with R1:

R1#show ip route ospf


Codes: L - local, C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
21

Gateway of last resort is not set

3.0.0.0/32 is subnetted, 1 subnets


O 3.3.3.3 [110/2] via 192.168.13.3, 00:01:47, GigabitEthernet0/2
4.0.0.0/32 is subnetted, 1 subnets
O IA 4.4.4.4 [110/3] via 192.168.12.2, 00:00:54, GigabitEthernet0/1
O IA 192.168.24.0/24 [110/2] via 192.168.12.2, 00:01:44, GigabitEthernet0/1

Above we see three OSPF entries. The first one is for 3.3.3.3/32, the loopback interface of R3. It shows
up with an O since this is an intra-area route. R1 has also learned about 4.4.4.4/32 and 192.168.24.0/24.
These two entries show up as O IA since they are inter-area routes.
R2 has a similar output:

R2#show ip route ospf

3.0.0.0/32 is subnetted, 1 subnets


O IA 3.3.3.3 [110/3] via 192.168.12.1, 00:02:19, GigabitEthernet0/1
4.0.0.0/32 is subnetted, 1 subnets
O 4.4.4.4 [110/2] via 192.168.24.4, 00:01:29, GigabitEthernet0/2
O IA 192.168.13.0/24 [110/2] via 192.168.12.1, 00:02:24, GigabitEthernet0/1

Above we see that R2 has learned about 3.3.3.3/32 and 192.168.13.0/24 which area inter-area routes.
4.4.4.4/32 is an intra-area route.
Let’s check R3:

R3#show ip route ospf

4.0.0.0/32 is subnetted, 1 subnets


O IA 4.4.4.4 [110/4] via 192.168.13.1, 00:01:57, GigabitEthernet0/1
O IA 192.168.12.0/24 [110/2] via 192.168.13.1, 00:02:50, GigabitEthernet0/1
O IA 192.168.24.0/24 [110/3] via 192.168.13.1, 00:02:47, GigabitEthernet0/1

Everything that R3 has learned is from another area, that’s why we only see inter-area routes here. The
same thing applies to R4:

R4#show ip route ospf

3.0.0.0/32 is subnetted, 1 subnets


O IA 3.3.3.3 [110/4] via 192.168.24.2, 00:02:13, GigabitEthernet0/1
O IA 192.168.12.0/24 [110/2] via 192.168.24.2, 00:02:13, GigabitEthernet0/1
O IA 192.168.13.0/24 [110/3] via 192.168.24.2, 00:02:13, GigabitEthernet0/1

Just to be sure, let’s try a quick ping between R3 and R4 to prove that our multi-area OSPF configuration
is working:

R3#ping 4.4.4.4 source 3.3.3.3


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
22

Packet sent with a source address of 3.3.3.3


!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 9/11/13 ms

Our ping is successful. That will be all for now.

You might also like