OSPF: INTERVIEW QUESTIONS


TOTAL NUMBER OF QUESTIONS: 21

Can communication between areas take place without using backbone area?

Ans.

No, we cannot have communication between different areas without backbone area(or Area 0). If there is a single, any area number will work, as there is no requirement of communicating between areas.

Conclusion:

In a single area, any area number will work

In  multiple area, we  must have one area, which is backbone area or Area 0

 

What is ABR and ASBR?

Ans.

ABR: is the router which has OSPF enabled interfaces belonging to more than one area.

Example: Router R1 has two interfaces F0/0 & F0/1. F0/0 belongs to Area 0 & F0/1 belongs to Area 1.

Example: R1(Area 0)————–(Area 0) R2(Area 1)——-(Area 1)R3(Area 1)——–(Area 1)R4

 

ASBR: is the router which has interfaces running with more than one type of protocol.

Example: Router R1 has two interfaces F0/0 & F0/1. OSPF is running on F0/0 & BGP is running on F0/1.

Example: OSPF————-R1—————BGP

 

Why NSSA is required, any practical scenario?

Ans.

” SCENARIO ”
My Company, A, Network includes ( AREA 0 —- AREA 1 )
New Company is B.

Company B is planning to access some servers present in My Company, A in Area 1.

Area 1 is stub area initially, there is no redistribution required in this area. So, by making it stub, simply LSA-5 is blocked.

But now, as per new requirement, we need to redistribute new company’s subnets into our network.So, we need to convert Area 1 (Stub area) into NSSA. This will allow LSA-7 into this Area 1. By this, Area 1 will learn the routes from new company & my requirement is fulfilled.

Further, By playing with LSA-7 conversion into LSA-5, I may or may not allow the new company’s routes into the remaining part of my network, i.e, Area 0.

 

If in a Not So Stubby Area type, ABR=ASBR, & we don’t want to convert LSA-7 into LSA-5. what is the solution?

 

If no. of routes received from same LSA type for a destination. Which one is preferred?

Ans.

Learning network 192.168.10.0/24 through two different LSA-5, means learning from two different ASBR.

The OSPF metric calculated as cost ( based on the bandwidth) is used for selecting the best route. The route with the lowest value for cost is chosen as the best route. If cost is equal here, all the routes get installed in the routing table, and the router does equal cost load balancing across multiple paths.

Reference Link

https://networkproxy.wordpress.com/2014/03/04/ospf-concept-advance-route-selection/?relatedposts_hit=1&relatedposts_origin=569&relatedposts_position=0

 

If same route received from different LSA. What is the order of preference?

Ans.

Reference Link

https://networkproxy.wordpress.com/2014/03/04/ospf-concept-advance-route-selection/

 

How OSPF cost is calculated ? which algorithm is used for SPF calculation ?

Ans.

OSPF uses a reference bandwidth of 100 Mbps for cost calculation. The formula to calculate the cost is reference bandwidth divided by interface bandwidth. For example, in the case of Ethernet, it is 100 Mbps / 10 Mbps = 10.

Note: If ip ospf cost cost is used on the interface, it overrides this formulated cost. For more information, refer to OSPF Cost.

Reference Link

http://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/9237-9.html

 

How to configure authentication in OSPF ?

Ans.

Reference Link:

http://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/13697-25.html

 

Authentication Types: 

Null Authentication—This is also called Type 0 and it means no authentication information is included in the packet header. It is the default.

Plain Text Authentication—This is also called Type 1 and it uses simple clear-text passwords.

MD5 Authentication—This is also called Type 2 and it uses MD5 cryptographic passwords.

 

Sample Config for Plain Text:

router ospf 10
area 0 authentication

interface Serial0

ip ospf authentication-key c1$c0 

The Key value is set as “c1$c0 “. !— It is the password that is sent across the network

 

Sample Config for MD5 Authentication:

router ospf 10

area 0 authentication message-digest

interface Serial0

