top of page

Q. What is the concept of areas in OSPF?

​

In OSPF – Open Shortest Path First, the autonomous system is divided into various areas to reduce the number of routing updates in the network as OSPF routing updates will be sent to only in one area.

 

The following are advantages of dividing the entire network i.e. Autonomous system into areas:-

Speed up the convergence of routing.

Decrease routing overhead.

Restrict network instability to single areas of the entire network.

 

Q. What is the Backbone Area in an AS?

While configuring OSPF, one area must be configured as area 0, referred to as the backbone area. This is the root of all other areas and they all must connect to the backbone area. Inter-area traffic is transmitted through this backbone area, area 0.

 

Q. What is an Area Border Router(ABR) and Autonomous System Border Router (ASBR)?

 

ABR – Area Border Router is the router that connects other areas to the backbone area within an autonomous system (AS). Area Border Router can have its interfaces in multiple areas.

ASBR – Autonomous System Border Router is the router that connects different Autonomous Systems.

In OSPF, what factors must match for two routers to become neighbors?

 

The following factors must be the same on both routers in order to form adjacency in OSPF: –

 

The subnet should be the same.

Area id must be the same for at least one common interface.

Hello, and Dead interval timer should be matched.

Authentication methods must be the same for both the routers.

 

Q. What is OSPF Router ID?

​

Router Id is configured to identify the router. We can configure it using command. If it is not configured, then the highest IP address of the router’s loopback interfaces is chosen as the Router ID. And if no loopback is also configured, then the highest IP address of the router’s physical interfaces will be chosen as the Router ID.

 

Q. What are DR and BDR in OSPF?

​

DR as Designated Router and BDR as Backup Designated Router. All other OSPF routers will form adjacencies only with the DR and BDR. DR and BDR serve as the central point for updating OSPF routing information. When link-state modifies, that will have sent only to the DR and BDR, instead of sending updates to every router on the network segment. Then DR will distribute updates to every other router inside the same area. BDR will work as a backup for DR. This will greatly reduce OSPF traffic and conserves the bandwidth.

 

Q. How OSPF DR & BDR are elected?

​

The router with the Highest Priority elected as the Designated Router (DR) and the second-highest priority router becomes the Backup Designated Router (BDR).

​

If there is a tie in priority, the router with the highest Router ID will become DR and the second-highest Router ID will become BDR.

 

Cisco routers have by default priority as 1. We can change it using the following command:

​

router(config)# interface  fa0/1

router(config-if)# ip ospf priority 10

​

If the Router priority is set to zero (0), that router will not participate in the DR/BDR election.

​

DR election process is not preemptive means if a router with a higher priority is added to the network, it will not become DR. We need to manually clear the OSPF process and DR/BDR election starts again from scratch.

​

Command to change the priority on an interface

​

router(config)# interface fa0/0

router(config-if)# ip ospf priority 100

 

Q. Describe OSPF LSA, LSU, LSR and LSAck?

​

The Link-State Advertisements (LSAs) are used by OSPF routers to exchange routing and topology information. When two neighbors decide to interchange routes, they send each other a list of all LSA in their individual topology database.

After getting LSAs, each router then checks its topology database. Then if some LSAs are missing or some are out of date i.e. not updated, the router sends Link State Request (LSR) message requesting all updated or missing LSAs that were not found in the topology table.

​

For this LSR, other router replies with the Link State Update (LSU) that contains all LSAs requested by the neighbor router. After getting LSUs, Link-State Acknowledgment (LSAck) will be sent to confirm receipt of LSU messages.

What are OSPF timers and their values?

Hello Timer – This specifies how frequently OSPF router will send the hello packet to other OSPF routers. By default, it is 10 secs for OSPF.

​

Dead Timer – This specifies how much time a router will wait for hello packets before it announces that the neighbor router is dead. By default, it is 40 secs for OSPF.

​

Q. What multicast addresses does OSPF use?

​

OSPF uses the multicast addresses of 224.0.0.5 & 224.0.0.6.

Every non-DR or non-BDR router will be sent routing information to a DR and BDR using the multicast address of 224.0.0.6.

Then DR will send these routing updates to all other router using multicast address 224.0.0.5. If DR fails, BDR will take over its role and redistribute the updates.

 

