CloudTadaInsights
Back to Glossary
Networking

Routing Protocols

"Protocols that determine the best paths for data to travel across networks"

Routing Protocols

Routing protocols are sets of rules that routers use to communicate with each other and share information about network topology. They determine the best paths for data packets to travel across interconnected networks, enabling efficient and reliable data delivery across complex network infrastructures.

Overview

Routing protocols enable routers to exchange information about network reachability, calculate optimal paths, and maintain up-to-date routing tables. They form the foundation of internetworking by allowing different networks to communicate and route traffic effectively.

Types of Routing Protocols

Static Routing

  • Manual Configuration: Administrator manually configures routes
  • No Protocol Overhead: No routing protocol traffic
  • Predictable: Consistent and predictable behavior
  • Maintenance: Requires manual updates when topology changes
  • Use Cases: Simple networks, backup routes, stub networks

Dynamic Routing

  • Automatic Updates: Protocols automatically update routing tables
  • Adaptive: Responds to network changes automatically
  • Protocol Overhead: Generates protocol traffic
  • Complexity: More complex to configure and troubleshoot
  • Use Cases: Complex networks, fault tolerance

Classification by Scope

Interior Gateway Protocols (IGP)

Routing protocols used within an autonomous system (AS):

Distance Vector Protocols

  • Operation: Share routing information with neighbors
  • Metric: Hop count or composite metric
  • Update Frequency: Periodic updates
  • Convergence: Slow convergence
  • Examples: RIP, EIGRP
  • Operation: Share topology information with all routers
  • Metric: Cost based on bandwidth
  • Update Frequency: Event-driven updates
  • Convergence: Fast convergence
  • Examples: OSPF, IS-IS

Hybrid Protocols

  • Operation: Combines distance vector and link-state features
  • Algorithm: Advanced path calculation
  • Convergence: Fast convergence
  • Examples: EIGRP

Exterior Gateway Protocols (EGP)

Routing protocols used between autonomous systems:

Path Vector Protocols

  • Operation: Track AS path to prevent loops
  • Policy-Based: Extensive policy control
  • Convergence: Slow but stable
  • Examples: BGP

Distance Vector Protocols

RIP (Routing Information Protocol)

Versions

  • RIPv1: Classful routing, no VLSM support
  • RIPv2: Classless routing, VLSM support
  • RIPng: IPv6 version of RIP

Characteristics

  • Metric: Hop count (maximum 15 hops)
  • Algorithm: Bellman-Ford algorithm
  • Update Interval: Every 30 seconds
  • Hold-down Timer: 180 seconds for invalid routes
  • Split Horizon: Prevents advertising routes back to source
  • Poison Reverse: Marks routes as unreachable

Configuration Example

TEXT
router rip
version 2
network 192.168.1.0
network 192.168.2.0
no auto-summary

EIGRP (Enhanced Interior Gateway Protocol)

Features

  • Metric: Composite metric (bandwidth, delay, reliability, load)
  • Algorithm: DUAL (Diffusing Update Algorithm)
  • Update Type: Triggered updates only
  • Convergence: Fast convergence
  • Multicast: Uses multicast for updates
  • VLSM Support: Supports variable length subnet masking
  • Unequal Cost Load Balancing: Can balance across unequal paths

Composite Metric Formula

TEXT
Metric = [K1*BW + (K2*BW)/(256-load) + K3*delay] * [K5/(reliability + K4)]

Default values: K1=1, K3=1, K2=K4=K5=0 Simplified: Metric = Bandwidth + Delay

Configuration Example

TEXT
router eigrp 100
network 192.168.1.0 0.0.0.255
network 192.168.2.0 0.0.0.255
metric weights 0 1 1 1 1 1

OSPF (Open Shortest Path First)

Features

  • Metric: Cost based on bandwidth
  • Algorithm: Dijkstra's Shortest Path First (SPF)
  • Update Type: Link-State Advertisements (LSAs)
  • Convergence: Fast convergence
  • Hierarchical Design: Supports areas for scalability
  • Authentication: Supports authentication

