Telecommunication Networks 15B11EC611: Dr. Bhagirath Sahu Assistant Professor, JIIT, Noida
Telecommunication Networks 15B11EC611: Dr. Bhagirath Sahu Assistant Professor, JIIT, Noida
15B11EC611
Kindly refer page numbers: 267 to 271, 284 to 293, and 307 to 310 of the
Book_1_Data-Communications-and-Networking - By Forouzan for
detailed discussion.
Kindly note: For topics, follow this PPT, and for detailed discussion of
those topics, follow the book.
Data Link Layer
Specific responsibilities of the data link layer include framing, addressing, flow
control, error control, and media access control.
Types of Errors
1. Single-Bit Error
• only 1 bit of a given data unit is changed from 1 to 0 or from 0 to 1
2. Burst Error
Redundancy
• The central concept in detecting or correcting errors is redundancy.
Coding
• Redundancy is achieved through various coding schemes.
Modular Arithmetic
• In modular arithmetic, we use only a limited range of integers.
modulo-N arithmetic
• use only the integers 0 to N - I, inclusive
• Addition and subtraction in modulo arithmetic are simple.
• There is no carry when you add two digits in a column.
• There is no carry when you subtract one digit from another in a column.
• In this arithmetic we use the XOR (exclusive OR) operation for both
addition and subtraction.
BLOCK CODING
In block coding, we divide our message into blocks, each of k bits, called
datawords.
We add r redundant bits to each block to make the length n = k + r.
The resulting n-bit blocks are called codewords.
Dataword size = k
Codeword size = n
• Figure shows one immediate benefit; a 7-bit pattern can be replaced by three
terms
Degree of a Polynomial
• The degree of a polynomial is the highest power in the polynomial.
• For example, the degree of the polynomial x6 + x + 1 is 6.
• Note that the degree of a polynomial is 1 less that the number of bits in the
pattern. The bit pattern in this case has 7 bits.
Note: we continue
to divide until
the degree of the
remainder is less
than the degree of
the divisor.
Data Link Layer
In broad sense, the functions of the data link layer are:
1. data link control, and
2. media access control.
Data link control functions include framing, flow and error control, and software
implemented protocols, that provide smooth and reliable transmission of frames
between nodes.
FRAMING
• Framing in the data link layer separates a message from one source to a
destination, or from other messages to other destinations, by adding a
sender address and a destination address.
• Destination address defines where the packet is to go.
• Sender address helps the recipient acknowledge the receipt.
FRAMING
Character-Oriented Protocols
Character-Oriented Protocols
Flag could be selected to be any character and any pattern used for the
flag could also be part of the information.
If this happens, the receiver, when it encounters this pattern in the middle
of the data, thinks it has reached the end of the frame.
To fix this problem, a byte-stuffing strategy was added to character-
oriented framing
This flag can create the same type of problem we saw in the byte-oriented
protocols.
That is, if the flag pattern appears in the data, we need to somehow inform the
receiver that this is not the end of the frame.
We do this by stuffing 1 single bit to prevent the pattern from looking like a flag.
The strategy is called bit stuffing.
Bit Stuffing
Bit stuffing is the process of adding one extra 0 whenever five consecutive 1s follow
a 0 in the data, so that the receiver does not mistake the pattern 0111110 for a flag.
Example: The following character encoding is used in a data link protocol:
A: 01000111: B: 11100011: FLAG: 01111110: ESC: 11100000
Show the bit sequence transmitted (in binary) after bit stuffing for the four-
character frame: A B FLAG ESC.
Solution:
Dataword: 01000111111000110111111011100000
FLAG FLAG
Example: A bit string, 0111101111101111110, needs to be transmitted
at the data link layer. What is the string actually transmitted after bit stuffing?
Solution:
FLAG FLAG