What is the difference between OSPF and EIGRP?
OSPF (Open Shortest Path First) is a link state protocol: every router in an area holds the same map of the network and calculates its own shortest paths. EIGRP (Enhanced Interior Gateway Routing Protocol) is an advanced distance vector protocol: each router learns distances from its neighbours and keeps a loop free backup path ready. OSPF is an open standard used across vendors. EIGRP came from Cisco and is published as RFC 7868, but it is still found mostly on Cisco networks.
Full section: EIGRP and IS-IS
What is administrative distance?
Administrative distance is how much a Cisco router trusts a routing source. When two sources offer exactly the same prefix, the lower distance wins: connected 0, static 1, external BGP (Border Gateway Protocol) 20, EIGRP 90, OSPF 110 and internal BGP 200. It only settles ties between identical prefixes, because a longer prefix always wins first. Juniper calls the same idea route preference and uses different numbers.
Full section: How a router decides
Why is an OSPF neighbour stuck in ExStart or Exchange?
An OSPF adjacency that cycles through ExStart and Exchange almost always has an MTU (maximum transmission unit) mismatch. During this stage the two routers swap database description packets that carry each interface MTU, and the exchange stalls when the values differ. It often appears after a new circuit or subinterface is added. Matching the MTU on both interfaces lets the adjacency reach Full.
Full section: OSPF neighbours
Why does OSPF give 1, 10 and 100 Gb/s links the same cost?
OSPF cost is the reference bandwidth divided by the interface bandwidth, and Cisco IOS sets the reference to 100 Mb/s by default. Every link of 100 Mb/s or faster therefore costs 1, so OSPF cannot prefer a 100 Gb/s path over a 1 Gb/s path. I raise the reference bandwidth to 100,000 Mb/s and set the same value on every router, so the costs scale again. NX-OS defaults to 40 Gb/s.
Full section: OSPF
How does BGP choose the best path?
BGP (Border Gateway Protocol) compares paths to the same prefix one attribute at a time and stops at the first difference. On Cisco the order is highest weight, highest local preference, a route the router originated itself, shortest AS (autonomous system) path, lowest origin type and lowest MED (multi exit discriminator). Then external paths beat internal ones, the lowest interior cost to the next hop wins, and finally the oldest external path and the lowest router ID.
Full section: BGP path selection
What does it mean when a BGP session is stuck in Active?
Despite the name, Active means BGP tried to open its TCP (Transmission Control Protocol) connection to port 179 and failed, so it keeps retrying. The usual causes are a firewall or access list blocking TCP 179, a wrong neighbour address, or a session sourced from a different interface than the peer expects. A telnet to port 179 from the same source interface proves the cause quickly.
Full section: BGP
What is a floating static route?
A floating static route is a backup static route with a higher administrative distance than the primary, such as 250. It stays out of the routing table while the primary route exists and is installed only when the primary is removed. I tie the primary route to an IP SLA (service level agreement) probe, so it is removed when the provider fails upstream and not only when the local link goes down.
Full section: Static routes
What is a VRF in routing?
A VRF (virtual routing and forwarding instance) gives one router a separate routing table for each segment, so tenants or security zones stay apart even when their addresses overlap. Each interface belongs to one VRF. Routes only move between VRFs when they are leaked on purpose, with route targets or a static route. My preferred design joins VRFs through a firewall instead, which checks and logs every flow between zones.
Full section: VRF and PBR