Area Types

  • Area 0: Backbone area
  • Standard Areas: Regular OSPF areas
  • Stub Areas: Reduced LSA flooding
  • Totally Stubby Areas: Further reduced LSA flooding
  • NSSA (Not So Stubby Areas): Allow external routes

Cost Calculation

TEXT
Cost = Reference Bandwidth / Interface Bandwidth
Default Reference Bandwidth = 100 Mbps

Configuration Example

TEXT
router ospf 1
router-id 1.1.1.1
network 192.168.1.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 1
area 1 stub

IS-IS (Intermediate System to Intermediate System)

Features

  • Levels: Level 1 (intra-area), Level 2 (inter-area)
  • Metric: Similar to OSPF cost
  • Algorithm: SPF algorithm
  • Design: Influenced OSPF development
  • Standards: ISO standard (OSI protocol)

Levels

  • Level 1: Within area routing
  • Level 2: Between area routing
  • Level 1-2: Both Level 1 and Level 2

Exterior Gateway Protocol: BGP

Border Gateway Protocol

Features

  • Protocol Type: Path vector protocol
  • Algorithm: Policy-based path selection
  • Update Type: Incremental updates
  • Convergence: Slow but stable
  • Scalability: Internet-scale routing
  • Policy Control: Extensive route manipulation capabilities

BGP Attributes

Well-Known Mandatory
  • ORIGIN: How route originated
  • AS_PATH: List of AS numbers to destination
  • NEXT_HOP: Next hop IP address
Well-Known Discretionary
  • LOCAL_PREF: Local preference for route selection
  • ATOMIC_AGGREGATE: Indicates aggregation
Optional Transitive
  • AGGREGATOR: AS number and IP of aggregator
  • COMMUNITY: Community tags for policy
Optional Non-Transitive
  • MED (Multi-Exit Discriminator): Influence inbound traffic
  • ORIGINATOR_ID: Route originator in cluster

BGP Path Selection Process

  1. Weight (Cisco proprietary)
  2. Local preference
  3. Locally originated routes
  4. Shortest AS path
  5. Lowest origin type (IGP < EGP < Incomplete)
  6. Lowest MED
  7. EBGP over IBGP
  8. Lowest IGP cost to next hop
  9. Oldest eBGP path
  10. Lowest router ID
  11. Lowest neighbor address

Configuration Example

TEXT
router bgp 65001
bgp router-id 1.1.1.1
neighbor 10.0.0.2 remote-as 65002
neighbor 10.0.0.2 update-source Loopback0
network 192.168.1.0 mask 255.255.255.0

Routing Protocol Metrics

Distance Vector Metrics

  • Hop Count: Number of routers traversed
  • Bandwidth: Available bandwidth
  • Delay: Cumulative delay
  • Load: Current network load
  • Reliability: Historical reliability
  • Cost: Based on bandwidth
  • Delay: Transmission delay
  • Load: Current utilization
  • MTU: Maximum transmission unit

Administrative Distance

Priority Order (Lower is Better)

  • Connected Interface: 0
  • Static Route: 1
  • EBGP: 20
  • Internal EIGRP: 90
  • IGRP: 100
  • OSPF: 110
  • IS-IS: 115
  • RIP: 120
  • External EIGRP: 170
  • Unknown Route: 255

Route Selection Process

Steps

  1. Longest Prefix Match: Most specific route wins
  2. Administrative Distance: If prefixes are same length
  3. Metric: If AD is same, lowest metric wins

Routing Information Exchange

Neighbor Discovery

  • Hello Protocol: Discover and maintain neighbor relationships
  • Dead Timer: Detect neighbor failures
  • Adjacency Formation: Establish full relationships
  • State Transitions: Progress through protocol states

Route Advertisement

  • Distance Vector: Share routing table with neighbors
  • Link-State: Flood LSAs throughout area
  • Path Vector: Share AS path and attributes

Advanced Routing Concepts

Equal Cost Multi-Path (ECMP)

  • Purpose: Distribute traffic across multiple paths
  • Benefits: Load balancing and redundancy
  • Implementation: Router-level or switch-level
  • Algorithms: Hash-based path selection