ip ospf message-digest-key 1 md5 c1$c0

Message digest key with ID “1” and  Key value (password) is set as “c1$c0 “.

 

Note:

In Plain Text, simply passwords are matched to become neighbors

In MD5 authentication, This method uses the MD5 algorithm to compute a hash value from the contents of the OSPF packet and a password .

This hash value is transmitted in the packet, along with a key ID and a non-decreasing sequence number

The receiver, which knows the same password, calculates its own hash value. If nothing in the message changes, the hash value of the receiver should match the hash value of the sender which is transmitted with the message.

Benefit Of Key ID: The key ID allows the routers to reference multiple passwords. This makes password migration easier and more secure. For example, to migrate from one password to another, configure a password under a different key ID and remove the first key

 

Brief about Link state advertisement packet formats

Reference Link

http://www.freesoft.org/CIE/RFC/1583/109.htm

 

Why LSA-1 & 2 cannot be summarized?

Ans.

The reason for this is that Link State Database (LSDB) for all routers in a area must be the same for that area to calculate Shortest path to the ABR’s in the area appropriately.

 

What is the benefit of LSA concept in OSPF?

LSA  exchanges Link State Database (LSDB)  while communicating with each other. When some changes occur in topology, only then complete Routing Table is exchanged

Note: By default, even if there is no change in topology, LSA’s are exhanged after 30 minutes

 

Why LSA-7 is required,as LSA-7 is doing the same function as of LSA-5?

 

Why OSPF is called Link State?

Ans.

OSPF is a link-state protocol. We could think of a link as being an interface on the router. The state of the link is a description of that interface and of its relationship to its neighboring routers. A description of the interface would include, for example, the IP address of the interface, the mask, the type of network it is connected to, the routers connected to that network and so on. The collection of all these link-states would form a link-state database.

Reference: OSPF Design Guide

http://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/7039-1.html

 

Can OSPF do load balancing and how?

Ans.

Awesome Explanation by Keith Barker with Tasks associated in below mentioned link

Reference Link

 

OSPF is a Cisco proprietary or open standard?

Ans.

Open Standard

 

Explain DR and BDR concept

Ans.

PURPOSE OF DR/BDR ELECTION

In a Multi-access network, if we have 4 routers, they all will form adjacencies with each other

To avoid that much no. of adjacencies, we make one as DR(Designated router) & one as BDR(Backup Designated Router), remaining will stay in DROTHER state

So, every router will go through all the OSPF states to become fully adjacent with DR only

Note: DROTHERS routers stay in 2-way state with each other. 2-way state is normal, this is not a problem

So, ultimately number of adjacencies got reduced

 

HOW TO ELECT DR/BDR

Tie Breaker

  1. Highest Priority(configured over interface)
  2. Highest RID

 

Example: R1 (int f0/0)———-(int f0/1)R2

Here, priority of int f0/0 at R1 and int f0/1 at R2 are compared. Higher priority wins. Default priority is 1

Till now, this is the Theory

Practically, the first device that starts the OSPF process wins regardless of priorities/RIDs.

Reason: the device starts the wait timer (equal to dead timer) and it waits to see another OSPF enabled device and finally declaring itself as DR after wait timer value

 

Case Of DR/BDR election ?

we have five routers to be enabled with OSPF

When first router is enabled with OSPF what will happen how DR/BDR is elected?

Is to going to wait for another routers to compare Priority or simply after sometime itself becomes DR?

What is the best practice to avoid any unpredicted selection of DR/BDR?

 

How route summarization is done at ABR?

Ans.

Reference Link

http://www.getnetworking.net/ospf/ospf-internal-route-summarization

 

OSPF Does not support auto summarization, only manual can be done.

OSPF summarization is of two types :

  1. Internal summarization: Between different areas, using LSA-3 route summarization
  2. External summarizaion: Between OSPF & any other protocol, using LSA-4  or  LSA-5

 

Here, we will discuss First one, Internal summarization

