Transcript
Page 1: EEC-682/782 Computer Networks I - Cleveland State University

1

EEC-682/782Computer Networks I

Lecture 12

Wenbing [email protected]

http://academic.csuohio.edu/zhao_w/teaching/eec682.htm(Lecture nodes are based on materials supplied by

Dr. Louise Moser at UCSB and Prentice-Hall)

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 2

OutlinePlease keep quite during lecture time

I received multiple accounts of complaints about the noise problem If you have questions, please ask me directly

Midterm 1 resultsReview of last lectureToday’s topics

AODVCongestion controlQuality of service

FeedbackAnonymous email account

username: [email protected]: anyone

Midterm 1 Statistics

0

1

2

3

4

5

6

7

8

9

30-39 40-49 50-59 60-69 70-79 80-89 90-100

Score Ranges

Number of Studen

Midterm 1 Statistics

A

A-B+

BB-C+

High 99, Low 34, Average 66

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 4

Midterm 1 Statistics

Mideterm1 Statistics

0

2

4

6

8

10

P1 P2 P3 P4 P5 P6 P7 P8 P9 P10

Problem NumberA

vera

ge S

co

Page 2: EEC-682/782 Computer Networks I - Cleveland State University

2

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 5

Routing Algorithms

The Optimality PrincipleShortest Path RoutingFloodingDistance Vector RoutingLink State RoutingHierarchical RoutingBroadcast RoutingMulticast RoutingRouting for Mobile HostsRouting in Ad Hoc NetworksNode Lookup in Peer-to-Peer Networks (skip)

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 6

Distance Vector RoutingAlso called Bellman-Ford or Ford-Fulkerson. Used in ARPANETIdea: 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 neighborsTable contains one entry for each router in network with

Preferred outgoing line to that destinationEstimate 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

d(A,Y)A

X Zd(A,X)

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

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 7

Distance Vector Routing -Exercise

Consider the subnet shown. Distance vector routing is used, and the following vectors have just come in to router C:

from B: (5, 0, 8, 12, 6, 2); <= +6 from D: (16, 12, 6, 0, 9, 10); <= +3 from E: (7, 6, 3, 9, 0, 4). <= +5

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.

Going via B gives (11, 6, 14, 18, 12, 8).Going via D gives (19, 15, 9, 3, 9, 10).Going via E gives (12, 11, 8, 14, 5, 9).Taking the minimum for each destination except C gives (11, 6, 0, 3, 5, 8).The outgoing lines are (B, B, –, D, E, B).

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 8

Broadcast RoutingAlternative strategies

Source sends separate copy of packet to all destinationsFloodingMultidestination routingSpanning tree – the sink tree (no loops) rooted at source that includes all routersReverse path forwarding – if router gets packet on optimal (reverse) path to root, then it forwards copies of the packet on all lines except line on which it arrived

Page 3: EEC-682/782 Computer Networks I - Cleveland State University

3

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 9

Broadcast Routing - Exercise

Looking at the subnet shown below, how many packets are generated by a broadcast from B, using

(a) reverse path forwarding?(b) the sink tree?

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 10

Broadcast Routing - ExerciseB

A

F

K

C

D I J

H

L

G M

G H I D J I E N

OMH

L H

2

4

10

8

L E F O4

Sink tree – 14Reverse Forwarding - 28

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 11

Routing in Ad Hoc Networks

Possibilities when the routers are mobile:Military vehicles on battlefield.

No infrastructure.A fleet of ships at sea.

All moving all the timeEmergency works at earthquake .

The infrastructure destroyed.A gathering of people with notebook computers.

In an area lacking 802.11.Also called MANETs (Mobile Ad hoc NETworks)

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 12

AODV

AODV – Ad hoc On-demand Distance VectorA distant relative of the Bellman-Ford distance vector algorithm adapted to work in a mobile environmentIt determines a route to some destination only when somebody wants to send a packet to that destination

AODV algorithmMaintains a table at each node, keyed by destination, giving info about that destination, including which neighbor to send packets toIf a node looks in its table and does not find an entry for the destination node. It now has to discover a route to the destination – on demand

Critical difference between AODV and Bellman-Ford: nodes do not send out periodic broadcasts containing their entire routingtable – saves both bandwidth and battery life

Page 4: EEC-682/782 Computer Networks I - Cleveland State University