Q. Which Tables are maintained by OSPF?

​

OSPF routers maintain routing and topology information using three OSPF tables as mentioned below: –

Routing table – Stores the best paths to all the destination networks.

Neighbor table – Stores information about all EIGRP neighbor routers.

Topology table – Stores routing information which is collected from neighbor routers.

 

Q. What are the three basic LSA types of OSPF?

​

Router LSA (Type1) – Type 1 or Router LSA is generated by Each router that contains its active interfaces, IP addresses, neighbors and the link-cost. LSA Type 1 is flooded to all the routers only within an area.

Network LSA (Type2) – Type 2 or Network LSA is generated by the Designated Router (DR) that lists all the routers on the segment it is adjoining to. LSA Type 2 is flooded only within an area.

Summary LSA (Type3) – Type 3 or Summary LSAs are produced by Area Border Routers (ABRs) to advertise networks from an area to the other areas in an Autonomous System. It contains information about inter-area routes.

 

Q. Compare OSPF with EIGRP?

​

EIGRP – Enhanced Interior Gateway Routing Protocol

Enhanced Interior Gateway Routing Protocol (EIGRP) is highly prized for its fast convergence and ease of deployment. It is commonly used in many large Enterprise networks. EIGRP is a protocol that is very simple to understand and deploy. It’s IPv6 ready support, scales efficiently in a well-designed network, and provides exceptionally quick convergence times.

When network topology changes occur, EIGRP does not exchange the whole routing table, instead only the updates are exchanged. Hence, it also has very fast convergence times when there are changes in the network topology.

EIGRP has one more important feature –  It can provide equal-cost multipath (ECMP) and unequal cost multipath load sharing.   That’s why it does more efficient use of links,

 

OSPF – Open Shortest Path First

While configuring Routing in a multi-protocol enterprise network with hundreds of possible routes, we need a robust, efficient, and scalable link-state routing protocol Open Shortest Path First protocol (OSPF) to keep an accurate, up-to-date routing table.

OSPF is an open standard routing protocol and can run on routers from a variety of vendors, including Cisco, Nortel, and Lucent. As a result, OSPF protocol allows admins running large enterprise networks with products from multiple vendors to use a single routing protocol.

​

Q. Can we use OSPF without backbone area?

​

 Yes, but it will be limited to intra-area (same area) communication. By default, Inter-area communication is not possible without backbone area.

​

Q. What do you mean by OSPF transit area ?

​

A transit area is the area that has a virtual link connecting two or more ABRs attached to this area.

 

Q. What is the difference between an OPPF neighbor and an adjacent neighbor?

​

Neighbors are the routers that are in the same area and exchange hello packets, but not LSA information. Adjacent routers are routers that have fully exchanged their LSA information and are stable.

If OSPF state is in 2WAY/DROTHER, it means a neighbor relationship and, if the state is FULL/DR or FULL/BDR, it means that the adjacency is formed.

​

What Command display summary list of OSPF interfaces that includes cost?

R1#show ip ospf interface brief

OSPF Neighborship Conditions

 

 

Q. How to troubleshoot if OSPF neighbors are stuck in the two-way state?

 

When OSPF first enabled on a router or router powered up, it tries to discover its OSPF neighbors and synchronize its database with them. Routers are said to be OSPF neighbors when they see their router ID in the received hello packet and the status of their OSPF relationship transitions to Two-way.

 

OSPF neighbors then exchange routing information with each other. Once their databases are updated and synchronized, the status of their OSPF relationship changes to Full. However, the status of the OSPF relationship between OSPF neighbors does not always transition to Full and might remain stuck in Two-way instead.

 

Resolution
 

This is expected behavior on routers running OSPF. OSPF routers on multi-access segments synchronize their databases with their Designated Router (DR) or a Backup Designated Router (BDR) only. The OSPF status between two routers transitions to Full only if at least one of them is a DR or a BDR. The state remains Two-way between a pair of routers if both are drothers.

 

Troubleshooting Commands:

 

1) show ip ospf neighbors….This command will show you states of your neighbor and dead timer.
Example:

Router#sh ip ospf neighbour

Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 1 FULL/DR 00:00:38 10.1.1.1 FastEthernet0/0

 

