Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit...

70
Chapter 7: Packet-Switching Networks School of Info. Sci. & Eng. Shandong Univ.

Transcript of Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit...

Page 1: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Chapter 7:Packet-Switching Networks

School of Info. Sci. & Eng.Shandong Univ.

Page 2: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Outlineü 7.1 Network Services and Internal Network

Operationü 7.2 Packet Network Topologyü 7.3 Datagrams and Virtual Circuitsl 7.4 Routing in Packet Networksl 7.5 Shortest Path Algorithmsl 7.6 ATM Networks (Skip)l 7.7 Traffic Management and QOSl 7.8 Congestion Control

Page 3: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Figure 7.1

t0t1

Network

Top level view: a network transfers info among users

The figure simply shows transmission of a single block or a stream of info

Page 4: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Figure 7.2

Physicallayer

Data linklayer

Physicallayer

Data linklayer

End systemα

Networklayer

Networklayer

Physicallayer

Data linklayer

Networklayer

Physicallayer

Data linklayer

Networklayer

Transportlayer

Transportlayer

Messages Messages

Segments

End systemβ

Networkservice

Networkservice

Peer-Peer Protocols Operating End-to-End Across Networks

Protocol Stack View. In C7 we are mostly concerned with the network layer

Page 5: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

3 2 11 22

1

3 2 11 22

1

21

Medium

A B

3 2 11 22

1

C

21

21

2 134 1 2 3 4

End systemα

End systemβ

Network

1

2

Physical layer entity

Data link layer entity3 Network layer entity

3 Network layer entity

Transport layer entity4

Figure 7.3

Layer 3 Entities work together to provide services to Layer 4 Entities

Spatial view

Page 6: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Figure 7.4

.

.

.MUX

Network access

Node

Packet Network Topologies:

How do users access a packet-switching network?

One way is shown. Today the MUX might be a shared DSL or Cable Modem. More likely it would be a router that permits a LAN connection between the PCs.

Page 7: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

LAN

Bridge

LAN 1

LAN 2

(a) (b)

Figure 7.5

Mostly users at one geographic site are connected with one or more Local Area Networks

(a) Broadcasts frames to all PCs. (b) A bridge usually just connects LANs to make a larger broadcast segment, but a LAN switch isolates traffic to a particular LAN, unless it needs to be sent to another LAN

Page 8: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

A large site usually sets up many LANsl LANs are connected usually connect by switches or routers to

isolate traffic to a particular segment if possiblel Such a network of LANs is called a campus networkl The next slide shows a campus network with a backbone internal to

the organizationl It also has a gateway to connect to other networks, usually the

Internetl A site with remote locations might lease lines or share frame relay

interconnections. A multiplexer or router helps share the line by queueing packets to be sent

Page 9: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

RR

RRS

SS

s

s s

s

ss

s

ss

s

R

s

R

Backbone

To internet or wide area network

Organization Servers

Gateway

Departmental Server

Figure 7.6

The s = LAN switch. The S is usually a router

Page 10: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

More about the typical campus networkl The campus backbone is usually a high speed LAN FDDI at

100Mbps is common, or Gigabit Ethernetl The traffic within an extended LAN segment is delivered

using 48-bit physical addresses; however applications use 36-bit IP addresses. The Address Resolution Protocol ARP automatically builds tables to relate the two.

l To connect the campus network to the larger Internet, we go one more step up the hierarchy. The campus network is then called an autonomous system

Page 11: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Interdomain level

Intradomain level

LAN level

Autonomous systemor domain

Border routers

Border routers

Figure 7.7

Internet service provider

The autonomous system connects to the rest of the internet via border routers at ISP Points of Presence

Page 12: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Role of the National Service Providers

l About 20 in USl See Russ Haynal page on resources

navigators.com/isp.htmll Some of the largest are bankruptl Connections at NAP and MAEs

Page 13: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

RA

RB

RC

Route server

NAP

National service provider A

National service provider B

