:::: OSPF and BGP ::::
Advanced OSPF & BGP Interview Questions & Answers - Mock Q&A Format
Question 1: What are the different types of OSPF packets and their usage?
Answer:
Hello Packet: Initiates and maintains neighbor relationships (contains Router ID, Hello/Dead intervals).
DBD (Database Description): Summarizes LSDB, exchanged during Exstart/Exchange.
LSR (Link State Request): Requests specific LSAs.
LSU (Link State Update): Sends full LSA details.
LSAck (Link State Acknowledgment): Acknowledges receipt of LSAs.
Question 2: How does OSPF prevent loops?
Answer:
OSPF uses Dijkstra’s SPF algorithm to calculate shortest paths.
Intra-area: Each router maintains identical LSDBs, preventing loops.
Inter-area: ABRs do not advertise LSAs back into the area from which they were received (split-horizon like behavior).
Question 3: What are stub areas in OSPF?
Answer:
Stub Area: Allows LSA 1, 2, 3; blocks LSA 5.
Totally Stubby Area: Allows only LSA 1 and 2; blocks 3, 5 (Cisco proprietary).
Not So Stubby Area (NSSA): Allows 1, 2, 3, and 7; blocks LSA 5. Type 7 LSAs get converted to Type 5 by ABR.
Totally NSSA: Allows only 1, 2, 7; blocks 3 and 5.
Question 4: What is the function of an ABR in OSPF?
Answer:
Connects multiple OSPF areas.
Generates Type 3 Summary LSAs to summarize routes between areas.
Does not forward LSAs back into the originating area.
Question 5: What metric does OSPF use and how is it calculated?
Answer:
OSPF uses Cost as a metric:
Cost = Reference Bandwidth / Interface Bandwidth
Default Reference Bandwidth = 100 Mbps.
Question 6: What are OSPF neighbor states?
Answer:
Down – No Hello packets seen.
Init – Hello received but not seen own Router ID.
2-Way – Bidirectional Hello seen.
ExStart – DR/BDR and master-slave negotiation.
Exchange – DBDs exchanged.
Loading – LSRs sent, LSUs received.
Full – Fully adjacent.
Question 7: Difference between DR/BDR and master/slave in OSPF?
Answer:
DR/BDR: Used in broadcast/multicast networks to reduce LSA flooding.
Master/Slave: Decides control during DBD exchange (ExStart).
Question 8: When do routers remain in 2-way state?
Answer:
Routers that are neither DR nor BDR remain in 2-Way state with other DROTHER routers to avoid unnecessary full adjacencies.
Question 9: Explain all 7 LSA types in OSPF.
Answer:
Type 1 (Router LSA) – Generated by every router.
Type 2 (Network LSA) – Generated by DR.
Type 3 (Summary LSA) – Generated by ABR.
Type 4 (ASBR Summary) – Generated by ABR for ASBR reachability.
Type 5 (External) – Generated by ASBR.
Type 6 (Multicast) – Not used often.
Type 7 (NSSA External) – Generated by ASBR in NSSA, converted to 5 by ABR.
Question 10: What are the BGP message types?
Answer:
Open – Session establishment.
Keepalive – Maintains session.
Update – Advertise/Withdraw routes.
Notification – Errors/Session teardown.
Question 11: Difference between iBGP and eBGP?
Answer:
iBGP: Same AS, TTL = 255, needs full mesh or RR/Confed.
eBGP: Different AS, TTL = 1, allows AS path filtering.
iBGP uses split-horizon, eBGP uses AS-PATH filtering for loop prevention.
Question 12: What is a BGP Route Reflector?
Answer:
Avoids full mesh in iBGP.
One RR, multiple clients.
RR forwards updates between clients.
Common in ISPs (e.g., Airtel POPs).
Question 13: BGP Path Selection Attributes Order?
Mnemonic: WE LOVE OUR AS, ME IN OUR ROLE
Weight – Highest.
Local Preference – Highest.
Locally originated – Prefer.
AS Path – Shortest.
Origin – IGP < EGP < Incomplete.
MED – Lowest.
eBGP over iBGP
IGP metric to next hop – Lowest.
Oldest route – Prefer.
Router ID – Lowest.
Question 14: What is Next-Hop-Self and Update-Source in BGP?
Answer:
Next-Hop-Self: Used in iBGP to rewrite next-hop IP to router’s own IP.
Update-Source: Used to specify source interface (usually loopback) for BGP sessions.
Question 15: What is AS Path and how does it prevent loops?
Answer:
Lists AS numbers the route has traversed.
If router sees its own AS in path, it discards it – preventing loops.
Question 16: What is Local Preference?
Answer:
BGP attribute for outbound path selection.
Higher = Better.
Default = 100.
Local to AS, propagated within AS.
Question 17: What is MED?
Answer:
Multi Exit Discriminator: Suggests preferred entry point into your AS.
Lower = Better.
Not propagated beyond one AS hop.
Question 18: What is BGP Community?
Answer:
Tags assigned to BGP routes.
Used for route filtering or traffic engineering.
Example: 10001:100 = “Don’t advertise to US clients.”
Question 19: What is BGP Confederation?
Answer:
Divides a large AS into multiple sub-ASes internally.
Reduces iBGP full-mesh requirement.
Externally seen as one AS.
Question 20: Route Reflector vs Confederation – Final Recap
Answer:
Route Reflector: One router reflects routes to clients.
Confederation: Breaks AS into sub-ASes.
Use RR for simplicity (e.g. Airtel POPs).
Use Confederation for regional control (e.g. AWS, Tata).
🎉 Congratulations! You’ve completed 20 expert-level OSPF & BGP Q&As.
Comments
Post a Comment