computer networks unit-6
TRANSCRIPT
-
8/7/2019 Computer Networks UNIT-6
1/21
C o n f i d e n t i a l
Course : BCA
Semester : IV
Subject Code : BC 0048
Subject Name : Computer Networks
Unit number : 6
Unit Title : Data Link Layer
HOME NEXT
-
8/7/2019 Computer Networks UNIT-6
2/21
C o n f i d e n t i a l
Unit-6 Data link Layer
Data Link Layer
Objectives
After going through the presentation, you should be able to:
Describe Design issues of data link layer.
Discuss Error Detection and correction
Describe data link layer protocols.
HOME NEXTPREVIOUS
-
8/7/2019 Computer Networks UNIT-6
3/21
C o n f i d e n t i a l
Unit-6 Data link Layer
Lecture outline
Introduction
Design issues of DLL
Error Detection and Correction
Data Link Layer Protocols
Summary
Data Link Layer
NEXTPREVIOUS
-
8/7/2019 Computer Networks UNIT-6
4/21
C o n f i d e n t i a l
Unit-6 Data link Layer
Introduction
The data link layer is the second layer from bottom of the seven-layer
OSI model
It responds to service requests from the network layer. It issues
service requests to the physical layer. This is the layer, which transfersdata between adjacent network nodes in a wide area network or
between nodes on the same local area network segment.
The data link layer provides the functional and procedural means to
transfer data between network entities and might provide the means to
detect and possibly correct errors that may occur in the Physical layer.
The data link layer is split into MAC and LLC sub layers.
HOME NEXTPREVIOUS
-
8/7/2019 Computer Networks UNIT-6
5/21
C o n f i d e n t i a l
Unit-6 Data link Layer
Design issues of DLL
The data link layer takes the packets from the network layer and
encapsulates bit stream into units called frames for transmission.
Each frame contains a frame header, a payload field for holding the
packet, and a frame trailer.
The DLL design issues are listed below:
In general, provide service to the network layer. The network layer
wants to be able to send packets to its neighbors without worrying
about the details of getting it there in one piece.
Framing: Encapsulating the packets
HOME NEXTPREVIOUS
-
8/7/2019 Computer Networks UNIT-6
6/21
C o n f i d e n t i a l
Unit-6 Data link Layer
Design issues of DLL
Sender checksums the frame and sends checksum together with
data. The checksum allows the receiver to determine when a frame
has been damaged in transit.
Receiver recomputes the checksum and compares it with thereceived value. If they differ, an error has occurred and the frame is
discarded.
Perhaps return a positive or negative acknowledgment to the sender.
A positive acknowledgment indicates the frame was received without
errors, while a negative acknowledgment indicates the opposite.
Flow control
HOME NEXTPREVIOUS
-
8/7/2019 Computer Networks UNIT-6
7/21
C o n f i d e n t i a l
Unit-6 Data link Layer
Design issues of DLL
Services provided to the network layer :
The function of the data link layer is to provide services to the network
layer.
The principal service is transferring data from the network layer on the
source machine to the network layer on the destination machine.
Other services provided to the network layer are
The network layer is interested in getting messages to the
corresponding network layer module on an adjacent machine.
The remote Network Layer peer should receive the identical message
generated by the sender .
The Network Layer wants to be sure that all messages it sends, will
be delivered correctly (e.g., none lost, no corruption).
HOME NEXTPREVIOUS
-
8/7/2019 Computer Networks UNIT-6
8/21
C o n f i d e n t i a l
Unit-6 Data link Layer
Design issues of DLL
Services provided to the network layer :
The DLL provides three types of services
1. Unacknowledged connectionless service
2. Acknowledged connectionless service
3. Acknowledged connection-oriented service
4. Unacknowledged connectionless service :
This service consists of having the source machine send independent
frames to the destination machine without having the destination
machine acknowledge them. No logical connection is established
beforehand or released afterward. If a frame is lost due to noise on the
line, no attempt is made to detect the loss or recover from it in the DLL.
HOME NEXTPREVIOUS
-
8/7/2019 Computer Networks UNIT-6
9/21
C o n f i d e n t i a l
Unit-6 Data link Layer
Design issues of DLL
Services provided to the network layer :
2. Acknowledged connectionless service :
Here no logical connections are used, but each frame is individually
acknowledged.
Thus the sender knows whether a frame is been delivered to the
destination or not. If the acknowledgement has not arrived within a
specified period then the frame is retransmitted.
This service is useful over unreliable channels, such as wireless system.
HOME NEXTPREVIOUS
-
8/7/2019 Computer Networks UNIT-6
10/21
C o n f i d e n t i a l
Unit-6 Data link Layer
Design issues of DLL
Services provided to the network layer :
3. Acknowledged connection-oriented service :
This service is the most sophisticated service of DLL.
With this service the source and destination machines establish a
connection before any data are transferred.
Each frame sent is indeed received. Each frame sent over the connection
is numbered. It guarantees that each frame sent is received.
Again this services calls for the three phases:
Connection establishment:
where source and destination stations initializes variables and counters or
buffers required for the data transferor to keep trackof received frames etc.
Data transfer: frames are actually transmitted
Connection termination: where a connection is released.
HOME NEXTPREVIOUS
-
8/7/2019 Computer Networks UNIT-6
11/21
C o n f i d e n t i a l
Unit-6 Data link Layer
Design issues of DLL
Framing :
The DLL translates the physical layer's raw bit stream into discrete units
(messages) called frames.
That is because the physical layer just accepts a raw bit stream and to
deliver it to the destination. This bit stream is not guaranteed to be error
free.
The number of bits received may be less than, equal to, or more than the
number of bits transmitted. They may also have different values. It is up
to DLL to detect and if necessary correct errors. If not correct at least
detect errors and take proper action like ask for retransmission etc.
The usual approach of DLL is to break the bit stream up into discrete
frames and then for the purpose of error detection or correction, it uses
some coding technique
HOME NEXTPREVIOUS
-
8/7/2019 Computer Networks UNIT-6
12/21
C o n f i d e n t i a l
Unit-6 Data link Layer
Design issues of DLL
Error control :
Error control is concerned with insuring that all frames are eventually
delivered and possibly in order to a destination as they are sent from the
source.Reliable delivery is achieved using the ``acknowledgments with
retransmission. Here the receiver returns a special acknowledgment
(ACK) frame to the sender indicating the correct receipt of a frame.
In some systems, the receiver also returns a negative acknowledgment
(NACK) for incorrectly-received frames. This is nothing more than a hint
to the sender so that it can retransmit a frame right away without waiting
for a timer to expire.
HOME NEXTPREVIOUS
-
8/7/2019 Computer Networks UNIT-6
13/21
C o n f i d e n t i a l
Unit-6 Data link Layer
Design issues of DLL
Flow control :
Flow control deals with throttling the speed of the sender to match that
of the receiver.
Usually, this is a dynamic process, as the receiving speed depends onsuch changing factors as the load, and availability of buffer space.
There are two approaches
1. feedback-based flow control
2. rate based flow control
HOME NEXTPREVIOUS
-
8/7/2019 Computer Networks UNIT-6
14/21
C o n f i d e n t i a l
Unit-6 Data link Layer
Design issues of DLL
Flow control : ( continued)
1. Feedback-based flow control : in this the receiver sends back
information to the sender giving it permission to send more data or
at least telling the sender how the receiver is doing.
2. Rate based flow control: In this the protocol has a built in
mechanism that limits the rate at which senders may transmit the
data without using feedback from the receiver.
HOME NEXTPREVIOUS
-
8/7/2019 Computer Networks UNIT-6
15/21
C o n f i d e n t i a l
Unit-6 Data link Layer
Error Detection and Correction
There are two types of attacks against errors:
Error Detecting Codes:
Include enough redundancy bits to detect errors and use ACKs andretransmissions to recover from the errors.
Error Correcting Codes:
Include enough redundancy to detect and correct errors.
To understand and deal with errors, we consider the following some ofthe terms and conventions used:
1. Messages (frames) consist of m data (message) bits and rredundancy bits, yielding an n = (m+r)-bit codeword.
2. Hamming Distance: Given any two codewords, we can determinehow many of the bits differ. Simply exclusive or (XOR) the twowords, and count the number of 1 bits in the result.
HOME NEXTPREVIOUS
-
8/7/2019 Computer Networks UNIT-6
16/21
C o n f i d e n t i a l
Unit-6 Data link Layer
Error Detection and Correction
3. Significance? If two codewords are d bits apart, d errors are required
to convert one to the other.
4. A code's Hamming Distance is defined as the minimum Hamming
Distance between any two of its legal codewords (from all possiblecodewords).
5. n general, all possible data words are legal. However, by choosing
check bits carefully, the resulting codewords will have a large
Hamming Distance. The larger the Hamming distance, the better able
the code can detect errors.
HOME NEXTPREVIOUS
-
8/7/2019 Computer Networks UNIT-6
17/21
C o n f i d e n t i a l
Unit-6 Data link Layer
Error Detection and Correction
Parity Bits :
parity: A single parity bit is appended to each data block (e.g. each
character in ASCII systems) so that the number of 1 bits always adds up
to an even (odd) number.
If the total number of bits including the appended bit is even, the paritybit appended is called even parity. Similarly, If the total number of bits
including the appended bit is odd, the parity bit appended is called odd
parity
of even parity:
Data is 1000000
After using even parity the code becomes 10000001
Data is 1111101
After using even parity the code becomes 11111010
HOME NEXTPREVIOUS
-
8/7/2019 Computer Networks UNIT-6
18/21
C o n f i d e n t i a l
Unit-6 Data link Layer
Data Link Layer Protocols
Various transmission control protocol are
Asynchronous DLC protocols (ADLC)
Binary Synchronous protocol (Bisync or BSC)
Synchronous DLC (SDLC) High Level DLC (HDLC)
Asynchronous DLC protocols :
An asynchronous DLC protocol is primarily used for low speed data
communication. Framing is done at byte level.
Framing start bit a 0 bit & Stop 1 bit. Often parity is used for each
character.
HOME NEXTPREVIOUS
-
8/7/2019 Computer Networks UNIT-6
19/21
C o n f i d e n t i a l
Unit-6 Data link Layer
Data Link Layer Protocols
Binary Synchronous protocol (Bisync or BSC) :
Binary Synchronous protocol (Bisync or BSC) is developed by IBM in
1966, and is also a byte oriented protocol.
It organizes data into block of 512 characters. Receiver transmits positive
acknowledgement (ACK) or Negative acknowledgement (NAK).
It supports error checking on block checking character (BCC). Receiver
calculates BCC independently and compares the block for error.
HOME NEXTPREVIOUS
-
8/7/2019 Computer Networks UNIT-6
20/21
C o n f i d e n t i a l
Unit-6 Data link Layer
Data Link Layer Protocols
Synchronous Data Link control (SDLC) Protocol :
SDLC developed again by IBM in mid of 1970s to supports high speed
transmission.
It is a Bit oriented protocol & can support either half duplex or Full duplex
modes of transmission.]It uses Cyclic Redundant Code, known as FCS for error detection.
High-level Data Link Control(HDLC) Protocol
HDLC is adopted as part of X.25. It is Bit oriented that is it uses bit
stuffing and bit delimiters.
It uses 3-bit sequence numbers and up to 7 unacknowledged frames can
be outstanding at any time
HOME NEXTPREVIOUS
-
8/7/2019 Computer Networks UNIT-6
21/21
C o n f i d e n t i a l
Unit-6 Data link Layer
Summary
The data link layer is the second layer from bottom of the seven-
layer OSI model.
The data link layer is split into MAC and LLC sub layers.
The data link layer takes the packets from the network layer and
encapsulates bit stream into units called frames for transmission. If the total number of bits including the appended bit is even, the
parity bit appended is called even parity.
The most popular error detection code is polynomial codes or cyclic
redundancycodes (CRCs).
Most common Data Link Layer Protocols are
Asynchronous DLC protocols(ADLC), Binary Synchronous protocol (Bisync
or BSC), Synchronous DLC (SDLC) and High Level DLC (HDLC)
HOMEPREVIOUS