Skip to content
IT Atlas

Networking · Routing & Switching

Routing

Forwarding packets between networks by selecting the best available path from a route table.

IntermediateUpdated 2026-09-01

Overview

A router builds a route table from static entries, connected interfaces and dynamic protocols, then forwards each packet using the longest matching prefix. Route selection compares prefix length first, then administrative distance, then protocol metric.

Enterprises typically run OSPF or EIGRP inside a site, BGP between sites and to service providers, and static routes for simple stubs. Cloud platforms present the same concepts through route tables attached to subnets.

How it works

  1. 01Longest prefix match wins: a /32 host route is preferred over a /24, regardless of protocol.
  2. 02Administrative distance breaks ties between sources, connected, then static, then EBGP, then OSPF, then IBGP on most platforms.
  3. 03Dynamic protocols exchange reachability and converge after topology change; convergence time is a design requirement, not an afterthought.
  4. 04Policy based routing and route maps override normal selection for specific traffic, which is powerful and easy to make unmaintainable.

Why it matters

  • Asymmetric or unexpected paths break stateful firewalls and cause intermittent, hard to reproduce failures.
  • Failover behaviour during a circuit outage is determined entirely by routing design.
  • Hybrid cloud connectivity is largely a routing and address space exercise.

Security considerations

  • Authenticate routing protocol adjacencies so a rogue device cannot inject routes.
  • Filter advertisements at boundaries; never redistribute everything blindly between protocols.
  • Use RPKI validation and prefix filters for internet facing BGP to reduce hijack exposure.

Common misconfigurations

  • Redistribution loops between OSPF and BGP without filters or tags.
  • Default routes pointing at a failed next hop that remains 'up' because the interface is up.
  • Overlapping static and dynamic routes producing black holes after failover.

Primary sources