2) Show ip ospf int brief …This command will give you OSPF property briefly on each interface.

Example:

Router#sh ip ospf int brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Fa0/0 100 0 10.1.1.2/24 10 BDR 1/1

 

3) Show ip ospf int …This command will give detail OSPF interface information like network-type,authentication type and key, interface mask,cost etc.

 

Example:

Router#sh ip os int fa0/0
FastEthernet0/0 is up, line protocol is up
Internet Address 10.1.1.2/24, Area 0
Process ID 100, Router ID 10.1.1.2, Network Type BROADCAST, Cost: 10
Enabled by interface config, including secondary ip addresses
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 1.1.1.1, Interface address 10.1.1.1
Backup Designated router (ID) 10.1.1.2, Interface address 10.1.1.2
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:06
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 1.1.1.1 (Designated Router)
Suppress hello for 0 neighbor(s)

 

4) Sh int (interface-no>….This command will give you physical link parameter like link state,MTU(Which is imp factor in ospf while exchanging database and need to same on both site>.

 

Example:

Router#sh int fa0/0 | in MTU | up
FastEthernet0/0 is up, line protocol is up
MTU 1500 bytes, BW 10000 Kbit/sec, DLY 1000 usec,

 

For MTU ,you need to check on (Routing) IP MTU that’s will gonna stuck your OSPF process in ex-start state if both side device don’t have same MTU , default both MTUs are same on IOS platform but you can change using “ip mtu” command under interface on the router and on Switch ,you can set system routing MTU.

 

Example:

Router#sh ip int fa0/0 | in MTU
MTU is 1400 bytes

 

Q. Which network type will form adjacencies but not perform DR/BDR election process?

​

Point-to-point
 

Q. What you will do if OSPF neighbour flaps and receives the OSPF-5-ADJCHG error message?

​

OSPF neighbors are established by exchanging hello packets at multicast address 224.0.0.5.  If these packets fail due to any Layer 2 (L2) issue, OSPF neighbors flap. This results in the error message ‘OSPF-5-ADJCHG’

To resolve this issue, ensure that the underlying L2 between OSPF neighbors is working properly by issuing the ping command. This ensures reachability to the neighbor address.

 

Q. Is It possible to use distribute-list command to filter routes in OSPF?

​

Configuring distribute-list commands that utilize route maps will not achieve desired Link State Advertisement (LSA) filtering. Open Shortest Path First Protocol (OSPF) routes cannot be filtered from entering the OSPF database using distribute-list. The distribute-list in command only filters routes from entering the routing table, and it does not prevent LSA packets from being propagated.

​

The Route map can be used to filter routes in OSPF. Route map can be based on those parameters such as

​

-match interface
-match ip address
-match ip next-hop
-match ip route-source
-match metric
-match route-type
-match tag

 

Q. What does Passive interface command does in OSPF?

​

Passive-Interface command disables adjacency on a particular interfacae. The interface address that you specify as passive appears as a stub network in the OSPF domain. OSPF routing information is neither sent nor received through the specified device interface.

 

Passive interface can be configured in two ways

 

a) By making all interface passive and only allowing one interface to form the adjacy by giving command ‘no passive-interface ‘


RouterA# router ospf 1
RouterA#passive-interface default
RouterA#no passive-interface e0/0

 

b) By enabling the passive interface on specific interface

 

RouterA# router ospf 1
RouterA#passive-interface e0/0

 

Q. How to enable authentication in OSPF?

​

There are two ways of authentication in OSPF.

1) Clear text authentication
2) MD5 authentication

1) Clear text authentication

Area based authentication

Cisco_Router#configure terminal
 

Enter configuration commands, one per line. End with CNTL/Z.
Cisco_Router(config)#interface f0/0
Cisco_Router(config-if)#ip ospf authentication-key cisco@123
Cisco_Router(config-if)#exit
Cisco_Router(config)#router ospf 100
Cisco_Router(config-router)#area 2 authentication
Cisco_Router(config-router)#exit

 

Interface based authentication

Cisco_Router(config)#int fa0/0
Cisco_Router(config-if)#ip ospf authentication
Cisco_Router(config-if)#ip ospf authentication-key cisco
Cisco_Router(config-if)#exit


