Catalog / Routing Protocols Cheatsheet

Routing Protocols Cheatsheet

A quick reference guide to routing protocols, covering key concepts, types, metrics, and configuration commands.

Routing Protocol Fundamentals

Core Concepts

Routing: The process of forwarding packets from one network to another.

Routing Protocol: A set of rules and procedures that routers use to exchange information about network topology and determine the best path for data transmission.

Routing Table: A table stored in a router that lists the best paths to various network destinations.

Static Routing: Manually configured routes. Simple but not adaptable to network changes.

Dynamic Routing: Routes are automatically learned and updated by routing protocols. More complex but adaptable.

Convergence: The process by which routers agree on network topology and establish consistent routing tables after a change.

Types of Routing Protocols

Distance Vector

Share routing information with neighbors. Examples: RIP.

Link State

Maintain a complete map of the network. Examples: OSPF, IS-IS.

Path Vector

Share path information, including autonomous systems. Example: BGP.

Autonomous Systems (AS)

Autonomous System (AS): A collection of networks under a common administration.

Interior Gateway Protocols (IGPs): Routing protocols used within an AS (e.g., OSPF, RIP, EIGRP).

Exterior Gateway Protocols (EGPs): Routing protocols used between ASs (e.g., BGP).

Distance Vector Protocols

RIP (Routing Information Protocol)

Overview

A distance-vector routing protocol that uses hop count as a metric.

Maximum Hop Count

Limited to a maximum of 15 hops, making it unsuitable for large networks. 16 is considered infinity, thus unreachable.

Update Interval

Sends routing updates every 30 seconds.

RIPv1

Classful routing protocol (does not support VLSM).

RIPv2

Classless routing protocol (supports VLSM and authentication).

RIP Configuration (Cisco IOS)

router rip
 version 2
 network <network-address>
 no auto-summary  # Disable auto summarization for VLSM support

Verification

show ip route
show ip protocols

Link State Protocols

OSPF (Open Shortest Path First)

Overview

A link-state routing protocol that uses Dijkstra’s algorithm to calculate the shortest path.

Metric

Cost, based on bandwidth. Cost = Reference Bandwidth / Interface Bandwidth. Reference bandwidth is 100 Mbps by default.

Areas

Supports hierarchical design using areas. Area 0 is the backbone area.

LSAs (Link State Advertisements)

Routers exchange LSAs to build a topological map of the network.

Neighbors

Forms neighbor relationships with routers on the same network segment.

OSPF Configuration (Cisco IOS)

router ospf <process-id>
 network <network-address> <wildcard-mask> area <area-id>

Example

router ospf 1
 network 192.168.1.0 0.0.0.255 area 0

Verification

show ip route
show ip ospf neighbor
show ip ospf interface

Path Vector Protocol

BGP (Border Gateway Protocol)

Overview

An inter-AS routing protocol used to exchange routing information between different autonomous systems.

eBGP (External BGP)

Used for routing between different autonomous systems.

iBGP (Internal BGP)

Used for routing within the same autonomous system.

Attributes

Uses attributes to determine the best path, such as AS_PATH, MED, and Local Preference.

BGP Configuration (Cisco IOS)

router bgp <ASN>
 neighbor <neighbor-ip> remote-as <neighbor-ASN>
 network <network-address> mask <subnet-mask>

Example

router bgp 65001
 neighbor 10.1.1.2 remote-as 65002
 network 192.168.2.0 mask 24

Verification

show ip bgp summary
show ip bgp neighbors
show ip bgp