Protocols. Basics Defining Interactions VERTICAL Application Presentation Session Transport Network...

38
Protocols
  • date post

    20-Dec-2015
  • Category

    Documents

  • view

    215
  • download

    0

Transcript of Protocols. Basics Defining Interactions VERTICAL Application Presentation Session Transport Network...

Protocols

Basics

Defining InteractionsVERTICAL

Application

Presentation

Session

Transport

Network

Data Link

Physical

Please do this for me

OK It’s Done orSorry I couldn’t

Horizontal Interactions

Application

Presentation

Session

Transport

Network

Data Link

Physical

Application

Presentation

Session

Transport

Network

Data Link

Physical

http request

http response

Route to 137.155.2.1?

Send to 137.155.38.4

Problems Solved by Link Layer Protocols

• Error CORRECTION

Sender Receiver

• Flow Control

Speed it Up!

Transmitting large filesrather than short messages

What kinds of problems ensue?

Sending a big file

Sender Receiver

Some pieces are lost

Sender Receiver

Some pieces are routed differently

Sender Receiver

Some pieces are damaged

Sender Receiver

Receiver is busy and misses 2or misses data because arriving

too fast

Sender Receiver3 2 1

1

3

Basic InteractionSimplest strategy

Sender ReceiverMessage 1

Sender ReceiverACK

Sender ReceiverMessage 2

etc

But things go wrong

As we mentioned previously

Sender Receiverabcdefghijklmnop Bill

Where is the error?

Sender Receiverabcdefghijklmnop Bill

data corrupted

Sender Receiverabcdefghijklmnop Bill

address corrupted

Whether Lost or Damaged

It all looks the same to the sender!

Damaged messages are discarded because you can’t be sure the message

is even intended for the receiver

General Problems

• Message is lost

• Acknowledgement is lost

Message is lost

Sender Receiver

Using timers for the messages

Sender Receiver

time

Sender

Problems now created

• Multiple copies of the message exist

• How do I set the timers?

Application

Presentation

Session

Transport

Network

Data Link

Physical

Application

Presentation

Session

Transport

Network

Data Link

Physical

Network layer passes message To Data Link for transmission

Application

Presentation

Session

Transport

Network

Data Link

Physical2 1

Application

Presentation

Session

Transport

Network

Data Link

Physical1

Data Link layer passes First part of message

To Physical layer for transmission

Application

Presentation

Session

Transport

Network

Data Link

Physical2 1

Application

Presentation

Session

Transport

Network

Data Link

Physical1 1

Physical Layer sends across the network

Application

Presentation

Session

Transport

Network

Data Link

Physical2 1

Application

Presentation

Session

Transport

Network

Data Link

Physical1 1

1

Ack

Receiver accepts, passes up to data link,data link sends ACK

ACK is lost

Application

Presentation

Session

Transport

Network

Data Link

Physical2 1

Application

Presentation

Session

Transport

Network

Data Link

Physical1 1

1

Ack

Sender resends message 1

Application

Presentation

Session

Transport

Network

Data Link

Physical2 1

Application

Presentation

Session

Transport

Network

Data Link

Physical1 1

1

Ack

Receiver gets message 1Recognizes it already has 1

Re ACKS

Ack

If ACK lost

• Message only delivered once

• ACK was retransmitted and eventually sender get ACK

• Sender moves on to part 2 of the message

Review

• Message Lost

Sender

Receiver1 1

Ack

Ack

• ACK Lost

Sender

Receiver

Application

Presentation

Session

Transport

Network

Data Link

Physical2

Application

Presentation

Session

Transport

Network

Data Link

Physical2

Sender passes Message 2to Physical Layer to xmit

1

Application

Presentation

Session

Transport

Network

Data Link

Physical2

Application

Presentation

Session

Transport

Network

Data Link

Physical2 2

2

Receiver gets message 2ACKS and passes message 2

Up to data link at receiver

Ack

1

Application

Presentation

Session

Transport

Network

Data Link

Physical

Application

Presentation

Session

Transport

Network

Data Link

Physical

2

Upon receiving ACKSender discard at link layerAssuming xmit complete

1

Application

Presentation

Session

Transport

Network

Data Link

Physical

Application

Presentation

Session

Transport

Network

Data Link

Physical

2

Receiver passes message 2 up to network layer

1

XMIT of network PDU complete!

Please do this for me Sorry I couldn’t

Sends message “n” times but always fails.

How many times is it repeated?Horizontal and Vertical Interaction

Network Network

Data Link Data Link

Sender Receiver

Timers

How are they set?

Timer Tradeoff

• Set the alarm time too large– Sender sits around waiting needlessly– Increased delay

• Set the alarm time too small– Sender repeats transmission unnecessarily– Additional unnecessary network traffic is

generated– Unnecessary traffic -> Increased delay

Timer will never be perfect

• This is a queueing system• The time it should take for the receiver to

respond is defined by a probability distribution

• Unpredictable loads– Network traffic– Other receiver cpu loads– Local NIC card

Are there other approaches to retransmission/error correction?

Yes!

Correction

• 3 basic ARQ (Automatic Repeat Request) approaches

• Idle RQ

• Go-back-N

• Selective Repeat