1 Chapter 16 Protocols and Protocol Layering. 2 Protocol Agreement about communication Specifies ...

29
1 Chapter 16 Protocols and Protocol Layering

Transcript of 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol Agreement about communication Specifies ...

Page 1: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

1

Chapter 16Chapter 16

Protocols and

Protocol Layering

Page 2: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

2

ProtocolProtocol

Agreement about communicationSpecifies

Format of messages (syntax)Meaning of messages (semantics)Rules for exchangeProcedure for handling problems

Page 3: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

3

Need for ProtocolsNeed for Protocols

Hardware is low levelMany problems can occur

Bits corrupted or destroyedEntire packet lostPacket duplicatedPackets delivered out of order

Page 4: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

4

Need for Protocols (continued)

Need for Protocols (continued)

Need mechanisms to distinguish amongMultiple computers on a networkMultiple applications on a computerMultiple copies of a single application on a

computer

Page 5: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

5

Set of ProtocolsSet of Protocols

Work togetherEach protocol solves part of communication

problemKnown as

Protocol suiteProtocol family

Designed in layers

Page 6: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

6

Plan for Protocol DesignPlan for Protocol Design

Intended for protocol designersDivides protocols into layersEach layer devoted to one subproblemExample: ISO 7-layer reference model

Page 7: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

7

Illustration of the 7-Layer Model

Illustration of the 7-Layer Model

Defined earlyNow somewhat datedDoes not include internet layer!

Page 8: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

8

ISO LayersISO Layers

Layer 1: PhysicalUnderlying hardware

Layer 2: Data Link (media access)Hardware frame definitions

Layer 3: NetworkPacket forwarding

Layer 4: TransportReliability

Page 9: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

9

ISO Layers (continued)ISO Layers (continued)

Layer 5: SessionLogin and passwords

Layer 6: PresentationData representation

Layer 7: ApplicationServices for common applications

Page 10: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

10

TCP/IP protocol suiteTCP/IP protocol suite

Page 11: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

11

Layers and Protocol Software

Layers and Protocol Software

Protocol software follows layering modelOne software module per layerModules cooperateIncoming or outgoing data passes from one

module to anotherEntire set of modules known as stack

Page 12: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

12

Illustration of StacksIllustration of Stacks

Page 13: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

13

Layers and Packet Headers

Layers and Packet Headers

Each layerPrepends header to outgoing packetRemoves header from incoming packet

Page 14: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

14

Example of encapsulationExample of encapsulation

Page 15: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

15

Scientific Layering Principle

Scientific Layering Principle

Software implementing layer N at the destination receives exactly the message sent by software implementing layer N at the source

Page 16: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

16

Illustration of Layering Principle

Illustration of Layering Principle

Page 17: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

17

Protocol TechniquesProtocol Techniques

For bit corruptionParityChecksumCRC

For out-of-order deliverySequence numbers

DuplicationSequence numbers

Page 18: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

18

Protocol Techniques (continued)

Protocol Techniques (continued)

For lost packetsPositive acknowledgement and retransmission

For replay (excessive delay)Unique message ID

For data overrunFlow control

Page 19: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

19

Flow ControlFlow ControlNeeded because

Sending computer system faster than receiving computer

Sending application faster than receiving application

Related to bufferingTwo forms

Stop-and-goSliding window

Page 20: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

20

Stop-And-Go Flow ControlStop-And-Go Flow Control

Sending SideTransmits one packetWaits for signal from receiver

Receiving sideReceives and consumes packetsTransmits signal to sender

Inefficient

Page 21: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

21

Sliding Window Flow Control

Sliding Window Flow Control

Receiving sideEstablishes multiple buffers and informs sender

Sending sideTransmits packets for all available buffersOnly waits if no signal arrives before

transmissionReceiving side

Sends signals as packets arrive

Page 22: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

22

Illustration of SlidingWindow on Sending Side

Illustration of SlidingWindow on Sending Side

Window tells how many packets can be sentWindow moves as acknowledgements arrive

Page 23: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

23

PerformancePerformance

Stop-and-goSlowUseful only in special cases

Sliding windowFastNeeded in high-speed network

Page 24: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

24

Comparison of Flow Control

Comparison of Flow Control

Page 25: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

25

Why Sliding Window?Why Sliding Window?

SimultaneouslyIncrease throughputControl flow

Speedup

Tw = min(B, TG * W)where

B is underlying hardware bandwidthTW is sliding window throughputTG is stop-and-go throughputW is the window size

Page 26: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

26

CongestionCongestion

Fundamental problem in networksCaused by traffic, not hardware failureAnalogous to congestion on a highwayPrinciple cause of delay

Page 27: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

27

Illustration of ArchitectureThat Can Experience

Congestion

Illustration of ArchitectureThat Can Experience

Congestion

Multiple sourcesBottleneck

Page 28: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

Dealing with CongestionDealing with Congestion

Congestion results in filled buffers in packet switches => packets will be discarded => retransmission => more packets…..

SolutionsIncreasing buffer spaceReducing the amount of packets in the network

Packet switches inform senders, or Senders use packet loss as an indication

28

Page 29: 1 Chapter 16 Protocols and Protocol Layering. 2 Protocol  Agreement about communication  Specifies  Format of messages (syntax)  Meaning of messages.

29

Congestion and LossCongestion and Loss

Modern network hardware works well; most packet loss results from congestion, not from hardware failure