27 Oct 2019 SE 428: Advanced Computer Networks 1 Intra- and Inter-Network Routing 27 October 2019 Lecture 1 Some Slide Credits: Jennifer Rexford and Michael Schapira Some Slides Adapted From: James Kurose and Keith Ross
27 Oct 2019 SE 428: Advanced Computer Networks 1
Intra- and Inter-Network
Routing
27 October 2019
Lecture 1
Some Slide Credits: Jennifer Rexford and Michael Schapira
Some Slides Adapted From: James Kurose and Keith Ross
Topics for Today
β’ Routing Goals
β’ Intra-Network Routing: OSPF
β’ Inter-Network Routing Intro
Sources: PD 3.3.3, 4.1.2
27 Oct 2019 SE 428: Advanced Computer Networks 2
27 Oct 2019 SE 428: Advanced Computer Networks 3
Routing protocols on the internet
β’ Treated extensively in SE 331: Introduction to Computer Networks
β’ Routing information protocol (RIP)
β Distance vector routing
β Uses Bellman-Ford algorithm
β Outdated, suffers from count-to-infinity problem
β’ Open shortest path first (OSPF)
β Link state routing
β Runs over Layer 3 (over IP)
β Uses Dijkstra algorithm to determine shortest paths
β’ Intermediate System to Intermediate System IS-IS
β Link state routing β similar to OSPF
β Runs over Layer 2 (under IP)
β’ Border gateway protocol (BGP)
β Between networks (administrative domains, Autonomous Systems)
β Path-vector routing
β Consideration of business agreements
Routing criteria
Correctness
Every packet is delivered to its
destination
EfficiencyChoose paths with
small delay and high throughput (network
wide)
ComplexitySetting up routing
tables
Making routing decisions
Robustness
Cope with topology changes
No network reboot
Adaptiveness
Load balancing and traffic control
Fairness
All users get the same degree of
service
27 Oct 2019 SE 428: Advanced Computer Networks 4
Path costs, Routing metrics
Minimum hop
Number of channels traversed
Shortest pathChannels have statically
assigned weights and the cost of a path is the sum of costs of
the edges
Presumes no negative-cost cycles
Minimum delayChannels have dynamically
assigned weights based on the traffic on the channel
Routing tables are repeatedly revised such that paths with close
to minimal delays are chosen
27 Oct 2019 SE 428: Advanced Computer Networks 5
27 Oct 2019 SE 428: Advanced Computer Networks 6
Destination-based routing
Decision where to forward a packet depends only on the
destination of a packet (not on its source)
Optimal paths can be determined, when
1. The cost of sending a packet via a path is independent of
the amount of traffic on the path.
2. The cost of the concatenation of two paths equals the
sum of the costs of the concatenated paths.
3. The communication network does not contain cycles with
negative cost.
So Far
β’ Routing Goals
β’ Intra-Network Routing: OSPF
β’ Inter-Network Routing
β Classless Interdomain Routing (CIDR)
β BGP
27 Oct 2019 SE 428: Advanced Computer Networks 7
27 Oct 2019 SE 428: Advanced Computer Networks 8
RIP Issues: Stability problem
β’ Loops may form and stability cannot occur without
βcounting to infinityβ.
β’ Timing of events may cause cycles of updates.
2
1
0
3
27 Oct 2019 SE 428: Advanced Computer Networks 9
(Partial) Solutions for Stability
β’ Pick small value for βinfinityββ If βinfinityβ is 16 then at most 15 hops in network
β Distance of 16 considered unreachable
β’ Disallow cyclic updatesβ Called split horizon algorithm
β Donβt send updates learned from a neighbor back to that neighbor
β Only works for small (e.g. 2-hop) cycles
β’ Route Poisoningβ Introduces artificial delay
OSPFv2 (1998)
β’ RFC 2328
β’ IPv4
β’ In protocol authentication
of routers and
completeness of
messages
β’ Atoms are networks and
subnets
β’ Routers identified by
Router ID and/or IP
address
OSPFv3 (2008)
β’ RFC 5340
β’ IPv4 + IPv6
β’ Authentication at IP layer
(IPSec)
β’ Completeness at IP layer
β’ Atoms are links (may
have multiple subnets)
β’ Router IDs and IP
addresses are disjoint
27 Oct 2019 SE 428: Advanced Computer Networks 10
Open Shortest Path First (OSPF)
27 Oct 2019 SE 428: Advanced Computer Networks 11
Open Shortest Path First (OSPF)
β’ Each node sends a reliable flood of information to all other nodesβ In v3, can limit the flooding scope
β’ These Link-State Packets (LSPs) containβ ID of the node that created the packet
β List of (neighbor, cost) pairs associated with the source node
β Sequence Number (64bitsβno wrapping)
β Time To Live (ensure old info is eventually removed)
β Authentication (v2) β password or message authenticity code (MAC)
Reliable Flooding
β’ Adjacent routers reliably
send updates (ACKs)
β’ Source sends to all
neighbors
β’ Recipients
β Send to all neighbors
except the one it got the
message from
β Ignores duplicates
Local Calculations
β’ Once all of the link-state
info has been flooded
each node has complete
network topology
β’ Compute routing
information using
Dijkstraβs shortest-path
algorithm
β’ Periodic updates and
failure detection are like
RIP.
27 Oct 2019 SE 428: Advanced Computer Networks 12
OSPF Steps
X A
C B D
27 Oct 2019 SE 428: Advanced Computer Networks 13
OSPF Features
β’ Authentication of routing messages (v2)
β Misconfigured or malicious host could advertise bad route info (i.e.
reach anywhere in 0 hops)
β Prevent routers from accidentally joining a network
β Prevent malicious or accidental changes to route information
β (Eventually added to RIP too.)
β’ Additional Hierarchy
β Partitions domains into areas
β Reduces transmission & storage overhead
β’ Load Balancing
β Multiple routes with same cost
β Traffic evenly distributed
Dijkstraβs AlgorithmNode has two lists β Confirmed and Tentative - pairs of (Destination, Cost, Next-Hop)
Algorithm:1. Initialize Confirmed with an
entry for self with cost 0.
2. For the node just added to Confirmed in the previous step, (πππ₯π‘), examine its Link State Packet (LPS).
3. For each ππππβ of πππ₯π‘, calculate the distance to ππππβ via πππ₯π‘cππ π‘ = (π πππ β πππ₯π‘) + (πππ₯π‘ βππππβ)a) If ππππβ isnβt on Confirmed or
Tentative, add (ππππβ, πππ π‘, ππ») to Tentative, where ππ» is the way to reach πππ₯π‘ in Confirmed.
a) If ππππβ is on Tentative and πππ π‘ is better than the old cost, replace it with (ππππβ, πππ π‘, ππ»), where ππ» is the way to reach πππ₯π‘ in Confirmed.
4. If Tentative is empty, stop.
5. Choose the node on Tentative with the lowest cost, move it to Confirmed, and go to step 2.
27 Oct 2019 SE 428: Advanced Computer Networks 14
27 Oct 2019 SE 428: Advanced Computer Networks 15
Dijkstra Example
A
B
D
C
2
11
10
53
27 Oct 2019 SE 428: Advanced Computer Networks 16
Dijkstra Example
A
B
D
C
2
11
10
53
27 Oct 2019 SE 428: Advanced Computer Networks 17
Dijkstra Example 2
So Far
β’ Routing Goals
β’ Intra-Network Routing: OSPF
β’ Inter-Network Routing
β Classless Interdomain Routing (CIDR)
27 Oct 2019 SE 428: Advanced Computer Networks 18
Inter- versus Intra-
β’ Intra-Network Routing β driving within a single city
β’ Inter-Network Routing β driving between cities
β’ Different decisions:
β Traffic lights
β Narrow streets
β Speed bumps
β One way streets
β’ Fastest versus Shortest
β’ What shape is the internet?
27 Oct 2019 SE 428: Advanced Computer Networks 19
The old shape (1990s)
27 Oct 2019 SE 428: Advanced Computer Networks 20
A newer picture
27 Oct 2019 SE 428: Advanced Computer Networks 21
27 Oct 2019 SE 428: Advanced Computer Networks 22
Organizations and Backbone
27 Oct 2019 SE 428: Advanced Computer Networks 23
β’ Key Concept: Autonomous System (AS) (aka Routing
Domain)
Organizations and Backbone
27 Oct 2019 SE 428: Advanced Computer Networks 24
Conclusion
β’ Routing Goals
β’ Intra-Network Routing: OSPF
β’ Inter-Network Routing
β Classless Interdomain Routing (CIDR)
27 Oct 2019 SE 428: Advanced Computer Networks 25