Route Sources – Connected, Static & Dynamic Routes Explained

1. What Are Route Sources?

A route source describes how a router learned about a particular destination network. Before a router can forward a packet it must have an entry in its routing table telling it where to send traffic for that destination. That entry can come from one of three places:

  • Connected routes — added automatically when a router interface is brought up with an IP address assigned
  • Static routes — manually configured by a network administrator
  • Dynamic routes — learned automatically through a routing protocol (RIP, OSPF, EIGRP, BGP)

When a router receives a packet, it compares the destination IP address against every entry in its routing table and selects the most specific matching route (longest prefix match). If two routes from different sources match the same destination equally specifically, the router uses Administrative Distance (AD) to decide which one to install — lower AD wins.

Related pages: Administrative Distance | Routing Metrics | Static Routing Config | Default Routes | Floating Static Routes | OSPF Overview | EIGRP Overview | RIP Concepts | BGP Overview | show ip route

2. Route Sources – Quick Reference

Route Source Routing Table Code How Learned AD (Default) Auto Failover? Scalable? Example Protocols
Connected C / L Interface up with IP configured 0 (most trusted) Yes — removed instantly if interface goes down No — only local interfaces N/A
Static S Manually configured with ip route 1 No — persists unless next-hop interface goes down No — requires manual update per change N/A (floating static uses higher AD)
Dynamic O, D, R, B Learned automatically via routing protocol Varies (20–200) Yes — protocols detect failures and re-converge Yes — scales to thousands of routes RIP, OSPF, EIGRP, BGP

3. Connected Routes

What Are Connected Routes?

A connected route is automatically added to the routing table the moment a router interface is assigned an IP address and that interface is in the up/up state (line protocol up, interface up). No manual configuration is needed. Connected routes represent the networks to which the router is directly attached.

On IOS, a connected interface produces two entries:

  • C — the network/subnet address (e.g., 192.168.10.0/24)
  • L — the local host route for the router’s own interface IP as a /32 (e.g., 192.168.10.1/32)

Example Configuration and Routing Table Output

! Interface configuration:
interface GigabitEthernet0/0
 ip address 192.168.10.1 255.255.255.0
 no shutdown

! Resulting routing table entries (show ip route):
C    192.168.10.0/24 is directly connected, GigabitEthernet0/0
L    192.168.10.1/32 is directly connected, GigabitEthernet0/0
            

Key Properties of Connected Routes

Property Detail
Administrative Distance 0 — the most trusted route source; always preferred over any other source for the same prefix
Created automatically Yes — added by IOS when the interface comes up; removed instantly when it goes down
Prerequisite for routing protocols All routing protocols (OSPF, EIGRP, RIP) rely on connected routes being present before they can advertise those networks to neighbours
Metric Not applicable — the router is directly attached; no metric calculation is needed
Interface goes down Both the C and L entries are immediately removed from the routing table

4. Static Routes

What Are Static Routes?

A static route is a route manually entered by an administrator using the ip route command. It tells the router exactly how to reach a specific destination: either via a next-hop IP address, via an exit interface, or both. Static routes do not adapt automatically to topology changes — if the path fails, the route stays in the table until removed manually (unless the exit interface itself goes down).

Static Route Syntax Variations

! Syntax:
! ip route <destination-network> <subnet-mask> <next-hop-IP | exit-interface> [AD]

! 1. Next-hop IP only (most common on multi-access networks like Ethernet)
ip route 10.0.0.0 255.255.255.0 192.168.1.2

! 2. Exit interface only (best on point-to-point links; avoids ARP)
ip route 10.0.0.0 255.255.255.0 GigabitEthernet0/1

! 3. Fully specified (next-hop + exit interface — most explicit; recommended)
ip route 10.0.0.0 255.255.255.0 GigabitEthernet0/1 192.168.1.2

! 4. Default route (gateway of last resort — matches any destination)
ip route 0.0.0.0 0.0.0.0 203.0.113.1
            

