IP Routing and Layer 3 Technologies
The Layer 3 domain tests route selection, static and dynamic routing, first-hop redundancy and address services. You should be able to predict which route a packet takes and why an adjacency or peering will not come up.
Route selection order
Longest prefix match always wins first; administrative distance only breaks ties between the same prefix from different sources (connected 0, static 1, eBGP 20, OSPF 110, iBGP 200 in typical OS10 behaviour). Equal-cost paths install together and are hashed per flow.
OSPF
Hello 10 s, dead 40 s on broadcast segments. Neighbours must match area, hello/dead timers and MTU, or the adjacency sticks before Exchange. DR/BDR are elected per broadcast segment by priority then router ID. Cost is reference bandwidth (10^8) divided by interface bandwidth, so 1G and 10G both cost 1 unless the reference is raised. Key LSAs: type 1 router, type 2 network, type 3 summary, type 5 external.
BGP
EBGP runs between autonomous systems, IBGP inside one. States are Idle, Connect, Active, OpenSent, OpenConfirm, Established; Active means it is still trying. Path selection starts with weight, then local preference, locally originated, AS-path length, origin and MED.
Services and redundancy
VRRP presents a virtual IP and MAC, with the highest priority (default 100) acting as master. DHCP relay forwards requests to a server on another subnet; keep a routable path and consider option 82.
Worked example
A switch learns 10.1.5.0/24 from OSPF (AD 110) and 10.1.0.0/16 as a static route (AD 1). A packet to 10.1.5.20 uses the OSPF /24: prefix length is evaluated before administrative distance, so the more specific route wins despite its higher AD.
Traps
Assuming lower AD beats a longer prefix; MTU mismatch blocking OSPF adjacency; reading BGP Active as a healthy state; forgetting that reference bandwidth collapses 1G and 10G costs; designing VRRP without checking the master/backup link path.