Routing Concepts

Master IP routing protocols and configuration for Cisco networks

Routing Fundamentals

Routing is the process of selecting paths in a network along which to send network traffic.

Routing Table Components
Codes: C - connected, S - static, R - RIP, O - OSPF
Gateway of last resort is 192.168.1.1 to network 0.0.0.0

O 10.1.1.0/24 [110/65] via 192.168.1.2, 00:12:45, Gig0/0
C 192.168.1.0/24 is directly connected, Gig0/0
S* 0.0.0.0/0 [1/0] via 192.168.1.1
Administrative Distance
Route Source Default AD
Connected 0
Static 1
EIGRP Summary 5
OSPF 110
RIP 120

Static Routing Configuration

Router(config)# ip route 192.168.2.0 255.255.255.0 192.168.1.2
# Destination Network # Subnet Mask # Next-Hop

Router(config)# ip route 0.0.0.0 0.0.0.0 192.168.1.1
# Default route

Router(config)# ip route 10.0.0.0 255.0.0.0 GigabitEthernet0/1
# Using exit interface

Dynamic Routing Protocols

OSPF (Open Shortest Path First)
  • Link-state protocol
  • Uses Dijkstra's algorithm
  • AD: 110
  • Supports VLSM and CIDR
  • Multicast: 224.0.0.5/6
EIGRP (Enhanced IGRP)
  • Advanced distance-vector
  • Cisco proprietary
  • AD: 90 (internal), 170 (external)
  • Uses DUAL algorithm
  • Multicast: 224.0.0.10
RIP (Routing Information Protocol)
  • Distance-vector protocol
  • AD: 120
  • Max hop count: 15
  • RIPv2 supports VLSM
  • Multicast: 224.0.0.9
Protocol Comparison
Feature OSPF EIGRP
Type Link-state Advanced distance-vector
Metric Cost (bandwidth) Composite (BW + delay)
Convergence Fast Very fast
Standards Open standard Cisco proprietary

OSPF Deep Dive

OSPF Network Types
Type DR/BDR Hello Timer
Broadcast Yes 10s
Point-to-point No 10s
Non-broadcast Yes 30s
OSPF States
  1. Down → Init → 2-Way
  2. ExStart → Exchange
  3. Loading → Full

OSPF LSA Types

Type Description Generated By
1 Router LSA All routers
2 Network LSA DR
3 Summary LSA ABR
5 External LSA ASBR

OSPF Area Design

OSPF Area Design

All areas must connect to Area 0 (Backbone Area)

EIGRP Deep Dive

EIGRP Packet Types
Packet Purpose
Hello Neighbor discovery
Update Route information
Query Route recomputation
Reply Response to query
EIGRP Metric Calculation

Metric = 256×(K1×BW + K2×BW/(256-load) + K3×delay)

Default K-values: K1=1, K2=0, K3=1, K4=0, K5=0

Simplified: 256×(10⁷/min BW) + sum of delays)

DUAL Concepts

Successor

The primary route with the lowest metric to a destination

Feasible Successor

Backup route that meets the feasibility condition (AD < FD)

Key Commands
Show Routing Table
Router# show ip route
OSPF Verification
Router# show ip ospf neighbor
Router# show ip ospf interface
EIGRP Verification
Router# show ip eigrp neighbors
Router# show ip eigrp topology
Troubleshooting Tips
  • Check layer 1/2 connectivity first
  • Verify matching AS numbers
  • Check network statements
  • Verify hello/dead timers match
  • Check authentication settings