National service provider C

LAN

NAPNAP

(a)

(b)

Figure 7.8

NSPs are connected at Network Access Points

Details

Page 14: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Control

12

3

N

Line Card

Line Card

Line Card

Line Card

Inte

rcon

nect

ion

Fabr

ic

Line Card

Line Card

Line Card

Line Card

12

3

N

Figure 7.10

…… ……

Components of a Generic Switch/Router

Page 15: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

CPU

12

3

N

NIC CardNIC CardNIC Card

NIC Card Mai

n M

emor

y

I/OBus

Figure 7.11

……

Building a router from a PC

Page 16: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

1

2

N

1

2

N

Figure 7.12

……

Routers perform demultiplexing and multiplexing functions

Page 17: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Networknodes

Message

SubscriberB

SubscriberA

Message

Message

Message

Figure 7.13

Message switching

Page 18: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

t

t

t

t

Delay

Source

Destination

T

p

Minimum Delay = 3p + 3T

Switch 1

Switch 2

Figure 7.14

Delays in Message Switching

Page 19: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Packet 2

Packet 1

Packet 1

Packet 2

Packet 2

Figure 7.15

Datagram Packet Switching

Page 20: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

t

t

t

t

31 2

31 2

321

3p + 2(T/3) first bit received

3p + 3(T/3) first bit released

3p + 5 (T/3) last bit released

Lp + (L-1)P first bit received

Lp + LP first bit released

Lp + LP + (k-1)P last bit releasedwhere T = k P

3 hops L hops

p

p + P

p + P

Source

Destination

Switch 1

Switch 2

Figure 7.16

Delays in Packet Switching; note that pipelining can speed transfer vs. message switching

Page 21: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Destinationaddress

Outputport

1345 12

2458

70785

6

12

1566

Figure 7.16

Routing table in connectionless packet switching

Page 22: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Packet

Packet

Figure 7.17

Virtual Circuit Packet Switching

A virtual connection is set up for the duration of the call, which simplifies routing. Other streams can use the same physical links, so we still have advantage of sharing resources.

Page 23: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

t

t

t

t

31 2

31 2

321

Release

Connect request

CR

CR Connect confirm

CC

CC

Delays in virtual-circuit packet switching

Page 24: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

SW 1

SW 2

SW n

Connect request

Connect request

Connect request

Connect confirm

Connect confirm

Figure 7.20

Signaling message exchanges in virtual circuit set up

Page 25: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Identifier Outputport

15 15

58

13

13

7

27

12

Nextidentifier

44

23

16

34

Entry for packetswith identifier 15

Figure 7.21

Example of a virtual circuit routing table for an input port. ID is virtual circuit number. Abbreviated headers can be used.

Page 26: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

31 2

31 2

321

Minimum Delay = 3p+Tt

t

t

tSource

Destination

Switch 1

Switch 2

Figure 7.22

Standard virtual circuits have same delay to send k packets and the datagram variety, plus the set up phase

"Cut through" packet switching speeds by starting output transmission as soon as header is decoded

Page 27: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Comparison of Virtual Circuit and Datagram Subnets

Issue Datagram Subnet VC Subnet

Addressing Each packet has source and dest address

Packets contain short VC number

State Info Subnet does not hold state info

Each VC requires subnet table space

Routing Packets routed independently

Route chosen on set up. All packets follow this route

Effect of Router Crashes

None, except packets lost during crash

All VCs that pass through this router are terminated

Congestion Control Difficult Easy if enough buffers can be allocated for each VC

Page 28: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

IP Internet Protocol (Network Layer)

l Actually most information on IP is in Chapter 8 on TCP/IPl Here we should just know that IP is a datagram service,

packets are routed independently of one anotherl It is not connection-oriented at the network layer, but can be

at the transport layer abovel The IP packet has a header of 20-60 bytes including source

and destination addresses, CRC, and various option and control fields. Details in 8.2.

