COMP 431 The Network Layer: Routing & Addressing Internet - - PowerPoint PPT Presentation

comp 431 the network layer routing addressing internet
SMART_READER_LITE
LIVE PREVIEW

COMP 431 The Network Layer: Routing & Addressing Internet - - PowerPoint PPT Presentation

COMP 431 The Network Layer: Routing & Addressing Internet Services & Protocols Outline application Network layer services transport network Routing algorithms The Network Layer: data link Least cost path computation


slide-1
SLIDE 1

1

COMP 431 Internet Services & Protocols The Network Layer: Routing & Addressing

Jasleen Kaur

March 31, 2020

2

The Network Layer: Routing & Addressing

Outline

◆ Network layer services ◆ Routing algorithms

» Least cost path computation algorithms

◆ Hierarchical routing

» Connecting networks of networks

◆ IP Internet Protocol

» Addressing » IPv6

◆ Routing on the Internet

» Intra-domain routing » Inter-domain routing

regional ISP home network Institutional network application transport network data link physical application transport network data link physical network data link physical network data link physical network data link physical network data link physical

slide-2
SLIDE 2

3

◆ Application-layer protocols

define when and how messages are sent

The Network Layer

Network layer functions

Physical end- to-end packet delivery

◆ Transport-layer protocols

deliver data between processes

  • n different end-systems

» Transport protocols execute only

  • n end systems

◆ Network-layer protocols

deliver data from one end- system to another

» Network layer protocols execute

  • n every end-system and router

regional ISP home network Institutional network application transport network data link physical application transport network data link physical network data link physical network data link physical

Logical end-to-end transport

network data link physical network data link physical

4

◆ The network-layer provides four

important functions:

» Addressing: the means by which end systems identify each other » Path determination: the route taken by packets from source to destination » Switching: the movement of packets from an input interface to an appropriate output interface » Call setup: The establishment of a virtual circuit from sender to receiver

The Network Layer

Network layer functions

regional ISP home network Institutional network application transport network data link physical application transport network data link physical network data link physical network data link physical network data link physical network data link physical

slide-3
SLIDE 3

10

Network-Layer Service Models

Datagram v. Virtual Circuit networks

◆ IP networks:

» Data exchanged among computers

❖ “Elastic” service, no strict

timing requirements » “Smart” end systems (computers)

❖ Can adapt, perform control,

error recovery

❖ Simple inside the network,

complexity at “edges” » Operates over “any” link layer technology

❖ Uniform service difficult ❖ But interoperation “easy”

» New services easily added (most services implemented at the edge)

◆ ATM Networks

» Evolved from telephony » Human conversation:

❖ Strict timing, reliability

requirements

❖ Need for guaranteed service

» “Dumb” end systems (telephones)

❖ Tremendous complexity inside

the network » No interoperation with other networks » New services requires “the network” to be upgraded

11

The Network Layer: Routing & Addressing

Outline

◆ Network layer services ◆ Routing algorithms

» Least cost path computation algorithms

◆ Hierarchical routing

» Connecting networks of networks

◆ IP Internet Protocol

» Addressing » IPv6

◆ Routing on the Internet

» Intra-domain routing » Inter-domain routing

application transport network link physical network application transport network link physical network

network link physical network network link physical network network link physical network network link physical network network link physical network network link physical network network link physical network network link physical network

slide-4
SLIDE 4

12

Routing Algorithms

Least-cost path computation

◆ Goal: To determine a “good”

path through the network from source to destination

◆ Graph abstraction for routing

algorithms:

» Nodes are routers » Edges are physical links » Edges have a “cost” metric

❖ Cost can be delay, monetary

cost, level of congestion, etc.

◆ “Good” path typically means

minimum cost path

» Also shortest path, …

◆ (But often ISPs define “good” in

terms of business models)

2 2 1 3 1 1 2 5 3 5 A B D C F E

13

Routing Algorithms

Taxonomy

◆ Global or decentralized? ◆ Global — all routers have

complete graph (topology, costs)

» “Link state” algorithms

◆ Decentralized — router knows

link costs to physically connected adjacent nodes

» Run iterative algorithm to exchange information with adjacent nodes » “Distance vector” algorithms » (RIP — Routing Information Protocol)

◆ Static or dynamic?

» Static — routes change slowly over time » Dynamic — routes change more quickly

❖ Periodic updates, or ❖ Updates in response to link

  • utages or cost changes

2 2 1 3 1 1 2 5 3 5 A B D C F E

slide-5
SLIDE 5

14