4

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 13

Route Discovery

(a) Range of A's broadcast.(b) After B and D have received A's broadcast.(c) After C, F, and G have received A's broadcast.(d) After E, H, and I have received A's broadcast.Shaded nodes are new recipients. Arrows show possible reverse routes.

Route DiscoveryROUTE REQUEST Packet format

Source and destination address – typically IP addressesRequest ID – local counter maintained by each node, incremented each time a ROUTE REQUEST is broadcast

Allow nodes to discard any duplicates they may receiveSource sequence # - requester’s sequence number, incremented whenever a ROUTE REQUEST is sentDestination sequence # - most recent value of destination’s sequence number that the source has seenHop count – keep track of how many hops the packet has made

ROUTE REQUEST

ROUTE REPLY

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 15

Route Discovery

When a ROUTE REQUEST packet arrives at a node, it is processed in the following steps1. The (source address, request ID) pair is looked up to see if the

packet is a duplicate. Enter it to history table if not duplicate. Discard it if duplicate

2. The receiver looks up destination in its route table. If a fresh route is known, a ROUTE REPLY packet is sent. Fresh means destination seq # stored in routing table >= that in the ROUTE REQUEST packetOtherwise, execute step 3

3. The receiver increments hop count field and rebroadcasts the ROUTE REQUEST packet

It also extracts the data from the packet and stores it as a new entry in its reverse route table. This info will be used to construct reverse route so that the reply can get back to the source later

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 16

Route Discovery

When a ROUTE REPLY packet arrives at a node, it is entered into the local routing table as a route to the destination if one or more of the following are met

No route to destination node is knownSequence number for destination node in REQUEST REPLY packet is greater than the value in the routing tableSequence numbers are equal but the new route is shorter

All nodes on the reverse route learn the route to destination node for free, as a byproduct of source’s route discovery

Page 5: EEC-682/782 Computer Networks I - Cleveland State University

5

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 17

Route Maintenance

To purge routes that no longer workPeriodically, each node broadcasts a Hello message. Each of its neighbors is expected to respond to it.

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 18

CongestionWhen too much traffic is offered, congestion sets in and performance degrades sharply

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 19

Cause of CongestionInput traffic rate > Capacity of output linesSlow CPUBoth can lead to packets being queued upFinite number of buffers at receiver

Packets dropped and retransmittedWhat if we have infinite buffer?

It does not help, because each packet has a finite lifetime

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 20

Congestion Control and Flow Control

Congestion control is a global issueMaking sure the subnet is able to carry the offered traffic

Flow control concerns point-to-point traffic between given sender and receiver

Receiver provides feedback to sender so sender does not overwhelm it

Page 6: EEC-682/782 Computer Networks I - Cleveland State University

6

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 21

Congestion Control

General Principles of Congestion ControlCongestion Prevention PoliciesCongestion Control in Virtual-Circuit SubnetsCongestion Control in Datagram SubnetsLoad SheddingJitter Control

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 22

General Principles of Congestion Control

From control theory, two approachesOpen loop – try to solve problem by good design, make sure congestion doesn’t occur

Decide when to accept new trafficDecide when to discard packets and which oneDo this without considering current state of network

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 23

General Principles of Congestion Control

Closed loop – feedback loopMonitor the system to determine when and where congestion occurs

Num packets dropped, mean queue length, mean packet delayPass information to where action can be taken

Send message back to source but this increases congestionUse bit field in packet to indicate threshold exceededSend out probe packets periodically

Adjust system operation to correct the problem. Two optionsIncrease resourcesDecrease load

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 24

Congestion Prevention Policies

Page 7: EEC-682/782 Computer Networks I - Cleveland State University

7

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 25

Congestion Prevention Policies

Retransmission policy how fast sender times outwhat it sends when times out

Caching policyReceiver discards out-of-order packet or not

Acknowledgement policyImmediate acks results in more trafficPiggybacked acks may result extra timeouts and retransmission

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 26

Congestion Prevention Policies

Many congestion control algorithms only work with virtual circuitPacket queuing and service policy

Input or output queuingFIFO or priority based

Discard policyDrop oldest or newest packet

Routing algorithmCan spread traffic across network

Packet lifetime managementDiscard packet if it’s in network too long

Timeout determinationDifficult because transmission time many not be predictable

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 27