l The total length of a packet, including info, can be up to 65K bytes, but transit of Ethernet LANs often limits to 1500 bytes

Page 29: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Asynchronous Transfer Mode Definition

l We will skip 7.6 as far as the exam is concerned, but here is a concise definition of ATM (p 483)

l Connection oriented in network layerl Short (48 info bytes) fixed length packets called “cells”l Cells contain short (5 byte) headers that point to connectionsl ATM uses fast hardware switches up to 10,000 ports with up

to 150Mbps eachl ATM has some of the best features of circuit switching and

packet switching. Asychronous = no master clock

Page 30: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Combinations of Service and Subnet Structure

Upper Layer (Transport Layer)

Datagram Virtual Circuit

Connectionless UDP over IP UDP over IP over ATM

Connection-Oriented

TCP over IP ATM AAL1 over ATM

Type of Subnet (Network Layer)

Page 31: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

7.4 Routing in Packet Switched Networks

l Net = Routers (or Switches) and linksl Routing involves l Setting up routing tablesl Forwarding packets

l Routing Algorithm tries to set up “best” routesl minimize hops orl minimize delay or l maximize bandwidth or ...

l The Routing Algorithm needs global info about net

Page 32: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Goals of Routing Algorithm

l Rapid and Accurate Delivery of Packetsl Adapt to Failure of Node or Linkl Adapt to Change in Traffic Loadsl Determine Connectivity of Networkl Low Overhead

Page 33: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Classification of Routing Algorithms

l Static vs. Dynamic (Adaptive)l Centralized vs. Distributedl Decisions for each Packet vs. at Connection Time

Page 34: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

1

2

3

4

5

6A

B

Switch or router

Host

Figure 7.23

Example of a Packet-Switched Network: Topology for Example

Page 35: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

1

2

3

4

5

6AB

CD

1

5

2

37

1

8

54 2

3

6

5

2

Figure 7.24

Virtual Circuit Packet Switching

Note: VC numbers change at each router. Route on top (thin line) changes from 1 to 2 to 7 to 8. Next slide has routing tables.

Page 36: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Incoming Outgoingnode VC node VC

A 1 3 2A 5 3 33 2 A 13 3 A 5

Incoming Outgoingnode VC node VC

1 2 6 71 3 4 44 2 6 16 7 1 26 1 4 24 4 1 3

Incoming Outgoingnode VC node VC

3 7 B 83 1 B 5B 5 3 1B 8 3 7

Incoming Outgoingnode VC node VC

C 6 4 34 3 C 6

Incoming Outgoingnode VC node VC

2 3 3 23 4 5 53 2 2 35 5 3 4

Incoming Outgoingnode VC node VC

4 5 D 2D 2 4 5

Node 1

Node 2

Node 3

Node 4

Node 6

Node 5

Figure 7.25

Follow that circuit from A via VC Nos. 1, 2, 7,8 to B in Routers 1, 3, and 6.

Page 37: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

2 23 34 45 26 3

Node 1

Node 2

Node 3

Node 4

Node 6

Node 5

1 12 44 45 66 6

1 32 53 34 35 5

Destination Next node1 13 14 45 56 5

1 42 23 44 46 6

1 12 23 35 56 3

Destination Next node

Destination Next node

Destination Next node

Destination Next nodeDestination Next node

Figure 7.26

Routing Tables for a Datagram Network. Same Topology.

Page 38: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Hierarchical Addresses in the Internetl Actually the book covers TCP/IP together in Chapter 8l Here (p 488) it points out that routing is simplified if hosts

within a domain have the same prefix (network address).l Then routers outside the domain only have to examine (and

store) the prefixl Thus IP addresses are always divided into a network

address and a host address. (Usually there are three levels, often: network address, LAN address, host address)

l See Fig 7.27

Page 39: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

0000 0001 0010 0011

0100 0101 0110 0111

1100 1101 1110 1111

1000 1001 1010 1011

R1 R2

1

2 5

4

3

