Top Banner
1 ECE453 – Introduction to Computer Networks Lecture 9 - The Network Layer (I) - Routing
19

ECE453 – Introduction to Computer Networks

Jan 21, 2016

Download

Documents

renate

ECE453 – Introduction to Computer Networks. Lecture 9 - The Network Layer (I) - Routing. Recap. Framing Error detection and correction Reliable or unreliable data transfer Channel allocation protocol. network data link physical. network data link physical. logical end-end transport. - PowerPoint PPT Presentation
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: ECE453 – Introduction to Computer Networks

1

ECE453 – Introduction to Computer Networks

Lecture 9 - The Network Layer (I) - Routing

Page 2: ECE453 – Introduction to Computer Networks

2

RecapFramingError detection and correctionReliable or unreliable data transferChannel allocation protocol

Page 3: ECE453 – Introduction to Computer Networks

3

Network Core and Network Edge

applicationtransportnetworkdata linkphysical

applicationtransportnetworkdata linkphysical

networkdata linkphysical

networkdata linkphysical

logical end-end transportNetworkedge

Network core

Page 4: ECE453 – Introduction to Computer Networks

4

Network Core – Information Transmission

Circuit switching Telephone system

Message switching Mail delivery The message travels as a complete unit. At any

one time, it completely exists in one place.

Packet switching The Internet

Page 5: ECE453 – Introduction to Computer Networks

5

Design Issues

Store-and-forward packet switchingServices to the transport layer Connection-oriented vs.

Connectionless Quality of service (QoS)

Page 6: ECE453 – Introduction to Computer Networks

6

Network Layer Services

Connectionless Best-effort No guarantee The Internet No advance setup

is needed Datagram subnet

Connection-oriented Guaranteed delivery ATM A path from the

source router to the destination router is established before any data packets can be sent

Virtual circuit

Page 7: ECE453 – Introduction to Computer Networks

7

The Internet Network Layer

routingtable

Routing protocols•path selection•RIP, OSPF, BGP

IP protocol•addressing conventions•datagram format•packet handling conventions

ICMP protocol•error reporting•router “signaling”

Transport layer: TCP, UDP

Link layer

physical layer

Networklayer

Page 8: ECE453 – Introduction to Computer Networks

8

Routing - In the Middle of Intersection …

Page 9: ECE453 – Introduction to Computer Networks

9

Different Strategies

Nonadaptive algorithms (or static routing)

Adaptive algorithms (or dynamic routing) Global algorithm

(have a global knowledge – a map)

Decentralized algorithm (get information only from neighbor)

Page 10: ECE453 – Introduction to Computer Networks

10

Graph Abstraction for Routing Algorithms

Graph nodes RoutersGraph edge Physical linksEdge weight Link costLink cost Delay, power consumption, congestion

level, $cost, etc.

Good path or optimal path Minimum link cost

A

ED

CB

F

2

2

13

1

1

2

53

5

Page 11: ECE453 – Introduction to Computer Networks

11

Two Fundamental Routing Algorithms

Link state routing A global algorithm

Distance vector routing (or Bellman-Ford routing, Ford-Fulkerson routing) A decentralized algorithm The original ARPANET routing algorithm,

replaced by LS routing in 1979

Page 12: ECE453 – Introduction to Computer Networks

12

A Link State Routing Algorithm

Net topology, link costs known to all nodes accomplished via “link state broadcast” all nodes have the same info

computes least cost paths from the source to all other nodesIterative algorithm

Dijkstra’s algorithm

Page 13: ECE453 – Introduction to Computer Networks

13

Dijkstra’s Algorithm: An Example

Step012345

start NA

ADADE

ADEBADEBC

ADEBCF

D(B),p(B)2,A2,A2,A

D(C),p(C)5,A4,D3,E3,E

D(D),p(D)1,A

D(E),p(E)infinity

2,D

D(F),p(F)infinityinfinity

4,E4,E4,E

A

ED

CB

F

2

2

13

1

1

2

53

5

Page 14: ECE453 – Introduction to Computer Networks

14

Dijkstra’s Algorithm: DiscussionAlgorithm complexity: n nodes each iteration: need to check all nodes, not in N n*(n+1)/2 comparisons: O(n**2) more efficient implementations possible:

O(nlogn)

Oscillations possible: e.g., link cost = amount of carried trafficA

D

C

B1 1+e

e0

e

1 1

0 0

A

D

C

B2+e 0

001+e1

A

D

C

B0 2+e

1+e10 0

A

D

C

B2+e 0

e01+e1

initially… recompute

routing… recompute … recompute

Page 15: ECE453 – Introduction to Computer Networks

15

DV RoutingEach router maintains a distance table Initialization

0 for itself Infinity for non-neighbor Link cost for neighbor

Message exchange between neighbors

When a neighbor first comes up When information changes

(e.g. change in link cost)

Distance vector calculation Minimize cost to each

destination

D ()

A

B

C

D

A

1

7

6

4

B

14

8

9

11

D

5

5

4

2

Ecost to destination via

dest

inat

ion

D (Y,Z)X

distance from X toY, via Z as next hop

c(X,Z) + min {D (Y,w)}Z

w

=

=

Iterative routingDistributed routing

Page 16: ECE453 – Introduction to Computer Networks

16

DV: Example

X Z12

7

Y

X

Y

Z

Page 17: ECE453 – Introduction to Computer Networks

17

DV: Link Cost Changes

X Z14

50

Y1

algorithmterminates

“good news travels fast”

X

Y

Z

Page 18: ECE453 – Introduction to Computer Networks

18

DV: Link Cost Changes

X Z14

50

Y60

algorithmcontinues

on!

“bad news travels slow”

Count to infinity problem

Page 19: ECE453 – Introduction to Computer Networks

19

Distance Table: An Example

A

E D

CB7

8

1

2

1

2

D (C,D)E

c(E,D) + min {D (C,w)}D

w== 2+2 = 4

D (A,D)E

c(E,D) + min {D (A,w)}D

w== 2+3 = 5

D (A,B)E

c(E,B) + min {D (A,w)}B

w== 8+6 = 14

loop!

loop!

D ()

A

B

C

D

A

1

7

6

4

B

14

8

9

11

D

5

5

4

2

Ecost to destination via

dest

inat

ion