Docsity

Network Layer - Computer Networks - Lecture Slides, Slides of Computer Science

Toggle sidebar
bg1
4: Network Layer 4a-1
Chapter 4: Network Layer
Chapter goals:
understand principles
behind network layer
services:
routing (path selection)
dealing with scale
how a router works
advanced topics: IPv6,
multicast
instantiation and
implementation in the
Internet
Overview:
network layer services
routing principle: path
selection
hierarchical routing
IP
Internet routing protocols
reliable transfer
intra-domain
inter-domain
what‟s inside a router?
IPv6
multicast routing
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d

Partial preview of the text

Download Network Layer - Computer Networks - Lecture Slides and more Slides Computer Science in PDF only on Docsity!

4: Network Layer 4a-

Chapter 4: Network Layer

Chapter goals:

 understand principles behind network layer services:  routing (path selection)  dealing with scale  how a router works  advanced topics: IPv6, multicast

 instantiation and implementation in the Internet

Overview:

 network layer services  routing principle: path selection  hierarchical routing  IP  Internet routing protocols reliable transfer  intra-domain  inter-domain  what‟s inside a router?  IPv  multicast routing

4: Network Layer 4a-

Network layer functions

 transport packet from sending to receiving hosts  network layer protocols in

every host, router

three important functions:

 path determination: route

taken by packets from source

to dest.Routing algorithms

 switching: move packets from

router‟s input to appropriate router output

 call setup: some network

architectures require router call setup along path before data flows

network data link physical

network data link physical

network data link physical

network data link physical

network data link physical

network data link physical

network data link physical

network data link physical

application transport network data link physical

application transport network data link physical

4: Network Layer 4a-

Virtual circuits

 call setup, teardown for each call before data can flow

 each packet carries VC identifier (not destination host ID)

 every router on source-dest path s maintain “state” for

each passing connection  transport-layer connection only involve two end systems  link, router resources (bandwidth, buffers) may be

allocated to VC

 to get circuit-like perf.

“source-to-dest path behaves much like telephone

circuit”

 performance-wise  network actions along source-to-dest path

4: Network Layer 4a-

Virtual circuits: signaling protocols

 used to setup, maintain teardown VC

 used in ATM, frame-relay, X.

 not used in today‟s Internet

application transport network data link physical

application transport network data link physical

  1. Initiate call (^) 2. incoming call
  2. Call connected 3. Accept call
  3. Data flow begins 6. Receive data

4: Network Layer 4a-

Network layer service models:

Network Architecture

Internet

ATM

ATM

ATM

ATM

Service Model

best effort

CBR

VBR

ABR

UBR

Bandwidth

none

constant rate guaranteed rate guaranteed minimum none

Loss

no

yes

yes

no

no

Order

no

yes

yes

yes

yes

Timing

no

yes

yes

no

no

Congestion feedback

no (inferred via loss) no congestion no congestion yes

no

Guarantees?

 Internet model being extended: Intserv, Diffserv  Chapter 6

4: Network Layer 4a-

Datagram or VC network: why?

Internet

 data exchange among computers  “elastic” service, no strict timing req.  “smart” end systems (computers)  can adapt, perform control, error recovery  simple inside network, complexity at “edge”  many link types  different characteristics  uniform service difficult

ATM

 evolved from telephony  human conversation:  strict timing, reliability requirements  need for guaranteed service  “dumb” end systems  telephones  complexity inside network

4: Network Layer 4a-

Routing Algorithm classification

View: global or local

 global: graph of entire network (routers, links). [link state]  local: partial knowledge of remote parts of network. [distance vector approach]

Centralized or decentralized

 one node maintains view, and distributes routes to other nodes  all nodes maintain view

Static or dynamic?

Static:  infrequent route changes  infrequent view update; static link costs (e.g. up/down) Dynamic:  frequent periodic route changes  frequent view update; dynamic link costs (e.g. delay)

4: Network Layer 4a-

A Link-State Routing Algorithm

Dijkstra‟s algorithm

 net topology, link costs known to all nodes  accomplished via “link state broadcast”  all nodes have same info

 computes least cost paths from one node („source”) to all other nodes  gives routing table for that node

 iterative: after k iterations, know least cost path to k dest.‟s

Notation:

 c(i,j): link cost from node i

to j. cost infinite if not direct neighbors

 D(v): current value of cost

of path from source to dest. V

 p(v): predecessor node

along path from source to v, that is next v

 N: set of nodes whose

least cost path definitively known

4: Network Layer 4a-

Dijkstra‟s algorithm: example

Step 0 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

A
D E
B C
F

2 2 1

3

1

1 2

5

3

5

4: Network Layer 4a-

Dijkstra‟s algorithm, discussion

Algorithm complexity: n nodes

 each iteration: need to check all nodes, w, not in N

 n(n+1)/2 comparisons: O(n*2)

 more efficient implementations possible: O(nlogn)

Oscillations possible: (ADAPTING TOO QUICKLY)

 e.g., link cost = amount of carried traffic

A
D
C
B

(^1) 1+e

0 e

e

(^1 )

0 0

A
D
C
B

2+e (^0)

0 0

1+e 1

A
D
C
B

(^0) 2+e

(^1) 1+e

0 0

A
D
C
B

2+e (^0)

0 e

1+e 1

initially

… recompute routing

… recompute … recompute

4: Network Layer 4a-

Distance Table: example

A
E D
B C

7 8 1 2

1

2

D ()

A

B

C

D

A

B

D

E cost to destination via

D (C,D)

E

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

D (A,D)

E

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

D (A,B)

E

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

loop!

loop!

4: Network Layer 4a-

Distance table gives routing table

D ()

A

B

C

D

A

B

D

E cost to destination via

A

B

C

D

A,

D,

D,

D,

Outgoing link to use, cost

Distance table Routing table

4: Network Layer 4a-

Distance Vector Algorithm:

1 Initialization: 2 for all adjacent nodes v: 3 D (,v) = infty / the * operator means "for all rows" / 4 D (v,v) = c(X,v) 5 for all destinations, y 6 send min D (y,w) to each neighbor / w over all X's neighbors */

X X

X w

At all nodes, X:

4: Network Layer 4a-

Distance Vector Algorithm (cont.):

8 loop 9 wait (until I see a link cost change to neighbor V 10 or until I receive update from neighbor V) 11 12 if (c(X,V) changes by d) 13 /* change cost to all dest's via neighbor v by d / 14 / note: d could be positive or negative / 15 for all destinations y: D (y,V) = D (y,V) + d 16 17 else if (update received from V wrt destination Y) 18 / shortest path from V to some Y has changed / 19 / V has sent a new value for its min DV(Y,w) / 20 / call this received new value is "newval" */ 21 for the single destination y: D (Y,V) = c(X,V) + newval 22 23 if we have a new min D (Y,w)for any destination Y 24 send new value of min D (Y,w) to all neighbors 25 26 forever

w

X X

X X

X

w w