2) MD5 authentication

Area based authentication

 

Cisco_Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.

 

Cisco_Router(config)#interface fa0/0
Cisco_Router(config-if)#ip ospf message-digest-key 1 md5 cisco@123
Cisco_Router(config-if)#exit

 

Cisco_Router(config)#router ospf 100
Cisco_Router(config-router)#area 2 authentication message-digest
Cisco_Router(config-router)#exit

 

Interface based authentication

Cisco_Router(config)#int fa0/0
Cisco_Router(config-if)#ip ospf authentication message-digest
Cisco_Router(config-if)#ip ospf message-digest-key 1 md5 cisco
Cisco_Router(config-if)#exit

 

Q. If OSPF neighbors are stuck in two way state what could be the reason?

 

OSPF routers on multiaccess segments sync their databases with their Designated Router (DR) or a Backup Designated Router (BDR) only. The OSPF status between two routers transitions to Full only if at least one of them is a DR or a BDR.  The state remains Two-way between a pair of routers if both routers are drothers.

In OSPF , One side MTU is 1500 and another side MTU is 1600, does it affect neighborship?

The Neighborship will be formed but it will not form FULL Adjecency. DBD exchange might not happen and the neighborship will be stuck in “EXSTART / EXCHANGE” state.

You can configure OSPF to ignore MTU checking by issuing “ip ospf mtu-ignore” on any one side.

 

Q. If OSPF neighborship is showing 2-way, what does it mean?

​

Think about a case where you have 4 routers with a LAN, A, B, C and D. A will be the DR and B will be the BDR. In such in a situation, router C’s neighbor state per neighbor will be as follows:

​

A – Full

B – Full

D — TwoWay

​

Each non-DR/non-BDR router will be in a Full state while using DR and BDR but will be in the Two Way state with other non-DR routers. That simply shows that the router has two-way communication achievable neighbor but has not established an entire adjacency with it, since the router will only establish adjacencies while using DR and BDR.

 

 

Q. What is the different type of route summarization available in OSPF?

​

OSPF allows two forms of summarization.


1. Routes redistributed in to OSPF from another routing protocol.

2. Summarizing an area. With both forms of summarization, summary LSAs are created and flooded toward Location 0, or the central source area.

 

Q. How OSPF establishes neighboor relation, what the stages are?

​

States in OSPF neighbor adjacency process:

-Down State
-Attempt
-Init
-2-way
-Exstart
-Exchange
-Loading
-Full

Down:
This is the first OSPF neighbor state. It indicates that no Hello has been received from the neighbor.

Attempt:
This state is only valid for manually configured neighbors in an NBMA environment.

Init:
This state indicates that the router has received a hello packet from its neighbor, but the receiving router’s ID was not found in the Hello packet

2-Way:
This state indicates that the bi-directional communication has been established between the 2 neighbors.

Exstart:
In this state, the router
The neighbor with the highest Router ID becomes the master.

Exchange:
In this state, OSPF router exchange DBD packets.
DBD packet contains the summary of the LSA headers.
DBDs are acknowledged and reviewed in this state.

Loading:
Slave requests the details (LSR)
Master sends updates (LSU)
Master requests the details (LSR)
Slave sends updates (LSU)

Full:
In this state, routers are fully adjacent with each other and their database is synchronized.

 

Q. Which router generates LSA 3 and LSA 4 ?

​

The Type 3 (Summary) LSA is originated by ABR into one area to describe links in another area.

The Type 4 (ASBR Summary) LSA is also originated by an ABR, but it is used to describe an ASBR in one area to routers in another area.

 

Q. How does OSPF populate route table?

​

OSPF collect information from all router on the network than OSPF store all this information in a database and use that information to build a topology map. This information will allow OSPF to identify the best or shortest route to every other network segment on the network. The route selection is based on overall hops to the destination, as well as link speed or link cost. The topology not only includes the best route to the destination as calculated by the Dijkstra algorithm (a search algorithm created by Edsger Dijkstra), but also, when possible, it includes a candidate or backup route to the destination. After creating the topology map, OSPF populates the routing table with the chosen routes to each destination.

 

