Presentation on dll

45
Group members : Alisha Korpal Nancy Jain Nivia Jain Sharuti Jain

description

 

Transcript of Presentation on dll

Page 1: Presentation on dll

Group members :Alisha KorpalNancy Jain Nivia Jain

Sharuti Jain

Page 2: Presentation on dll

The data link layer has a number of specific functions it can carry out. These functions includeProviding a well-defined service interface to the network

layer.Dealing with transmission errors.Regulating the flow of data so that slow receivers are not

swamped by fast senders.

Page 3: Presentation on dll

Unacknowledged connectionless service. Acknowledged connectionless service. Acknowledged connection-oriented service

Page 4: Presentation on dll

Source sends frames to destination machine but the destination machine does not send any acknowledgement of these frames back to the source.

There is no connection established between source & destination machine before data transfer or after data transfer.

Page 5: Presentation on dll

The connection is not established before the data transfer or after the data transfer.

When the sender sends the data to destination, destination sends back the acknowledgment of these frames.

Page 6: Presentation on dll

It means that connection is established between source &destination before any data is transferred.

Each frame being transmitted from source to destination is given a specific number and is acknowledged by the destination machine.

Data transfer has three different phases :-Connection establishmentActual data transferConnection release

Page 7: Presentation on dll

1. Framing2. Error control3. Flow control4. Physical address 5. Access control

Page 8: Presentation on dll

When data is being transmitted from one machine to another, it may possible that data become corrupted on its way. Some of the bits may be altered, damaged or lost during transmission. Such a condition is known as error.

Types of errorsSingle bit errorBurst error

Page 9: Presentation on dll

1. Vertical Redundancy check/parity check2. Longitudinal Redundancy check3. Cyclic Redundancy check4. Checksum

Redundancy is the method in which some extra bits are added to the data so as to check whether the data contain error or not.

Page 10: Presentation on dll

1 1 0 0 1 1 1

1 1 0 0 1 1 1 1 1 1 0 0 1 1 1 1

Even parity

Even Parity Generator(counts 1 in data)

11

SenderReceiver

Parity checker Counts 1 in data + VRC)

Odd parity

Accept data

Reject data

Page 11: Presentation on dll

11001010101010101100110011100011

01001111

11001010 10101010 11001100 11100011

11001010 10101010 11001100 11100011 01001111

Original data

LRC

Page 12: Presentation on dll

10101001 subunit100111001 subunit 2

11100010 sum

00011101 Compliment of sum

10101001 00111001 00011101

data checksum

Sender :

Page 13: Presentation on dll

Receiver:

10101001 subunit100111001 subunit2 00011101 Checksum

11111111 sum

00000000 compliment

No error

Page 14: Presentation on dll

10111011 0100 0000 1000 1011 0110 0000 110

10010001011

Sender:

Page 15: Presentation on dll

Receiver :

10011101011 0101 0000 1011 1011 0000 0000 000

10111010

Note: Remainder is zero, no error

Page 16: Presentation on dll

Another important design issue that occurs in the data link layer (and higher layers as well) is what to do with a sender that systematically wants to transmit frames faster than the receiver can accept them.

This situation can easily occur when the sender is running on a fast (or lightly loaded) computer and the receiver is running on a slow (or heavily loaded) machine.

Page 17: Presentation on dll

The sender keeps pumping the frames out at a high rate until the receiver is completely swamped. Even if the transmission is error free, at a certain point the receiver will simply be unable to handle the frames as they arrive and will start to lose some. Clearly, something has to be done to prevent this situation.

Page 18: Presentation on dll

Stop and Wait Sliding Window

Page 19: Presentation on dll

The sender sends a single frame to receiver & waits for an ACK.

The next frame is sent by sender only when ACK of previous frame is received.

To end up the transmission sender sends EOT End Of Transmission.

Page 20: Presentation on dll

Sender Receiver

DATA

ACK

EOT

DATA

ACK

Page 21: Presentation on dll

In this multiple frames are sent by the sender at a time before needing an acknowledgment.

Multiple frames sent by source and acknowledged by receiver using a single unit.

Sliding window is an imaginary boxes that hold the frames on both sender and receiver side

It provides the upper limit on the number of frames hat can be transmitted before requiring an acknowledgment.

Page 22: Presentation on dll
Page 23: Presentation on dll

Error control function of data link layer detects the error in transmitted frames and retransmits all the erroneous frames.

Therefore error control function of data link layer helps in dealing with data frames that are damaged in transmit, data frame lost in transmit and the acknowledgment frame that are lost in transmission.

The method is used for error control is called Automatic Repeat Request (ARQ).

Page 24: Presentation on dll

If an error is detected in any frame, the receiver sends a negative acknowledgement (NAK) back to source and the specific frame is retransmitted.

ARQ techniques helps us in dealing with:I. Damaged data framesII. Lost data frameIII.Lost acknowledgment frames(both ACK & NAK)

Page 25: Presentation on dll