00 1 01 3 10 2 11 3

00 3 01 4 10 3 11 5

(a)

0000 0111 1010 1101

0001 0100 1011 1110

0011 0101 1000 1111

0011 0110 1001 1100

R1 R2

1

2 5

4

3

0000 1 0111 1 1010 1 … …

0001 4 0100 4 1011 4 … …

(b)

Figure 7.27

Fig. 7.27 Advantage of Hierarchical Routing

b. Non - Hier.

a. Hierarchical -

Page 40: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

1

2

3

4

5

6

1

1

2

32

35

2

4

Figure 7.28

Fig. 7.28 Sample net with costs. We will use this net for a detailed example on the blackboard

But, first let's finish talking about different types of routing.

Page 41: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

1

2

3

4

5

6

1

1

2

2

2

Figure 7.29

Results of Bellman-Ford Algorithm: Shortest path tree for this network.

Our bird's eye view of the net allows us to easily see that this is the lowest cost solution, but it's not so easy for the routers to do this automatically. They only have information measured by other routers to use.

Page 42: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Shortest Path Routing Approaches

l Distance Vector (original Internet approach, uses only one metric, often hops, uses Bellman-Ford, has count-to-infinity problem, RIP still used in internets)

l Link State (now most common in Internet, uses Dijkstra,canuse multiple cost functions, avoids count-to-infinity)

Page 43: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Other Routing Approaches

l Floodingl Deflection Routingl Source Routing

Page 44: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

(a)

1

2

3

4

5

6

Figure 7.33 - Part 1 of 3

Flooding Routing Algorithm

Send incoming packets on all output ports, except the one it came in on. First step.

Page 45: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

1

2

3

4

5

6

(b)

Figure 7.33 - Part 2 of 3

Second Step of Flooding

Page 46: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

1

2

3

4

5

6

(c)

Figure 7.33 - Part 3 of 3

Third step of Flooding. Need control to prevent saturation of network. Use "time-to-live" field

Page 47: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

0,0 0,1 0,2 0,3

1,0 1,1 1,2 1,3

2,0 2,1 2,2 2,3

3,0 3,1 3,2 3,3

Figure 7.34

Hot Potato or Deflection Routing

Page 48: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

0,0 0,1 0,2 0,3

1,0 1,1 1,2 1,3

2,0 2,1 2,2 2,3

3,0 3,1 3,2 3,3

busy

Figure 7.35

Routers can do without buffers. Pure switch can be used.

(0,2) wants to send to (1,0), but (0,1) is busy. Deflect to right.

Page 49: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

1

2

3

4

5

6A

B

Source host

Destination host

1,3,6,B

3,6,B 6,B

B

Figure 7.36

Source Routing

Page 50: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

1 2 NN-1

Figure 7.41

7.7 Model for Quality of Service Analysis by Traffic Management

Page 51: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Packet buffer

Transmission link

Arrivingpackets

Packet discardwhen full

Packet buffer

Transmissionlink

Arrivingpackets

Class 1discard

when fullClass 2discardwhen thresholdexceeded

(a)

(b)

Figure 7.42

(a) FIFO Queueing. (b) FIFO with 2 classes

Page 52: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Transmission link

Packet discardwhen full

High-prioritypackets

Low-prioritypackets

Packet discardwhen full

When high-priorityqueue empty

Figure 7.43

Priority Queueing

Page 53: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Sorted packet buffer

Transmissionlink

Arrivingpackets

Packet discardwhen full

Taggingunit

Figure 7.44

Sorting packets according to priority tag

Page 54: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

48

63

2

1

5 7

Congestion

Figure 7.50

Router 4 is overloaded. Requests for retransmissions compound the problem.

Multitasking computers can have the same type of queueing model, and the same type of saturation.

7.8 Congestion Control

Page 55: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Offered load

Thro

ughp

ut Controlled

Uncontrolled

Figure 7.51

7.8 Congestion Control

