16 Routing Protocols
16 Routing Protocols
Pat Wilbur
[email protected]
Dynamic routing in the real world
Our study of dynamic routing protocols so far is an idealized graph problem:
➢ All routers identical
➢ Network “flat”
➢ … not true in practice
Internet scale with more than hundreds of million destinations:
➢ Can’t store all destinations in routing tables!
➢ Routing table exchange would swamp links!
➢ … naive versions of both link-state and distance-vector algorithms
wouldn’t be able to handle the entire Internet
*
Dynamic routing in the real world
Administrative autonomy:
➢ Internet = network of networks
➢ Each network controls routing in its own network
Global routing system to route between Autonomous Systems (inter-AS)
Autonomous System is a connected group of IP networks that adhere to a
single unique routing policy that differs from the routing policies of its
network's border peers
Two-level routing/hierarchical routing:
➢ Intra-AS: administrator is responsible for choice of routing algorithm
➢ Inter-AS: common standard to which everyone adheres *
Internet at the “top levels”
Source
Internet hierarchy of ASes
Source
Hierarchical routing
Routers in same AS run routing gateway routers
protocol chosen by administrators
of that domain (intra-AS routing
Special routers in AS
protocol)
Run intra-AS routing
Routers in different AS can run protocol with all other
different intra-AS routing routers in AS
protocols
Also responsible for routing
to destinations outside AS
(also run same inter-AS
routing protocol as with
other gateway routers)
*
Intra-AS and inter-AS routing
C.b
B.a
A.a
b A.c c
a a
AS C
a AS B b
d c
AS A b
Gateway routers:
perform inter-AS routing amongst themselves and
perform intra-AS routers with other routers in their AS
*
Intra-AS and inter-AS routing
Inter-AS border (exterior side) of gateway routers
C.b
B.a
A.a
b A.c c
a a
AS C
a AS B b
d c
AS A b
Intra-AS (interior side) of gateway routers
Gateway routers:
perform inter-AS routing amongst themselves and
perform intra-AS routers with other routers in their AS
*
Intra-AS and inter-AS routing
C.b
B.a
A.a
b A.c c
a a
AS C
a AS B b
d c
AS A b
Gateway routers:
perform inter-AS routing amongst themselves and
perform intra-AS routers with other routers in their AS
*
Intra-AS and inter-AS routing
C.b
B.a
A.a
b A.c c
a a
AS C
a AS B b
d c
AS A b
*
Intra-AS and inter-AS routing
C.b
B.a
A.a
b A.c c
a a Host
AS C
a AS B b
h2
Host d c
h1 AS A b
*
Intra-AS and inter-AS routing
C.b
B.a
A.a
b A.c c
a a Host
AS C
a AS B b
h2
Host d c
h1 AS A b
Single packet is often routed over many hops via routes established by
several intra-AS routing protocols and an inter-AS routing protocol
*
Intra-AS and inter-AS routing
C.b
B.a
A.a
b A.c c
a a Host
AS C
a AS B b
h2
Host d c
h1 AS A b
Intra-AS routing within AS A
Single packet is often routed over many hops via routes established by
several intra-AS routing protocols and an inter-AS routing protocol
*
Intra-AS and inter-AS routing
Inter-AS routing between A and B
C.b
B.a
A.a
b A.c c
a a Host
AS C
a AS B b
h2
Host d c
h1 AS A b
Intra-AS routing within AS A
Single packet is often routed over many hops via routes established by
several intra-AS routing protocols and an inter-AS routing protocol
*
Intra-AS and inter-AS routing
Inter-AS routing between A and B
C.b
B.a
A.a
b A.c c
a a Host
AS C
a AS B b
h2
Host d c Intra-AS routing within AS B
h1 AS A b
Intra-AS routing within AS A
Single packet is often routed over many hops via routes established by
several intra-AS routing protocols and an inter-AS routing protocol
*
Intra-AS vs. inter-AS protocols
Intra-AS routing protocols: many choices
Inter-AS routing protocols: standard – why?
Intra-AS routing protocols: focus upon performance optimization
Inter-AS routing protocols: focus upon administrative issues
Intra-AS routing: often static routing based on CIDR, can also be dynamic
(for dynamic, usually RIP protocol or OSPF protocol)
Inter-AS routing: dynamic routing (BGP protocol)
*
Intra-AS routing
Also known as Interior Gateway Protocols (IGPs)
Example IGPs:
➢ RIP: Routing Information Protocol
➢ OSPF: Open Shortest Path First
➢ (E)IGRP: Interior Gateway Routing Protocol (Cisco proprietary)
➢ Static (CIDR entries added statically to route tables)
*
Routing Information Protocol (RIP)
Implementation of distance-vector algorithm
Included in BSD-UNIX Distribution since 1982
Single path distance (path cost) metric: # of hops (max = 15 hops)
➢ Why? Count-to-infinity problem less painful if infinity = 16
➢ But limits RIP to networks with a diameter of 15 hops
Distance vectors exchanged every 30 seconds via Response Message (also
called advertisement)
Each advertisement: route to up to 25 destination (sub)nets
Each link has cost 1, so path cost truly is just # hops
*
RIP: Link failure and recovery
If no advertisement heard after 180 sec → neighbor/link declared dead
➢ routes via neighbor invalidated
➢ new advertisements sent to neighbors
➢ neighbors in turn send out new advertisements (if route tables changed)
➢ link failure info quickly propagates to entire net
➢ small loops are prevented using “poison reverse” mitigation method
(similar to sender header already discussed)
➢ infinite distance = 16 hops → makes count-to-infinity problem with larger
loops less painful
*
RIP: Route table processing
RIP routing tables managed by application-level process called routed
(daemon)
Advertisements sent in UDP packets, periodically repeated
routed process periodically adjusts OS kernel routing table with updates
*
Open Shortest Path First (OSPF)
“open”: publicly available
Implementation of link-state algorithm:
➢ Entire network topology map (graph) stored at each node
➢ Route computation using Dijkstra’s algorithm
OSPF advertisement carries one entry per neighbor router (i.e. link cost to
each neighbor)
Advertisements disseminated to entire AS (via “reliable flooding”) carried in
OSPF protocol messages directly over IP (rather than TCP or UDP)
*
OSPF: Extra features (not in RIP)
Security: all OSPF messages authenticated (to prevent malicious intrusion)
Uses TCP connections (so, acknowledgement)
Multiple same-cost paths can be used at once (single path need not be
chosen as in RIP)
For each link, multiple cost metrics for different “TOS” (types of service):
e.g. high bandwidth, high-delay satellite link cost may set “low” for best effort
or high for real time
Integrated unicast and multicast support: multicast OSPF (MOSPF) uses
same topology data base as OSPF
Hierarchical OSPF in large domains (large ASes)
*
OSPF: Hierarchical OSPF
Two-level hierarchy: local area, backbone area
➢ Link-state advertisements only in level area
➢ Each node has detailed level area topology; only know direction
(shortest path) to nets in other level areas
Area border routers: “summarize” distances to nets in own level area,
advertise to other area border routers
Backbone routers: run OSPF routing limited to backbone area
Boundary routers: connect an AS to other ASes
*
OSPF: Hierarchical OSPF
Within each level area, border router
responsible for routing outside the
level area Exactly one level area is
the backbone area
Backbone area contains all area border routers and possibly others
*
Interior Gateway Routing Protocol
Cisco proprietary, successor of RIP (mid 1980s)
Distance-vector, like RIP but with advanced features similar to OSPF
Several cost metrics (delay, bandwidth, reliability, load, etc) and
administrator decides which cost metrics to use
Uses TCP to exchange routing updates
Loop-free routing via algorithm known as “diffusing update algorithm”
(DUAL finite-state machine) based upon diffused computation
*
Now on to inter-AS routing...
C.b
B.a
A.a
b A.c c
a a
AS C
a AS B b
d c
AS A b
*
Autonomous systems
The Global Internet consists of Autonomous Systems (AS), which are
distinct networks, all interconnected with each other:
➢ Stub AS: small corporation
➢ Multihomed AS: large corporation (no transit traffic)
➢ Transit AS: provider (carries transit traffic)
A major goal of the inter-AS routing protocol is to reduce/minimize transit
traffic (ASes only want to carry traffic for their own customers because of
costs/capitalism/etc.)
Every AS needs an globally unique AS Number (ASN) handed out by
regional registries, used for identifying the AS and exhcanging routing
information with neighboring ASes
*
Inter-AS (Internet) routing: BGP
BGP (Border Gateway Protocol): the de facto standard on the Internet
Implements a “path-vector” algorithm/protocol:
➢ Similar to distance-vector algorithm
➢ Avoids count-to-infinity problem by identifying yourself in a path
advertised to you
➢ Each Border Gateway broadcast to neighbors (peers) includes entire
path (i.e. sequence of ASNs) to destination ASN
*
BGP path attributes & routes
Router may learn about more than 1 route to destination AS, selects route
based upon:
➢ Local preference value attribute: policy decision
➢ Shortest AS-PATH
➢ Closest NEXT-HOP router
➢ Additional criteria
*
BGP path attributes & routes
Suppose: Gateway X send its path to peer Gateway W
➢ W may or may not select path offered by X: e.g. cost, policy (don’t route
via competitor’s AS), loop prevention reasons
➢ If W selects the path advertised by X, then:
Path (W,Z) = W, Path (X,Z)
➢ Note: X can control incoming traffic by controlling its route
advertisements to peers: e.g., don’t want to route traffic to Z → don’t
advertise any routes to Z
*
BGP messages
OPEN: opens TCP connection to peer and authenticates sender
UPDATE: advertises new path (or withdraws old path)
KEEPALIVE keeps connection alive in absence of UPDATES, also
acknowledges OPEN request
NOTIFICATION: reports errors in previous message, also used to close
connection
*
BGP routing policy example 1
legend: provider
B network
X
W A
customer
C
network:
Y
*
BGP routing policy example 2
legend: provider
B network
X
W A
customer
C
network:
Y
*
References & attribution:
Original slides by Patrick F. Wilbur, 2024.
Other slides adapted from slides by Professor Yu Liu and Professor Jeanna Matthews.
In this file, slides marked * are heavily adapted or taken from slides by Professor Yu Liu and Professor Matthews.