I. Stop and wait ARQII. Sliding window ARQ

Go – back – n Selective – reject

Page 26: Presentation on dll

The sending device keeps a copy of the last frame transmitted until it receives an acknowledgment for that frame. Keeping this copy helps the sender in retransmission of lost or damaged frames later on.

Both data frames and ACK frames are numbered alternately 0 and 1 for identification purpose.

Criteria used by stop and wait ARQ method: Damaged data frames Lost data frames Lost acknowledged frames

Page 27: Presentation on dll

If a data frame received by a receiver contains an error, it returns NAK frame to the sender.

On receiving NAK frame ,sender retransmits the last data frame.

Page 28: Presentation on dll

Sender Receiver

DATA 0

ACK 1

DATA 2

DATA 1

ACK 2

errorNAK

retransmit DATA 2

ACK 3

Page 29: Presentation on dll

Every sending device is equipped with timer. The sender starts this timer when it transmits data

frame. If a data frame is lost on its way, it will not be received

by receiver. As a result the receiver can never acknowledge it, positively or negatively.

The sending device waits for an ACK and NAK frame until timer goes of.

Page 30: Presentation on dll

retransmit

Sender Receiver

DATA 0

ACK 1

DATA 2

DATA 1

ACK 2

lost

DATA 2

ACK 3

Time out

Page 31: Presentation on dll

When any data frame reaches the destination, the receiver acknowledges it either with ACK or with NAK.

If ACK or NAK frame returned by the receiver is lost in transmit, sending device retransmit the data frame that has not been acknowledged

Page 32: Presentation on dll

Sender Receiver

DATA 0

ACK 1

DATA 1

DATA 1

ACK 2

ACK 2

retransmit

DATA 2

ACK 4

lost

Page 33: Presentation on dll

The sending device keeps the copies of all the transmitted frames until they are acknowledged.

The receiver can send both ACK and NAK frames to source. Both ACK & NAK frames are numbered for identification, because this method is a continuous transmission.

Go back n ARQ Selective reject

Page 34: Presentation on dll
Page 35: Presentation on dll

Whenever receiver sees a damaged data frame it sends NAK indicating the number of that frame. the NAK indicates that all the frames received prior to this frame are intact and the frame whole number is specified in NAK damaged.

Whenever receiver gets damaged frame it stops accepting any subsequent data frames and sends NAK to sender.

Whenever NAK is received by the sender it retransmit all the data.

Page 36: Presentation on dll
Page 37: Presentation on dll

In sliding window the data frames must be transmitted sequentially

Receiving any frame, the receiver checks the identifying number on each frame. If any of the frame is lost & is missing in sequence, the receiver sends NAK indicating the number of that frame & discard all other frames that are received out of order.

Page 38: Presentation on dll
Page 39: Presentation on dll

In sliding window the sender does not wait for acknowledgment after every single frame.

In this method multiple frames are sent. The source can send as many frames as the window size before waiting for an acknowledgment.

Once that limit has been reached or sender has no more frames to send, it must wait.

Page 40: Presentation on dll
Page 41: Presentation on dll

When a receiver gets damaged frame it sends NAK for that particular frame. This NAK acknowledges the intact receipt of a previously unacknowledged data frames and also indicates an error in current frame.

Page 42: Presentation on dll
Page 43: Presentation on dll

http://docs.google.com/viewer?a=v&q=cache:g0kc6om7ALEJ:www.cis.temple.edu/~latecki/Courses/CIS617-04/slides/Ch3DataLink.ppt+data+link+layer+-+error+control&hl=en&gl=in&pid=bl&srcid=ADGEESh7iihVLjzfFbz0gre7MU026mn1tthMC-nrjVDOhmlFyqp-EpbPP18Dz7PJTOo3lto10Jrgl1nkhxfKGMHEko4l92TcpWhWdwZ6NWFLwcgt8vL1Rflnm2flNelUYRNLV8E9V-H&sig=AHIEtbR0cwRF6qCblrz1ZzC5FkQnUHZegA

Page 44: Presentation on dll

http://www.google.co.in/search?q=data+link+layer+-+error+control&hl=en&biw=1280&bih=869&prmd=ivns&ei=x5yqTduNEIXqrAfs2ZioCA&start=10&sa=N

http://docs.google.com/viewer?a=v&q=cache:_jvDqkVmAswJ:people.du.ac.in/~ngupta/CS204/Data%2520Link%2520Layer.ppt+data+link+layer+-+erroe+control&hl=en&gl=in&pid=bl&srcid=ADGEESjvzCW9EVWHSCgLuNEgYrLN8SnUvi-OQgDHzumZNNbPe-08mHhM4hLYqcxF960wte5mZHm1vae0-qOmWu71x0w7bOq8M4iogycqPZP23VkXGkvzE3lb5FJDHjBjJf5funeJkYit&sig=AHIEtbTruvMLqEm3DYW-JmR6GPILqmFx_g

Page 45: Presentation on dll