Global Routing Algorithms

A link-state routing algorithm

◆ Uses Dijkstra’s shortest path graph algorithm ◆ Complete network topology and link costs known at all nodes

» Accomplished via link state flooding » All nodes learn the “same” topology and cost data

◆ Each node computes least cost paths from itself to all other

nodes

» Produces a routing table for that node » All nodes compute consistent routing tables

◆ Algorithm complexity:

» N nodes (routers) in the network » N x (N+1)/2 comparisons » (More efficient implementations possible)

2 2 1 3 1 1 2 5 3 5 A B D C F E

15

Link State Routing

Dijsktra’s Algorithm

1 Initialization: 2 N = {A} 3 for all nodes v 4 if v adjacent to A 5 then D(v) = c(A,v) 6 else D(v) = infinity 7 8 Loop 9 find node w not in N such that D(w) is a minimum 10 add node w to N 11 update D(v) for all nodes v adjacent to w and not in N: 12 D(v) = min( D(v), D(w) + c(w,v) ) 13 /* new cost to node v is either old cost to v or known 14 shortest path cost to w plus cost from w to v */ 15 until all nodes in N N is the set of nodes to which we have computed the minimum cost path D(x) is the current minimum cost path to x c(n,m) is the cost of the link from n to m

2 2 1 3 1 1 2 5 3 5 A B D C F E

slide-6
SLIDE 6

17

2 2 1 3 1 1 2 5 3 5 A B D C F E

Link State Routing

Dijkstra’s algorithm: example

Step 1 2 3 4 5 start N A AD ADE ADEB ADEBC ADEBCF D(B),p(B) 2,A 2,A 2,A D(C),p(C) 5,A 4,D 3,E 3,E D(D),p(D) 1,A D(E),p(E) infinity 2,D D(F),p(F) infinity infinity 4,E 4,E 4,E N is the set of nodes to which we have computed the minimum cost path D(x) is the current minimum cost path to x p(x) is the predecessor of x on the current minimum cost path to x

18

2 2 1 3 1 1 2 5 3 5 A B D C F E

Link State Routing

Link state routing table

A B C E F

first node in least cost path

Link State Routing Table for D Link State Routing Table for A B C D E F

first node in least cost path

E → F E → C D → E B D A B E E E B D D D D E → F B E A E → C

slide-7
SLIDE 7

19

Link State Routing

Link State Flooding Algorithm

◆ The data stored for an edge in the graph (the link between nodes

X and Y) consists of:

» Cost from X to Y (X-Y) and from Y to X (Y-X) » A unique timestamp for the last update to each cost

◆ A node that discovers a change in cost for one of its attached

links forwards the update to all adjacent nodes

◆ A node receiving an update forwards it based on a comparison of

the update timestamp and the timestamp on its local data for the link:

» Update is later (or new): Forward to all adjacent nodes (except sender) and update local data » Update is earlier: Send local data back to sender » Update is equal: Do nothing

20

2.

2 1 1 1 2 5 3 5 A B D C F E 2

D→C = ∞ C→D = ∞

Link State Flooding Algorithm

Example

1.

2 2 1 3 1 1 2 5 3 5 A B D C F E

3.

2 2 1 1 1 2 5 3 5 A B D C F E

D→C = ∞ C→D = ∞ 4.

2 2 1 1 1 2 5 3 5 A B D C F E

D→C = ∞ C→D = ∞

slide-8
SLIDE 8

21

Link State Flooding Algorithm

Example (Continued)

2 2 1 1 1 2 5 3 5 A B D C F E

5. D→C = ∞ C→D = ∞ C→D = ∞ 3.

2 2 1 1 1 2 5 3 5 A B D C F E

D→C = ∞ C→D = ∞ 4.

2 2 1 1 1 2 5 3 5 A B D C F E

D→C = ∞ C→D = ∞ 6.

2 2 1 1 1 2 5 3 5 A B D C F E

D→C = ∞ D→C = ∞ C→D = ∞

22

e 1 1

A D C B

Node D C B Path to A A D C e 1 1

A D C B

Node D C B Path to A C B A e 1 1

A D C B

Node D C B Path to A A D C

…recompute …recompute

Link State Routing

Oscillating routes

◆ “Route oscillations” are possible in link state algorithms ◆ Let the link cost equal the amount of carried traffic

» Assume the link cost is updated as traffic changes Node D C B Path to A A B A

Initially

e 1 1

A D C B

…recompute

2+e 1 1+e 2+e 1 1+e 2+e 1 1+e 1 1+e e