Congestion Control in Virtual-Circuit Subnets

Dynamically control congestionAdmission control

Keep congestion that has started from getting worse When congestion is indicated, do not set up any more VCs until problem has resolved itself

Alternative approachesAllow new VCs but route them around congested areaNegotiate agreement between host and network when VC set up

Volume and shape of trafficQoSReserve resources (buffer, space bandwidth, etc.)

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 28

Congestion Control in Virtual-Circuit Subnets

(a) A congested subnet. (b) A redrawn subnet, eliminates congestion and a virtual circuit from A to B.

Page 8: EEC-682/782 Computer Networks I - Cleveland State University

8

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 29

Congestion Control in Datagram Subnets

Warning bitChoke packetsHop-by-hop choke packets

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 30

Warning Bit

Signal the warning state by setting a special bit in the packet’s header

When packet arrived at its destination, transport entity copied the bit into the next ack sent back to the sourceThe source then cut back on trafficEvery router along the path could set the warning bit, traffic increases only when no router is in trouble

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 31

Choke Packets

Tell the source directly to reduce trafficEach router monitors utilization of each of its output linesWhen utilization becomes greater than threshold, output line enters warning stateFor each newly arriving packet, check if output line in warning stateIf so, router sends choke packet back to source giving it the destination found in the packetPacket is tagged so does not generate any more choke packets and forwarded as usualWhen source receives choke packet, it must reduce traffic to specific destination

Hop-by-Hop Choke PacketsThe router that receives a choke packet must reduce the flow to its downstream router

This is achieved by allocating more buffer to the incoming flowThe router also passes the choke packet to its upstream router

(a) A choke packet that affects only the source.

(b) A choke packet that affects each hop it passes through.

Page 9: EEC-682/782 Computer Networks I - Cleveland State University

9

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 33

Load Shedding

When routers can’t handle packets, they just drop themWhich packets to drop? Depends

File transfer of data –keep old, drop newReal-time audio and video – keep new, drop old

Simulation studies show it’s better to drop packets early than to wait until network is congestedRED - Random Early Detection

Having routers drop packets before situation becomes hopelessRouters maintain a running average of their queue lengthsWhen average queue length on some line exceeds a threshold, the line is said to be congested and action is takenJust discard selected packet and not report it.Sender respond to lost packets by slowing down transmission rateAppropriate for wired networks

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 34

Jitter ControlJitter – variation in delayRouter delays or speeds up packet transmission to control jitter

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 35

Quality of Service

RequirementsTechniques for achieving good quality of serviceIntegrated servicesDifferentiated servicesLabel switching and MPLS

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 36

Requirements

How stringent the quality-of-service requirements are

5-30

Page 10: EEC-682/782 Computer Networks I - Cleveland State University

10

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 37

Techniques for Achieving Good QoS

OverprovisioningProvide enough router capacity, buffer space and bandwidth

BufferingTraffic shaping

Leaky bucket algorithmToken bucket algorithm

Resource reservationReserve enough bandwidth, buffer space and CPU cycles

Admission controlProportional routing

Divide traffic equally or in proportion to the capacity of outgoing links

Packet scheduling

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 38

Buffering

Smoothing the output stream by buffering packets

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 39

Traffic Shaping and Policing

Traffic shapingManaging congestion by

Reducing burstiness of the trafficForcing packets to be sent at a more predictable uniform rate

Leaky bucket algorithmToken bucket algorithm

Traffic policingMonitoring traffic flow after the shape of the traffic has been agreed uponEasier with virtual circuits than with datagrams

The Leaky Bucket AlgorithmNo matter what rate water enters the bucket, water flows out of the bucket at constant rate ρ (provided bucket is not empty)

When bucket is full, water slops over sides and is lostAnalogous to finite queue in network switch

Page 11: EEC-682/782 Computer Networks I - Cleveland State University

11

The Token Bucket AlgorithmThe bucket hosts tokens in stead of data packetsA token represents a packet or k bytesTokens are added into the bucket with a constant rateBucket has certain capacity. If bucket is full, new tokens are thrown awayA data packet can be transmitted only if enough tokens present in bucketToken bucket algorithm allows some burstinessbecause a full bucket of tokens can be saved used all at once

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 42

The Token Bucket Algorithm