Policy-Based Routing (PBR)

  • Purpose: Route based on policies rather than destination
  • Configuration: Match criteria and action
  • Flexibility: More control than traditional routing
  • Use Cases: Traffic engineering, security policies

Route Redistribution

  • Purpose: Share routes between different protocols
  • Challenges: Routing loops, suboptimal paths
  • Tools: Route maps, distribute lists
  • Considerations: Administrative distance, metrics

Security Considerations

Authentication

  • Plain Text: Basic password authentication
  • MD5: Hash-based authentication
  • Keyed SHA: Stronger hashing
  • BGPsec: Secure BGP implementation

Route Filtering

  • Prefix Lists: Filter specific networks
  • Access Lists: Basic permit/deny filtering
  • Route Maps: Complex policy-based filtering
  • Distribute Lists: Interface-based filtering

Common Attacks

  • Route Injection: Unauthorized route advertisements
  • Route Modification: Altering route attributes
  • Route Suppression: Withholding route advertisements
  • Denial of Service: Overwhelming routing tables

Troubleshooting Routing Protocols

Common Problems

  • Routing Loops: Packets circling indefinitely
  • Suboptimal Paths: Traffic taking inefficient routes
  • Convergence Issues: Slow network adaptation
  • Black Holes: Packets disappearing without trace
  • Authentication Failures: Authentication mismatches

Diagnostic Commands

  • show ip route: Display routing table
  • show ip protocols: Display protocol status
  • show ip ospf neighbor: Show OSPF neighbors
  • show ip bgp: Display BGP table
  • debug ip routing: Monitor route updates

Troubleshooting Methodology

  1. Verify Connectivity: Basic ping tests
  2. Check Routing Tables: Verify routes exist
  3. Validate Configuration: Check protocol settings
  4. Monitor Updates: Observe route advertisements
  5. Analyze Metrics: Compare route preferences

Modern Routing Technologies

Segment Routing

  • Concept: Source-based routing
  • Benefits: Simplified network operations
  • Implementation: MPLS or IPv6 data plane
  • Applications: Traffic engineering

Software-Defined Networking (SDN)

  • Controller: Centralized routing decisions
  • Southbound API: Controller to device communication
  • Northbound API: Application to controller communication
  • Benefits: Programmability and flexibility

Intent-Based Networking

  • Abstraction: High-level network goals
  • Translation: Intent to device configurations
  • Assurance: Continuous verification of intent
  • Automation: Self-driving networks

Best Practices

Protocol Selection

  • Network Size: Match protocol to network scale
  • Convergence Requirements: Consider speed needs
  • Administrative Complexity: Evaluate skill requirements
  • Budget Constraints: Factor in licensing costs

Design Principles

  • Redundancy: Multiple paths for reliability
  • Scalability: Plan for growth
  • Security: Implement authentication and filtering
  • Documentation: Maintain current network documentation

Operational Practices

  • Monitoring: Continuous route monitoring
  • Backup: Regular configuration backups
  • Testing: Regular failover testing
  • Documentation: Maintain network diagrams

Future of Routing Protocols

IPv6 Routing

  • RIPng: IPv6 version of RIP
  • OSPFv3: IPv6 version of OSPF
  • BGP4+: BGP with IPv6 NLRI
  • ISIS for IPv6: IS-IS with IPv6 support

Emerging Technologies

  • IPv6 Segment Routing: Source routing for IPv6
  • SRv6: Segment routing over IPv6
  • Intent-Based Networking: Automated routing policies
  • Artificial Intelligence: AI-driven routing decisions

Conclusion

Routing protocols are fundamental to internetworking, enabling global connectivity through intelligent path selection. Understanding the differences between distance vector, link-state, and path vector protocols, along with their appropriate use cases, is crucial for effective network design and operation. The choice of routing protocol depends on network size, complexity, convergence requirements, and administrative expertise. Modern networks increasingly rely on sophisticated routing technologies that combine traditional protocols with software-defined approaches to achieve greater agility and efficiency.