squirrelworks

Routing Protocols


A routing protocol specifies how routers communicate with each other to distribute information that enables them to select paths between nodes on a network. Routers perform the traffic directing functions on the Internet; data packets are forwarded through the networks of the internet from router to router until they reach their destination computer.

Routing algorithms determine the specific choice of route. Each router has a prior knowledge only of networks attached to it directly. A routing protocol shares this information first among immediate neighbors, and then throughout the network.

The ability of routing protocols to dynamically adjust to changing conditions such as disabled connections and components and route data around obstructions is what gives the Internet its fault tolerance and high availability.
Routing protocols are OSI network layer, regardless of their transport mechanism's layer:

  • IS-IS runs on the data link layer (Layer 2)
  • Open Shortest Path First (OSPF) is encapsulated in IP, but runs only on the IPv4 subnet, while the IPv6 version runs on the link using only link-local addressing.
  • IGRP, and EIGRP are directly encapsulated in IP. EIGRP uses its own reliable transmission mechanism, while IGRP assumed an unreliable transport.
  • Routing Information Protocol (RIP) runs over the User Datagram Protocol (UDP). Version 1 operates in broadcast mode, while version 2 uses multicast addressing.
  • BGP runs over the Transmission Control Protocol (TCP).

Distance Vector

Distance Vector Routing (DVR) is a dynamic routing algorithm where routers determine the best path for data based on distance (usually hop count) and vector (direction/next-hop router). Each router shares its entire routing table with directly connected neighbors periodically, allowing them to calculate the shortest path to all destinations.

Distance-vector routing protocols measure the distance by the number of routers a packet has to pass; one router counts as one hop. Some distance-vector protocols also take into account network latency and other factors that influence traffic on a given route. To determine the best route across a network, routers using a distance-vector protocol exchange information with one another, usually routing tables plus hop counts for destination networks and possibly other traffic information. Distance-vector routing protocols also require that a router inform its neighbours of network topology changes periodically.

The term distance vector refers to the fact that the protocol manipulates vectors (arrays) of distances to other nodes in the network. The distance vector algorithm was the original ARPANET routing algorithm and was implemented more widely in local area networks with the Routing Information Protocol (RIP).


Mechanism:

Pros

Simple to configure, low memory/computational requirements, and suitable for small networks.

Cons

Slow convergence (takes time to update all routers), prone to routing loops, and not scalable for large networks

Link State

Link state routing is a dynamic routing method where each router builds a complete map (topology) of the network by exchanging status information about its directly connected links with all other routers. Using Dijkstra's algorithm, each router independently calculates the shortest path to every destination.

In link-state routing protocols, each router possesses information about the complete network topology. Each router then independently calculates the best next hop from it for every possible destination in the network using local information of the topology. The collection of best next hops forms the routing table.

This contrasts with distance-vector routing protocols, which work by having each node share its routing table with its neighbours. In a link-state protocol, the only information passed between the nodes is the information used to construct the connectivity maps.


Link-State Advertisements (LSAs)

Routers flood information about their neighbors, not their entire routing table, to all other routers.


Complete Topology View

Every router maintains an identical, synchronized database of the entire network structure.


Fast Convergence

When a network change occurs, routers quickly flood updates, allowing for rapid adaptation compared to distance-vector protocols.

Pros

Highly scalable for large networks, fast convergence, and reduced routing loops.

Cons

Requires more memory and CPU power to calculate routes and maintain the map

Open Shortest Path First

OSPF is essential for enterprise networks that need fast, reliable routing with efficient, fast convergence. It is a widely used link-state interior gateway routing protocol that calculates the shortest, most efficient path for data packets within an IP network, typically within a single autonomous system. It uses Dijkstra’s algorithm to determine routes, offering fast convergence, high scalability, and support for large, complex networks


Link-State Protocol

Instead of sharing routing tables, OSPF routers share network topology information (Link State Advertisements - LSAs) to build a map of the network.


Dijkstra's Algorithm

router calculates the best path independently based on a "shortest path first" approach.


Hierarchy & Areas

OSPF improves scalability by dividing networks into areas. Area 0 (backbone) is mandatory,


Open Standard

It is vendor-neutral and supported by almost all network equipment providers.


Neighbor Discovery

Routers use Hello packets to find neighbors and establish adjacencies.

Summary

Internet Protocol (IP) routing protocols have one primary goal: to fill the IP routing table with the current best routes it can find. The goal is simple, but the process and options can be complicated. Routing protocols define various ways that routers chat among themselves to determine the best routes to each destination.

As networks grew more complex over time, routers gained both processing power and Random Access Memory (RAM). As a result, engineers designed newer routing protocols, taking advantage of faster links and faster routers, transforming routing protocols.

Routing protocols help routers learn routes by having each router advertise the routes it knows. Each router begins by knowing only directly connected routes. Then, each router sends messages, defined by the routing protocol, that list the routes. When a router hears a routing update message from another router, the router hearing the update learns about the subnets and adds routes to its routing table. If all the routers participate, all the routers can learn about all subnets in an internetwork.

Credit


Accessibility
 --overview

Agile
 --DevOps overview
 --Principles

API
 --REST best practices
 --REST demo
 --REST vs RPC
 --Wikipedia API

Blockchain
 --overview

Cloud
 --AWS overview

CSS/HTML
 --Bootstrap carousel
 --Grid demo
 --markdown demo

Electricity
 --fundamentals

Encoding
 --Overview

Ergonomics
 --Desk configuration
 --Device fleet
 --Input device array
 --keystroke mechanics
 --Phones & RSI

ERP
 --Anthology overview
 --Ellucian Banner
 --Higher Ed ERP Simulation Lab
 --PeopleSoft Campus Solutions
 --PESC standards
 --Slate data model

Git
 --syntax overview
 --troubleshooting libcrypto

Hardware
 --Device fleet
 --Homelab diagram

Java
 --Fundamentals

Javascript
 --Advanced Interaction: jQuery & UI Frameworks
 --input prompt demo
 --misc demo
 --Time and Date functions
 --Vue demo

Linux
 --grep demo
 --HCI and Proxmox
 --Proxmox install
 --xammp ftp server

Mail flow
 --DKIM, SPF, DMARC
 --MAPI

Microsoft
 --AZ-800: Administering Windows Server Hybrid Core Infrastructure
 --BAT scripting
 --Group Policy
 --IIS
 --robocopy
 --Server 2022 setup - Virtualbox

Misc
 --Applications
 --regex
 --Resources
 --Sustainable Computing
 --Terminology
 --The Humility Protocol: Reality Over Reputation
 --The Jordan Framework: Engineering a Competitive Edge
 --Tribute to Computer Scientists

Networks
 --BGP Peering & Security Hardening Lab
 --CCNA Lammle Study Guide
 --Cisco 1921/K9 router
 --routing protocols
 --throughput calculations

PHP/SQL
 --Cookies
 --database interaction
 --demo, OSI Layers quiz
 --Foreign key constraint demo
 --fundamentals
 --MySQL and PHPmyAdmin setup
 --pagination
 --security
 --session variables
 --SQL fundamentals
 --structures
 --Tables display

Python
 --fundamentals

Security
 --Overview- GRC (Governance, Risk, and Compliance)
 --Security Blog
 --SSH fundamentals

Serialization
 --JSON demo
 --YAML demo