Top Banner
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
25

Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

Jul 17, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

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

Page 2: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

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

Page 3: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

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

Page 4: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

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

Page 5: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

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

Page 6: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

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.

Page 7: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

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

Page 8: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

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

Page 9: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

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

Page 10: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

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)

Page 11: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

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)

Page 12: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

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

Page 13: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

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

Page 14: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

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

Page 15: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

27 Oct 2019 SE 428: Advanced Computer Networks 15

Dijkstra Example

A

B

D

C

2

11

10

53

Page 16: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

27 Oct 2019 SE 428: Advanced Computer Networks 16

Dijkstra Example

A

B

D

C

2

11

10

53

Page 17: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

27 Oct 2019 SE 428: Advanced Computer Networks 17

Dijkstra Example 2

Page 18: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

So Far

β€’ Routing Goals

β€’ Intra-Network Routing: OSPF

β€’ Inter-Network Routing

– Classless Interdomain Routing (CIDR)

27 Oct 2019 SE 428: Advanced Computer Networks 18

Page 19: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

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

Page 20: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

The old shape (1990s)

27 Oct 2019 SE 428: Advanced Computer Networks 20

Page 21: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

A newer picture

27 Oct 2019 SE 428: Advanced Computer Networks 21

Page 22: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

27 Oct 2019 SE 428: Advanced Computer Networks 22

Page 23: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

Organizations and Backbone

27 Oct 2019 SE 428: Advanced Computer Networks 23

β€’ Key Concept: Autonomous System (AS) (aka Routing

Domain)

Page 24: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

Organizations and Backbone

27 Oct 2019 SE 428: Advanced Computer Networks 24

Page 25: Intra- and Inter-Network Routing€¦ · State Packet (LPS). 3. For each 𝑁 𝑖 β„Žof 𝑁 π‘₯ , calculate the distance to 𝑁 𝑖 β„Žvia 𝑁 π‘₯ cπ‘œ =( 𝑙 →𝑁 π‘₯

Conclusion

β€’ Routing Goals

β€’ Intra-Network Routing: OSPF

β€’ Inter-Network Routing

– Classless Interdomain Routing (CIDR)

27 Oct 2019 SE 428: Advanced Computer Networks 25