Static Route Methods Compared

Method Best Used On Pros Cons
Next-hop IP only Ethernet (multi-access) links Flexible; works on any link type; router resolves next-hop via ARP or recursive lookup Requires ARP for next-hop resolution; adds one lookup step
Exit interface only Point-to-point serial links Fastest lookup (no ARP or recursive lookup needed) On Ethernet links treats the interface as point-to-point; can cause ARP flooding for every destination
Fully specified Any link type Most explicit and predictable; avoids ARP flooding; no recursive lookup Slightly more typing; same route must be updated in two places if either changes

Floating Static Route (Backup Route)

A floating static route is a static route with a manually assigned AD higher than the primary dynamic route. When the primary path is active, the floating static route is hidden from the routing table (the lower AD dynamic route wins). If the primary route disappears (e.g., OSPF neighbour drops), the floating static route “floats” into the table automatically as the backup.

! Primary route learned via OSPF (AD 110) — installed in routing table
! Floating static backup (AD 150) — stays dormant while OSPF is active
ip route 10.0.0.0 255.255.255.0 192.168.2.1 150

! If OSPF goes down, the AD 150 static route floats into the routing table
! and traffic continues via the backup path
            
  Normal operation:
  Routing table: O 10.0.0.0/24 [110/2] via 192.168.1.2  (OSPF wins; AD 110 < 150)
  Floating static hidden: S 10.0.0.0/24 [150/0] via 192.168.2.1

  OSPF neighbour fails:
  Routing table: S 10.0.0.0/24 [150/0] via 192.168.2.1  (floating static activates)
            

5. Dynamic Routes

What Are Dynamic Routes?

Dynamic routes are learned automatically when routers running the same routing protocol exchange information about the networks they know about. As the network topology changes (links fail, new routers are added), the protocol detects those changes and updates the routing table automatically — no administrator intervention required. This makes dynamic routing essential for any network with more than a handful of routers.

Common Dynamic Routing Protocols

Protocol Type Metric AD Route Table Code Best For
eBGP EGP – Path Vector AS-path length + policy 20 B Internet routing between autonomous systems
EIGRP (internal) IGP – Advanced Distance Vector Bandwidth + delay (composite) 90 D Cisco enterprise networks; fast convergence
OSPF IGP – Link State Cost (reference BW ÷ link BW) 110 O Multi-vendor enterprise and service provider networks
IS-IS IGP – Link State Cost 115 i Service provider core networks
RIP v2 IGP – Distance Vector Hop count (max 15) 120 R Small legacy networks and labs
EIGRP (external) IGP – Advanced Distance Vector Bandwidth + delay (composite) 170 D EX Routes redistributed into EIGRP from another protocol
iBGP IGP – Path Vector AS-path + policy 200 B Internal BGP sessions within one AS

Benefits of Dynamic Routing

  • Automatic failover: protocols detect failed links and re-route traffic within seconds (OSPF, EIGRP) or minutes (RIP)
  • Scalability: one protocol configuration manages thousands of routes across hundreds of routers
  • Reduced administration: no need to manually update routes when the topology changes
  • Load balancing: OSPF and EIGRP can install multiple equal-cost paths simultaneously

6. Administrative Distance – How the Router Chooses

When a router learns about the same destination prefix from two different sources (e.g., both a static route and OSPF claim to know how to reach 10.0.0.0/24), it uses Administrative Distance to decide which one to install in the forwarding table. Lower AD = more trusted = wins.

  Same destination learned from two sources:
  OSPF:          O 10.0.0.0/24 [110/2]   via 192.168.1.2  (AD 110)
  Static:        S 10.0.0.0/24 [1/0]     via 192.168.2.1  (AD 1)

  Router installs: S 10.0.0.0/24 [1/0] via 192.168.2.1
  (Static wins because AD 1 < AD 110)
            
