+ All Categories
Home > Documents > EEC-484/584 Computer Networks Lecture 11 Wenbing Zhao [email protected] (Part of the slides are based...

EEC-484/584 Computer Networks Lecture 11 Wenbing Zhao [email protected] (Part of the slides are based...

Date post: 21-Dec-2015
Category:
View: 214 times
Download: 0 times
Share this document with a friend
Popular Tags:
40
EEC-484/584 EEC-484/584 Computer Networks Computer Networks Lecture 11 Lecture 11 Wenbing Zhao Wenbing Zhao [email protected] [email protected] (Part of the slides are based on Drs. Kurose & (Part of the slides are based on Drs. Kurose & Ross’s slides for their Ross’s slides for their Computer Networking Computer Networking book, book, and and on materials supplied by on materials supplied by Dr. Louise Moser at UCSB and Prentice-Hall) Dr. Louise Moser at UCSB and Prentice-Hall)
Transcript

EEC-484/584EEC-484/584Computer NetworksComputer Networks

Lecture 11Lecture 11

Wenbing ZhaoWenbing Zhao

[email protected]@ieee.org(Part of the slides are based on Drs. Kurose & Ross’s slides (Part of the slides are based on Drs. Kurose & Ross’s slides

for their for their Computer Networking Computer Networking book, and book, and on materials supplied by on materials supplied by Dr. Louise Moser at UCSB and Prentice-Hall)Dr. Louise Moser at UCSB and Prentice-Hall)

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

22

OutlineOutline

• Quiz#2 results

• Network layer design issues

• Router architecture

• Routing algorithm– Link state routing– Distance vector routing

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

33

EEC484 ResultsEEC484 Results

• High: 96, low: 68, average: 86• Q1: mean 24• Q2: mean 25• Q3: mean 10• Q4: mean 9• Q5: mean 17

0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

60-69 70-79 80-89 90-100

Grade Range

Nu

mb

er o

f S

tud

ents

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

44

EEC584 (TTh) ResultsEEC584 (TTh) Results

• High: 99, low: 70, average: 89• Q1: mean 27• Q2: mean 28• Q3: mean 9• Q4: mean 10• Q5: mean 16 0

2

4

6

8

10

12

60-69 70-79 80-89 90-100

Grand Range

Nu

mb

er o

f S

tud

ents

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

55

EEC584(MW) ResultsEEC584(MW) Results

• High: 94, low: 75, average: 86• Q1: mean 24• Q2: mean 26• Q3: mean 10• Q4: mean 9• Q5: mean 17

0

1

2

3

4

5

6

7

8

9

10

60-69 70-79 80-89 90-100

Grade Range

Nu

mb

er o

f S

tud

ents

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

66

Q5 (TTh)Q5 (TTh)• Six stations, A through F, communicate using the

MACA protocol. The 6 stations are aligned along a line, with gap slightly shorter than the radio range in between two adjacent stations, as shown below. Is it possible for stations B and C, and stations D and E to communicate with each other simultaneously? Elaborate your answer with respect to the MACA protocol.

A B C D E FRadio Range

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

77

Network LayerNetwork Layer• Main concern: end-to-end transmission

– Perhaps over many hops at intermediate nodes

• Services provided to the transport layer– Routing & congestion control– Internetworking – connection of multiple networks

• Goals – services should– Be independent of subnet technologies– Shield transport layer from number, type, topology of

subnets– Uniform network addresses across LAN/WAN

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

88

Network LayerNetwork Layer• Transport segment from sending

to receiving host • On sending side

encapsulates segments into datagrams

• On receiving side, delivers segments to transport layer

• Network layer protocols in every host, router

• Router examines header fields in all IP datagrams passing through it

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

networkdata linkphysical

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

99

Two Key Network-Layer FunctionsTwo Key Network-Layer Functions

• Forwarding: move packets from router’s input to appropriate router output

• Routing: determine route taken by packets from source to dest.

– Routing algorithms

Analogy:

• Routing: process of planning trip from source to dest

• Forwarding: process of getting through single intersection

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

1010

1

23

0111

value in arrivingpacket’s header

routing algorithm

local forwarding tableheader value output link

0100010101111001

3221

Interplay between Routing & ForwardingInterplay between Routing & Forwarding

Forwarding table isalso referred to as routing table

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

1111

Network Service ModelNetwork Service ModelQ: What service model for “channel” transporting datagrams from sender to receiver?

Example services for individual datagrams:

• Guaranteed delivery• Guaranteed delivery

with less than 40 msec delay

• Best effort

Example services for a flow of datagrams:

• In-order datagram delivery

• Guaranteed minimum bandwidth to flow

• Restrictions on changes in inter-packet spacing

• No guarantee whatsoever

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

1212

Network Layer Connection and Network Layer Connection and Connection-less ServiceConnection-less Service

• Datagram network provides network-layer connectionless service

• Virtual Circuit network provides network-layer connection-oriented service

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

1313

Datagram NetworksDatagram Networks• No call setup at network layer• Routers: no state about end-to-end connections

– no network-level concept of “connection”

• Packets forwarded using destination host address– packets between same source-dest pair may take different paths

application

transportnetworkdata linkphysical

1. Send data 2. Receive data

application

transportnetworkdata linkphysical

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

1414

Routing within a Datagram SubnetRouting within a Datagram Subnet

• Router has forwarding table telling which outgoing line to use for each possible destination router

• Each datagram has full destination address• When packet arrives, router looks up outgoing line to use

and transmits packet

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

1515

Virtual CircuitsVirtual Circuits

• Call setup, teardown for each call before data can flow• Each packet carries VC identifier (not destination host address)• Every router on source-dest path maintains “state” for each

passing connection• Link, router resources (bandwidth, buffers) may be allocated to VC

(dedicated resources = predictable service)

“source-to-dest path behaves much like telephone circuit”– performance-wise– network actions along source-to-dest path

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

1616

VC ImplementationVC Implementation

A VC consists of:1. Path from source to destination

2. VC numbers, one number for each link along path

3. Entries in forwarding tables in routers along path

• Packet belonging to VC carries VC number (rather than destination address)

• VC number can be changed on each link– New VC number comes from forwarding table

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

1717

Virtual Circuit Network Virtual Circuit Network

Routers maintain connection state information!

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

1818

Virtual Circuits: Signaling ProtocolsVirtual Circuits: Signaling Protocols

• Used to setup, maintain teardown VC• Used in ATM, frame-relay, X.25• Not used in today’s Internet

application

transportnetworkdata linkphysical

1. Initiate call 2. incoming call

3. Accept call4. Call connected5. Data flow begins 6. Receive data applicatio

ntransportnetworkdata linkphysical

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

1919

Datagram or VC Network: Why?Datagram or VC Network: Why?

Internet (datagram)• data exchange among

computers– “elastic” service, no strict

timing requirement • “smart” end systems

(computers)– can adapt, perform

control, error recovery– simple inside network,

complexity at “edge”

ATM (VC)• evolved from telephony• human conversation:

– strict timing, reliability requirements

– need for guaranteed service

• “dumb” end systems– telephones– complexity inside

network

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

2020

What’s in a Router?What’s in a Router?• Run routing algorithms/protocol (RIP, OSPF, BGP)• Forwarding datagrams from incoming to outgoing link

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

2121

Input Port FunctionsInput Port Functions

Decentralized switching: • given datagram dest., lookup output

port using forwarding table in input port memory

• queuing: newly arrived datagrams might be queued before processing

Physical layer:bit-level reception

Data link layer:e.g., Ethernet

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

2222

Types of Switching FabricsTypes of Switching Fabrics

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

2323

Output PortsOutput Ports

• Buffering required when datagrams arrive from fabric faster than the transmission rate

• Scheduling discipline chooses among queued datagrams for transmission

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

2424

Routing AlgorithmsRouting Algorithms

• Least-cost in what sense?– Number of hops, geographical distance, least

queueing and transmission delay

• Desirable properties– Correctness, simplicity– Robustness to faults– Stability – converge to equilibrium

Routing algorithm: algorithm that finds least-cost path

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

2525

Routing Algorithm ClassificationRouting Algorithm Classification

Static or dynamic?• Non-adaptive (static) - Route computed in

advance, off-line, downloaded to routers• Adaptive (dynamic) - Route based on

measurements or estimates of current traffic and topology

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

2626

Routing Algorithm ClassificationRouting Algorithm Classification

Global or decentralized information?• Global:

– all routers have complete topology & link cost info– “link state” algorithms

• Decentralized: – router knows physically-connected neighbors, link

costs to neighbors– iterative process of computation, exchange of info

with neighbors– “distance vector” algorithms

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

2727

Link State RoutingLink State RoutingBasic idea• Assumes 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, using Dijkstra’s Algorithm– Gives forwarding table for that node

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

2828

Dijkstra’s AlgorithmDijkstra’s Algorithm• Each node labeled with distance from source

node along best known path• Initially, no paths known so all nodes labeled with

infinity• As algorithm proceeds, labels may change

reflecting shortest path• Label may be tentative or permanent, initially, all

tentative• When label represents shortest path from source

to node, label becomes permanent

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

2929

Compute Shortest Path from A to DCompute Shortest Path from A to D

• Start with node A as the initial working node• Examine each of the nodes adjacent to A, i.e., B and G,

relabeling them with the distance to A• Examine all the tentatively labeled nodes in the whole

graph and make the one with the smallest label permanent, i.e., B. B is the new working node

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

3030

Compute Shortest Path from A to DCompute Shortest Path from A to D

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

3131

Step Permanently labeled

B G E C F H D

1 A 2,A 6,G ∞ ∞ ∞ ∞ ∞

2 AB 6,G 4,B 9,B ∞ ∞ ∞

3 ABE 5,E 9,B 6,E ∞ ∞

4 ABEG 9,B 6,E 9,G ∞

5 ABEGF 9,B 8,F ∞

6 ABEGFH 9,B 10,H

7 ABEGFHC 10,H

8 ABEGFHCD

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

3232

Computation ResultsComputation Results

BCDEFGH

(A,B)(A,B)(A,B)(A,B)(A,B)(A,B)(A,B)

Destination link

A

BC

DE F

G H

Routing Table in ARouting Table in A

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

3333

Dijkstra’s AlgorithmDijkstra’s Algorithm: : ExerciseExercise

• Given the subnet shown below, using the Dijkstra’s Algorithm, determine the shortest path tree from node u and its routing table

u

yx

wv

z2

2

13

1

1

2

53

5

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

3434

Distance Vector RoutingDistance Vector Routing• Also called Bellman-Ford or Ford-Fulkerson• Each router maintains a table (a vector), giving

best known distance to each destination and which line to use to get there– Table is updated by exchanging info with neighbors– Table contains one entry for each router in network with

• Preferred outgoing line to that destination• Estimate of time or distance to that destination

– Once every T msec, router sends to each neighbor a list of estimated delays to each destination and receives same from those neighbors

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

3535

Distance Vector RoutingDistance Vector Routing

d(A,X)

d(A,Y)A

X Z

d(Y,Z)

d(X,Z)

At router A, for ZCompute d(A,X) + d(X,Z) and d(A,Y) + d(Y,Z), take minimum

Y

d(A,Z) = min {d(A,v) + d(v,Z) }

where min is taken over all neighbors v of A

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

3636

x y z

xyz

0 2 7

∞ ∞ ∞∞ ∞ ∞

from

cost to

from

from

x y z

xyz

0

from

cost to

x y z

xyz

∞ ∞

∞ ∞ ∞

cost to

x y z

xyz

∞ ∞ ∞7 1 0

cost to

∞2 0 1

∞ ∞ ∞

2 0 17 1 0

time

x z12

7

y

node x table

node y table

node z table

d(x,y) = min{d(x,y) + d(y,y), d(x,z) + d(z,y)} = min{2+0 , 7+1} = 2

d(x,z) = min{d(x,y) + d(y,z), d(x,z) + d(z,z)} = min{2+1 , 7+0} = 3

32

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

3737

x y z

xyz

0 2 7

∞ ∞ ∞∞ ∞ ∞

from

cost to

from

from

x y z

xyz

0 2 3

from

cost tox y z

xyz

0 2 3

from

cost to

x y z

xyz

∞ ∞

∞ ∞ ∞

cost tox y z

xyz

0 2 7

from

cost to

x y z

xyz

0 2 3

from

cost to

x y z

xyz

0 2 3

from

cost tox y z

xyz

0 2 7

from

cost to

x y z

xyz

∞ ∞ ∞7 1 0

cost to

∞2 0 1

∞ ∞ ∞

2 0 17 1 0

2 0 17 1 0

2 0 13 1 0

2 0 13 1 0

2 0 1

3 1 0

2 0 1

3 1 0

time

x z12

7

y

node x table

node y table

node z table

d(x,y) = min{d(x,y) + d(y,y), d(x,z) + d(z,y)} = min{2+0 , 7+1} = 2

d(x,z) = min{d(x,y) + d(y,z), d(x,z) + d(z,z)} = min{2+1 , 7+0} = 3

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

3838

Distance Vector RoutingDistance Vector Routing

• Delay A to B 12ms, to C 25ms, to D 40ms, to G 18ms

• Delay J to A 8ms, to I 10ms, to H 12ms, to K 6ms

• Delay J to A to G 8+18 = 26msto I to G 10+31 = 41msto H to G 12+6=18msto K to G 6+31=37ms

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

3939

Distance Vector RoutingDistance Vector Routing• Good news travels fast• Bad news travels slow• Count to infinity problem: Takes too long to converge

upon router failure

×

Spring Semester 2006Spring Semester 2006 EEC-484/584: Computer NetworksEEC-484/584: Computer Networks Wenbing ZhaoWenbing Zhao

4040

Distance Vector Routing: ExerciseDistance Vector Routing: Exercise

• Consider the subnet shown below. Distance vector routing is used, and the following vectors have just come in to router C: from B: (5, 0, 8, 12, 6, 2); from D: (16, 12, 6, 0, 9, 10); and from E: (7, 6, 3, 9, 0, 4). The measured delays to B, D, and E, are 6, 3, and 5, respectively. What is C's new routing table? Give both the outgoing line to use and the expected delay.


Recommended