Open loop vs. closed loop methods

Due to "thrashing"

Page 56: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Time

Bits

per

seco

nd

Peak rate

Average rate

Figure 7.52

Page 57: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Water drains ata constant rate

Leaky bucket

Water pouredirregularly

Figure 7.53

Open Loop Control depends controlling or shaping entry to the system. One techniques is smoothing the variations in flow with the “leaky bucket” approach

Leaky bucket model for monitoring access controlled traffic and for smoothing bursty traffic

Page 58: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Arrival of a packet at time ta

X’ = X - (ta - LCT)

X’ < 0?

X’ > L?

X = X’ + ILCT = ta

conforming packet

X’ = 0

Nonconformingpacket

X = value of the leaky bucket counterX’ = auxiliary variableLCT = last conformance time

Yes

No

Yes

No

Figure 7.54

Page 59: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

I

L+I

Bucketcontent

Time

Time

Packetarrival

Nonconforming

* * * * * * * **

Figure 7.55

Incoming packets are classified as conforming or non-conforming depending on whether they cause the bucket to overflow

Leaky bucket used to identify non-conforming packets. Marked for deletion

Page 60: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Time

MBS

T L I

Figure 7.56

Page 61: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Tagged or dropped

Untagged traffic

Incomingtraffic

Untagged traffic

Leaky bucket 1PCR and CDVT

Leaky bucket 2SCR and MBS

Tagged or dropped

Figure 7.57

Page 62: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Time0 1 2 3

Time0 1 2 3

10 Kbps

Time0 1 2 3

50 Kbps

100 Kbps

(a)

(b)

(c)

Figure 7.58

Traffic shaping. Output of leaky bucket with buffer looks more like (a)

Page 63: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Incomingtraffic

ShapedtrafficSize N

Packet

Server

Figure 7.59

Page 64: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Incomingtraffic

ShapedtrafficSize N

Size K

Tokens arriveperiodically

Server

Packet

Token

Figure 7.60

Page 65: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

b bytes instantly

t

r bytes per second

Figure 7.61

Page 66: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

A(t) = b+rt

R(t) R(t)

No backlog of packets

bR

b R - r

(a)

(b) Buffer occupancy @ 1

0

empty

tt

Figure 7.62

Page 67: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

TCP uses Closed Loop Congestion Control

l TCP provides end-to-end flow control to avoid overunning a slow receiver by a sliding window. Each byte is given a sequence number! The sender cannot send a new byte unless it is in the allowable “advertised window”

l However this advertised window does not prevent intermediate routers from overflowing due to congestion

l To try to optimize speed of transmission TCP establishes a second window called the “congestion window”

l At any time the window used is the smaller of the two.

Page 68: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

How Does the Congestion Window Work?

l The size of the congestion window is automatically adjusted depending the experience of the receiver:

l It starts with a small value: one maximum length “segment,” which is the PDU at the transport level

l It then ramps up exponentially, doubling on each transmission until it reaches a congestion threshold--initially "65K bytes." Graph shows 16 x 65K.

l It then goes up linearly until a time out is experienced --assumed to be due to congestion

l The size of the congestion window is then cut back to its initial value and the congestion threshold is cut to half its initial value

Page 69: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

Congestionwindow

10

5

15

20

0

Round-trip times

Slowstart

Congestionavoidance

Congestion occurs

Threshold

Figure 7.63

The congestion window seeks the optimum level just before congestion occurs

First threshold

Page 70: Chapter 7: Packet-Switching Networks · 2012. 12. 10. · Packet Packet Figure 7.17 Virtual Circuit Packet Switching A virtual connection is set up for the duration of the call, which

3 2 11 22

1

3 2 11 22

1

21

Medium

A B

3 2 11 22

1

C

21

21

2 134 1 2 3 4

End systemα

End systemβ

Network

1

2

Physical layer entity

Data link layer entity3 Network layer entity

3 Network layer entity

Transport layer entity4

Figure 7.3