OSPF Interview Questions
OSPF Interview Questions
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 multiple area, we must have one area, which is backbone area or Area 0
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.
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
Ans.
” SCENARIO ”
My Company, A, Network includes ( AREA 0 —- AREA 1 )
New Company is B.
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.
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
Ans.
Reference Link:
http://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/13697-
25.html
Authentication Types:
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.
router ospf 10
area 0 authentication
interface Serial0
The Key value is set as “c1$c0 “. !— It is the password that is sent across the network
router ospf 10
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 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
Reference Link
http://www.freesoft.org/CIE/RFC/1583/109.htm
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.
Note: By default, even if there is no change in topology, LSA’s are exhanged after 30
minutes
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.
Ans.
Open Standard
Ans.
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
Tie Breaker
Here, priority of int f0/0 at R1 and int f0/1 at R2 are compared. Higher priority wins. Default
priority is 1
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
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?
Ans.
OSPF Does not support auto summarization, only manual can be done.
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
Configuration
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
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-id 141.122.172.135
log-adjacency-changes
no capability lls
default-metric 800
Example:
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.
Happy Learning…
Thanks
Rakesh