Q. What are network types available in OSPF?

​

Broadcast
Default on broadcast medias (Ethernet / Token Ring)
Sends hellos as multicast
Performs DR/BDR Election

Non-Broadcast
Default on multipoint NBMA medias (Frame Relay / ATM)
Sends hellos as unicast (“neighbor” command)
Performs DR/BDR Election

Point-to-Point
Default on point-to-point medias (HDLC / PPP)
Sends hellos as multicast
No DR/BDR Election
Only two neighbors on the segment

Point-to-Multipoint
Not a default option
Sends hellos as multicast
No DR/BDR Election
Modifies next-hop processing (Best option for NBMA)

Point-to-Multipoint Non-Broadcast
Not a default option
Sends hellos as unicast (“neighbor” command)
No DR/BDR Election
Modifies next-hop processing

Loopback
Loopback and Looped back interfaces
Advertises network as a stub host (/32 host route)

 

If you have the two routers in the same area, can you use the distribute-list out command to filter resources between them

​

No to filter the routes use the command distribute-list in command not the distribute-list out.

To filter networks received in updates, use the distribute-list in command in address family or router configuration mode. To change or cancel the filter, use the no form of this command.

distribute-list [access-list-number | name] | [route-map map-tag] in [interface-type | interface-number]

no distribute-list [access-list-number | name] | [route-map map-tag] in [interface-type | interface-number]

What is the difference between type 1 & type 2 external routes which is preferred

​

External routes fall under two categories, external type 1 and external type 2. The difference between the two is in the way the cost (metric) of the route is being calculated. The cost of a type 2 route is always the external cost, irrespective of the interior cost to reach that route. A type 1 cost is the addition of the external cost and the internal cost used to reach that route. A type 1 route is always preferred over a type 2 route for the same destination.

 

Q. What is the difference between DR, BDR, ABR & ASBR?

​

  1. The DR serves as a common point for all adjacencies on a multiaccess segment

  2. The BDR also maintains adjacencies with all routers in case the DR fails

  3. Area Border Router (ABR) Connects two or more areas

  4. AS Boundary Router (ASBR) Connects to additional routing domains; typically located in
    the backbone

 

Q. What are different types of stub areas in OSPF?

​

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:

​

  1. Type 1 – Represents a router

  2. Type 2 – Represents the pseudonode (designated router) for a multiaccess link

  3. Type 3 – A network link summary (internal route)

  4. Type 4 – Represents an ASBR

  5. Type 5 – A route external to the OSPF domain

  6. Type 7 – Used in stub areas in place of a type 5 LSA

 

Q. Can you explain different OSPF packet types?

​

  1. Hello-Used to discover and maintain neighbours.

  2. Database Description-Used to form adjacencies. The router summarises all its linkstate advertisements and passes this information, via database description packets to the router it is forming an adjacency with Link State Request After the database description packets have been exchanged with a neighbour, the router may detect link state advertisements it requires to update or complete the topological database. Link state request packets are sent to the neighbour requesting these link state advertisements.

  3. Link State Update-Used for transmission of link state advertisements between routers. This could be in response to a link state request packet or to flood a new or more recent link state advertisement.

  4. Link State Acknowledgment Used to make the flooding of link state advertisements reliable. Each link state advertisement received is explicitly acknowledged

 

Q. Can you explain the different router types in OSPF

​

Internal Router – all interfaces in single area
Backbone Router – at least 1 interface in area 0
Area Border Router – has interfaces in multiple areas
Autonomous System Border Router – act as gateways between OSPF and other routing protocols

 

Q. Can you explain different areas in the OSPF?

​

OSPF allows the grouping of networks into a set, called an area. The topology of an area is hidden from the rest of the Autonomous System. This technique minimizes the routing traffic required for the protocol. When multiple areas are
used, each area has its own copy of the topological database.

 

Q. What are different routing tables in OSPF? 

​

OSPF Tables:

​

In link state routing protocol there are different tables for storing different types of information regarding router and its networks. There are three tables in OSPF same like in EIGRP.


1. Neighbor table
2. Topology table
3. Routing table

Lets Connect The World

Subscribe to CCIE topics

Mohammed Anwarul Islam

bottom of page