Static & Default Routing

Manually Directing Network Traffic on Cisco IOS

For network routers to forward packets, they must know the path to the destination network. A router builds its routing table either dynamically (using routing protocols like OSPF or EIGRP) or manually (using Static Routes configured by a network administrator).

Why Static Routing?

Static routes use zero CPU overhead and zero network bandwidth compared to dynamic routing protocols. They are perfect for small, stable networks, stub networks, or as backup links.

1. Configuring Static Routes

A static route defines a manual path to a specific destination network. On Cisco IOS, the command syntax is:

Router(config)# ip route [destination_network] [subnet_mask] [next_hop_ip | exit_interface]

Next-Hop IP vs. Exit Interface

When creating a static route, you can specify where to send matching packets in two ways:

Next-Hop Best Practice

Avoid using exit interfaces on Ethernet links. Ethernet is a multi-access network, meaning multiple hosts reside on the same segment. Exit-interface-only routes force the router to send ARP requests for every destination IP, causing broadcast storms and CPU thrashing. Always use the Next-Hop IP on Ethernet networks.

2. Default Routing (Gateway of Last Resort)

A Default Route is a catch-all static route that matches any destination IP address if no specific match is found in the routing table. It is represented by a destination network and subnet mask of all zeroes (0.0.0.0 0.0.0.0):

Router(config)# ip route 0.0.0.0 0.0.0.0 10.0.0.2

Default routes are widely used to route local client traffic towards an Internet Service Provider (ISP) gateway or edge router.

3. Routing Table Precedence (Longest Match Rule)

When a router receives a packet, it compares the destination IP against its routing table. It uses the following selection logic in order:

  1. Longest Match (Prefix Match): The router chooses the routing table entry with the most specific mask (e.g. a /30 route wins over a /24 route, which wins over a /0 default route).
  2. Administrative Distance (AD): If there are multiple matching routes with the same prefix length, the router prefers the route with the lowest AD (Directly Connected = 0, Static Route = 1, OSPF = 110).
Administrative Distance Cheat Sheet
Route Source Default AD Description
Connected Interface 0 Most trusted. Interfaces with active IP configurations.
Static Route 1 Manual route configured by administrator. Highly trusted.
EIGRP Summary Route 5 Local summary routes generated by EIGRP.
EBGP 20 External Border Gateway Protocol.
EIGRP (Internal) 90 Cisco proprietary dynamic protocol.
OSPF 110 Open Shortest Path First open-standard link state.
RIP 120 Routing Information Protocol (distance vector).
Related Lab: Lab 9: Static Routing Next Blog: Routing Protocols Overview