Route Source Default AD Routing Table Code
Directly connected interface 0 C / L
Static route 1 S
eBGP (External BGP) 20 B
EIGRP (internal) 90 D
OSPF 110 O
IS-IS 115 i
RIP 120 R
EIGRP (external) 170 D EX
iBGP (Internal BGP) 200 B
Unknown / unreachable 255

Important distinction: AD is used to choose between sources (e.g., OSPF vs. static). Once a source is selected, the metric (cost, hop count, etc.) is used to choose between routes from the same protocol (e.g., two OSPF paths to the same destination).

7. Reading Route Sources in show ip route

The show ip route command displays the entire routing table. Each entry shows the route source code, destination prefix, AD/metric in brackets, next-hop IP, age, and outgoing interface.

Router# show ip route

Codes: C - connected, S - static, R - RIP, O - OSPF, D - EIGRP, B - BGP
       L - local, i - IS-IS ...

Gateway of last resort is 203.0.113.1 to network 0.0.0.0

S*   0.0.0.0/0 [1/0] via 203.0.113.1             ! Default static route (gateway of last resort)
C    10.0.12.0/30 is directly connected, Gi0/0   ! Connected route (network address)
L    10.0.12.1/32 is directly connected, Gi0/0   ! Local host route (router's own IP)
O    10.1.0.0/24 [110/2] via 10.0.12.2           ! OSPF route [AD/metric]
D    10.2.0.0/24 [90/28160] via 10.0.12.2        ! EIGRP route [AD/composite metric]
S    10.3.0.0/24 [1/0] via 192.168.1.1           ! Static route [AD/metric=0]
R    10.4.0.0/24 [120/2] via 10.0.12.2           ! RIP route [AD/hop count]
            

The format [AD/metric] in square brackets is key: the first number is the Administrative Distance (trustworthiness of the source); the second is the metric (cost within that protocol).

8. Connected vs. Static vs. Dynamic – Full Comparison

Feature Connected Static Dynamic
Configuration required No — automatic Yes — per route Yes — protocol configuration only
Administrative Distance 0 1 (default); higher for floating static 20 (eBGP) to 200 (iBGP); protocol-dependent
Automatic failover Yes — removed instantly if interface goes down No (standard); Yes (floating static when primary fails) Yes — protocol detects failure and re-converges
Scalability Very low — limited to directly attached networks Low — every route must be manually entered and maintained High — one protocol instance manages thousands of routes
Convergence Instant No convergence (static; must be manually updated) Automatic; speed depends on protocol (EIGRP fastest; RIP slowest)
Bandwidth overhead None None Small (OSPF/EIGRP incremental updates) to high (RIP full-table every 30 s)
Best used for Foundation for all other routing; local network reachability Default routes, stub networks, backup (floating), small networks Medium to large networks with multiple paths and redundancy requirements

9. When to Use Each Route Source

Scenario Recommended Source Reason
Router’s own directly attached subnets Connected (automatic) No configuration needed; always present when interface is up
Default route (gateway of last resort) to the Internet Static (ip route 0.0.0.0 0.0.0.0 <ISP-gateway>) Simple, deterministic, and preferred over any dynamic route (AD 1)
Stub network with one entry/exit point Static Only one path exists; dynamic protocol overhead is unnecessary
Backup path when primary dynamic route fails Floating static (higher AD than primary protocol) Dormant while primary is active; activates automatically on failure
Medium to large enterprise network with multiple routers Dynamic (OSPF or EIGRP) Automatic failover, load balancing, and scalability
Inter-ISP or multi-AS routing Dynamic (BGP) Policy-based path selection across autonomous systems

10. Key Points & CCNA Exam Tips

  • There are three route sources: connected (AD 0), static (AD 1), and dynamic (AD varies by protocol)
  • Connected routes are created automatically when an interface is assigned an IP and comes up; they produce both a C network entry and an L /32 host entry
  • Connected routes are removed immediately when the interface goes down — no manual cleanup needed
  • Static route syntax: ip route <network> <mask> <next-hop-IP | exit-int> [AD]
  • A floating static route has an AD higher than the primary dynamic protocol (e.g., AD 150 when OSPF = 110); it stays hidden until the primary route disappears
  • Know all major AD values: Connected 0, Static 1, eBGP 20, EIGRP internal 90, OSPF 110, IS-IS 115, RIP 120, EIGRP external 170, iBGP 200, Unknown 255
  • AD selects between sources (static vs. OSPF for the same prefix); metric selects between paths within the same protocol (two OSPF paths to the same prefix)
  • In show ip route output, the format is [AD/metric] — e.g., O 10.1.0.0/24 [110/2] means OSPF, AD 110, cost 2
  • Route codes to memorise: C connected, L local, S static, O OSPF, D EIGRP, R RIP, B BGP
  • An AD of 255 means the route is unusable; the router will not install it
  • A default route (ip route 0.0.0.0 0.0.0.0 <gateway>) matches any destination not found in the routing table and appears as S* in show ip route

Routing Route Sources Quiz

1. What is a connected route?

Correct answer is D. A connected route is created automatically by IOS the moment an interface is assigned an IP address and both the interface and line protocol are in the up state. No ip route command is needed. Two entries appear in the routing table: a C entry for the network and an L /32 entry for the router’s own interface IP.

2. What is the default administrative distance (AD) of a static route?

Correct answer is B. Static routes have a default AD of 1, making them the second most trusted route source after connected routes (AD 0). This means a static route to a destination will always override a dynamic protocol’s route to the same destination unless the static route is configured with a higher AD (floating static).

3. Which routing protocol uses hop count as its metric?

Correct answer is A. RIP uses hop count as its only metric (maximum 15; 16 = unreachable). OSPF uses cost (reference BW ÷ link BW). EIGRP uses a composite metric based on bandwidth and delay. BGP uses AS-path length and policy attributes.

4. What is a floating static route?

Correct answer is C. A floating static route has its AD set higher than the primary routing protocol (e.g., AD 150 when OSPF = 110). While OSPF is active the floating static is hidden from the routing table. If the OSPF route disappears, the floating static “floats” into the table as the backup path — requiring no administrator intervention.

5. Which command displays routing table entries and their administrative distances?

Correct answer is B. show ip route displays the entire routing table including the route source code (C, S, O, D, R, B), destination prefix, and the [AD/metric] values in square brackets. It is the primary verification command for routing.

6. What is the default administrative distance of OSPF?

Correct answer is A. OSPF’s default AD is 110. This places it between EIGRP internal (90) and RIP (120) in trustworthiness. If a router learns the same prefix via both OSPF and RIP, it installs the OSPF route because 110 < 120.

7. What happens to connected routes when the interface goes down?

Correct answer is D. Connected routes exist only while the interface is in the up/up state. The moment the interface goes down, IOS removes both the C and L entries from the routing table. This also triggers routing protocol updates (e.g., OSPF will withdraw the LSA for that network), causing neighbours to re-converge.

8. Which dynamic routing protocol has the lowest default administrative distance?

Correct answer is C. eBGP (External BGP) has a default AD of 20 — the lowest of all dynamic routing protocols. This is intentional: BGP routes learned from external peers are highly trusted because they have been validated by the upstream AS. iBGP has AD 200, making it the least trusted dynamic source.

9. Which route source has the highest trustworthiness (lowest AD)?

Correct answer is B. Connected routes have an AD of 0 — the lowest possible value and therefore the most trusted. A router is directly attached to a connected network; there is no more authoritative source for that route.

10. Which of the following statements about static routes is NOT true?

Correct answer is B. Static routes do not automatically update when a link fails. If the next-hop becomes unreachable and the exit interface is still up, the static route remains in the routing table, causing a black hole. The exception is when the exit interface itself goes down — then the static route is removed. Floating static routes provide a form of automatic failover, but only because the primary dynamic route disappears first.

← Back to Home