Calculation of the length (S) of max burst rateToken bucket capacity C bytes, token arrival rate r bytes/sec, max output rate M bytes/secOutput burst can contain up to C+ρS bytesNumber of bytes in a max-speed burst of length S sec is MSHence, we have C+ρS = MS S = C/(M-ρ)

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 43

Traffic Shapes

(a) Input to a leaky bucket. (b) Output from a leaky bucket. Output from a token bucket with capacities of (c) 250 KB, (d) 500 KB, (e) 750 KB, (f) Output from a 500KB token bucket feeding a 10-MB/sec leaky bucket.

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 44

Admission Control

When a well-shaped flow is offered to a router, it has to decide based on its capacity and how many commitments it has made for other flows, whether to admit or reject the flowFlow must be described accurately in terms of specific parameters that can be negotiated

An example of flow specification

Page 12: EEC-682/782 Computer Networks I - Cleveland State University

12

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 45

Packet SchedulingIf a router is handling multiple flows, on flow might hog too much of its capacity and starve all the other flows

Keep separate output queue for each sourceRouter takes first packet in each queue on round-robin basis

Assigned clock tick number

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 46

Integrated Services for Streaming Multimedia

Flow-based algorithmsAimed at unicast and multicast applications

Unicast example: on-demand video streamingMulticast example: Digital TV stations broadcasting programs

RSVP-The ReSerVation Protocol

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 47

RSVP-The ReSerVation Protocol

Multiple senders transmit to multiple receiversIndividual receivers can switch channelsOptimizes bandwidth while eliminating congestionUse multicast routing and spanning trees

Sender puts group address in its packetsStandard multicast routing algorithm used to build spanning tree

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 48

RSVP-The ReSerVation Protocol

(a) A network, (b) The multicast spanning tree for host 1. (c) the multicast spanning tree for host 2.

Page 13: EEC-682/782 Computer Networks I - Cleveland State University

13

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 49

RSVP-The ReSerVation Protocol

To get better reception and eliminate congestionAny of receivers in multicast group can send reservation message up the tree to the senderMessages propagated using reverse path forwardingAt each hop, router notes reservation and reserves necessary bandwidth

If insufficient bandwidth, reports failureWhen message gets back to source, bandwidth is reserved from sender to receiver along spanning tree

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 50

RSVP-The ReSerVation Protocol

(a) Host 3 requests a channel to host 1. (b) Host 3 then requests a second channel, to host 2. (c) Host 5 requests a channel to host 1.

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 51

Differentiated ServicesMotivation

Flow-based algorithms require an advance setup to establish each flowMaintain internal per-flow state in routersChanges required to router code are substantial and involve complex router-router exchanges for setting up the flowsFew implementations of RSVP exist

Go for a simpler approach – class-based QoSDifferentiated services can be offered by a set of routers forming an administrative domainCustomers can sign up for the DS. Packets would carry a type of service field sent by such customers

DS servicesExpedited forwardingAssured forwarding

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 52

Expedited Forwarding

Expedited packets experience a traffic-free network

Page 14: EEC-682/782 Computer Networks I - Cleveland State University

14

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 53

Assured ForwardingBasic steps

Classify packets into one of four priority classesMark packets according to their class, using a header fieldPass packets through a shaper/dropper filter

May delay or drop some of them to shape the four streams into acceptable forms, e.g., using leaky or taken buckets

A possible implementation of the data flow for assured forwarding

Label Switching and MPLSAlternative to integrated and differentiated servicesAdding a label in front of each packet and doing the routing based on the label rather than on the destination address

Making the label an index into an internal table makes finding correct output line becomes just a matter of table lookupVery close to virtual circuitsMPLS – MultiProtocol Label SwitchingLabels have to be remapped at every hop

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 55

Summary

What are the most essential topics covered today?Congestion control algorithms for datagram subnet

Warning bitChock packetHop-by-hop chock packet

Traffic shaping algorithmsLeaky bucket algorithmToken bucket algorithm

Spring Semester 2005EEC-682: Computer Networks I

- Wenbing Zhao 56

Token Bucket Algorithm - Exercise

A computer on a 6-Mbps network is regulated by a token bucket. The token bucket is filled at a rate of 1 Mbps. It is initially filled to capacity with 8 megabits. How long can the computer transmit at the full 6 Mbps?


Recommended