By default summary LSA (type 3 LSA), which runs between areas, does not contain summary routes, it contains information from type 1 LSA (Router LSA) and type 2 LSA (Network LSA). So, they carry summarization information after you configure summarization.

 

EXAMPLE

 

OSPF internal route summarization

 

Command to be applied at ABR,

area area-id range address mask [advertise | not-advertise][cost cost]

 

Configuration

ABR(config-router)#area 15 range 192.168.0.0 255.255.254.0

Verify

HQ#show ip route
     10.0.0.0/30 is subnetted, 1 subnets
C       10.0.0.0 is directly connected, Serial0/0
O IA 192.168.0.0/23 [110/74] via 10.0.0.1, 00:04:32, Serial0/0

 

HQ#show ip ospf database
              Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
192.168.0.0     192.168.1.1     310         0x80000003 0x001A43

 

One More Reference Link

http://www.informit.com/library/content.aspx?b=CCNP_Studies_Routing&seqNum=50

 

Why the OSPF state got stuck in Exstart and Exchange state ?

Ans.

When there is MTU mismatch of packet occurs. Then, Out of  Two communicating routers, one gets stuck in Exstart state & another in Exchange state.

 

If OSPF has to be enabled on a router with multiple vrf running, how to configure ? 

Ans.

router ospf 100 vrf  abc_vrf

router-id 141.122.172.135

log-adjacency-changes

no capability lls

area 0.0.0.0 authentication message-digest

redistribute connected subnets route-map customer_internal

redistribute static subnets route-map pglae_temp_ip

redistribute bgp 64891 subnets route-map customer_internal

network 141.122.172.128 0.0.0.15 area 0.0.0.0

default-metric 800

 

What is discard route in OSPF ?

During Route Summarization, loop might occur.
Example: If traffic comes for a network which lies in the summarized range, but actually network do not exist or not configured anhwhere.
To avoid this, by defaut, Discard route is installed.

Example:

172.16.0.0/24 is variably subnetted, 3 subnets, 2 masks
C 172.16.0.128/25 is directly connected, Loopback1
O 172.16.0.0/24 is a summary, 00:00:14, Null0
C 172.16.0.0/25 is directly connected, Loopback0

Comments:

In above example,
==> 172.16.0.0/24 is the summarized address
==> If traffic comes for 172.16.0.128/25, exact route is present
==> If traffic comes for 172.16.0.126/25, which is not present.
So, Discard route pointing to Null0 will be prefered
==> By this, Traffic will go back to the sender, that is ABR. On ABR, there is no Null0 interface, so traffic will be dropped.

 

Why E1 ROUTE is preffered over E2 route ?

OSPF is a link state, distance vector or Hybrid protocol. Which one ?

What is the benefit of Area concept in OSPF ?

 

 

Advertisements

4 comments

  1. Jaspreet, this is answer to your first query .. !

    WHY NSSA IS REQUIRED ?

    ” SCENARIO ”
    My Company, A, Network includes ( AREA 0 —- AREA 1 )
    New Company is B.

    Company B is planning to access some servers present in My Company, A in Area 1.

    Area 1 is stub area initially, there is no redistribution required in this area. So, by making it stub, simply LSA-5 is blocked.

    But now, as per new requirement, we need to redistribute new company’s subnets into our network.So, we need to convert Area 1 (Stub area) into NSSA. This will allow LSA-7 into this Area 1. By this, Area 1 will learn the routes from new company & my requirement is fulfilled.

    Further, By playing with LSA-7 conversion into LSA-5, I may or may not allow the new company’s routes into the remaining part of my network, i.e, Area 0.

    Hoping … this scenario makes the things more clear .. in terms of practical scenario .. !!

    Like

  2. Hi Sumit Veere,

    I have a following querry:-

    1) Why NSSA is required, any practical scenario?

    2) If same route received from different LSA. What is the order of preference?

    Regards,

    Jassi

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s