SlideShare a Scribd company logo
1 of 186
COMPUTER NETWORKS
MODULE II
Dr.Preethi
Assistant Professor
School of CS and IT
Physical & Data Link Layer: Ethernet- Physical Layer and Data link layer switching:
Learning bridges- spanning tree bridges, repeaters, hubs, bridges, switches, routers,
and gateways. Data Link Layer - Design issues, Error Detection & Correction, Data
Link Layer Protocols, Sliding window protocols.
Wired LANs:
Ethernet
13.1
13-1 IEEE STANDARDS
In 1985,,,, the Computer Society of the IEEE started a
project, called Project 802, to set standards to enable
intercommunication among equipment from a variety
of manufacturers. Project 802 is a way of specifying
functions of the physical layer and the data link layer
of major LAN protocols.
Topics discussed in this section:
Data Link Layer
Physical Layer
13.4
Figure 13.1 IEEE standard for LANs
13.5
13-2 STANDARD ETHERNET
The original Ethernet was created in 1976 at Xeroxā€™s
Palo Alto Research Center (PARC). Since then, it has
gone through four generations.. We briefly discuss the
Standard (or traditional) Ethernet in this section.
13.6
Topics discussed in this section:
MAC Sublayer
Physical Layer
Figure 13.3 Ethernet evolution through four generations
13.7
Figure 13.4 802.3 MAC frame
13.8
Note
Frame length:
Minimum: 64 bytes (512 bits)
Maximum: 1518 bytes (12,144 bits)
13.9
Note
The least significant bit of the first byte
defines the type of address.
If the bit is 0, the address is unicast;
otherwise, it is multicast.
Figure 13.8 Categories of Standard Ethernet
Figure 13.13 10Base-F implementation
13-4 FAST ETHERNET
Fast Ethernet was designed to compete with LAN
protocols such as FDDI or Fiber Channel. IEEE
created Fast Ethernet under th nam 80 .. u.. Fast
Ethernet is backward-compatible with Standard
Ethernet, but it can transmit data 10 times faster at a
rate of 100 Mbps.
Topics discussed in this section:
MAC Sublayer
Physical Layer
Figure 13.19 Fast Ethernet topology
Figure 13.20 Fast Ethernet implementations
13-5 GIGABIT ETHERNET
The need for an even higher data rate resulted in the
design of the Gigabit Ethernet protocol (1000 Mbps).
The IEEE committee calls the standard 802..3z..
Topics discussed in this section:
MAC Sublayer
Physical Layer
Ten-Gigabit Ethernet
Note
In the full-duplex mode of Gigabit
Ethernet, there is no collision;
the maximum length of the cable is
determined by the signal attenuation
in the cable.
Figure 13.22 Topologies of Gigabit Ethernet
Figure 13.23 Gigabit Ethernet implementations
Data link layer
1
2
5
Topics
ā€¢ Data link layer design issues
ā€¢ Error detection and correction
ā€¢ Elementary data link protocols
ā€¢ Sliding window protocols
ā€¢ Example data link protocols
ā€¢ HDLC
ā€¢ LAP
....
::-
DataLink Layer
Design issues
2
6
Data Link layer
design issues
ā€¢ Services provided to the network
layer
ā€¢ Framing
ā€¢ Error control
ā€¢ Flow control
2
8
Datalink layerdesign
issues
ā€¢ Functions of data link layer
ā€¢ Providing a well-defined service
interface to the network layer
ā€¢ Determining how the bits of the physical
layer are grouped into frames
ā€¢ Dealing with transmission errors
ā€¢ Regulating the flow of frames so that
slow receivers are not swamped by fast
senders
Header Payload field Trailer Header Payload field Trailer
Datalinklayer design
2
9
issues
Relationship between packets and frames
Sending machine
Packet
Frame
Receiving machine
Packet
Services provided the
network layer
ā€¢ Main service to be provided is to transfer data from
network layer on the sending machine to the network
layer on the destination machine.
a) virtual communication b) actual communication
Host 1 Host 2 Host 1 Host 2
Virtual
data path
Actua1
data path
7
3
1
Types services provided Ā°
ā€¢ Three reasonable possibilities for data link
services:
1.Unacknowledged connectionless
service
2. Acknowledged connectionless service
3. Acknowledged connection-oriented
service
3
2
Unacknowledged
connectionless service
1. Source sends independent frames to the
destination without the destination
acknowledging them.
2. No connection is established or released
3. If a frame is lost due to noise on the line, no
attempt is made to recover it.
4. Appropriate when the error rate is very low
s. Appropriate for real-time traffic, such as speech,
in which late data are worse than bad data
6. Mostly LANs use this.
3
3
Acknowledged
connectionless service
ā€¢ Next step to improve reliability
ā€¢ No connections used but for each frame
received, the receiver sends an
acknowledgement.
ā€¢ If frame is not received within specified time,
the sender will retransmit it.
ā€¢ Suitable for communication over unreliable
channels, such as wireless systems
Acknowledged nection
oriented service
3
4
ā€¢ The source and the destination establish a
connection before data transfer.
ā€¢ Each frame sent is numbered
ā€¢ The data link layer guarantees that each frame sent
is indeed received.
ā€¢ It also guarantees that each frame is received
exactly once and all frames are received in the right
order.
ā€¢ Connection-oriented service provides the network
layer with the equivalent of a reliable bit stream.
3
5
.
nn
Acknowledged co ection
oriented service
ā€¢ The data transfer takes place by following
three phases:
ā€¢ Connection establishment
ā€¢ One or more frames actually transmitted
ā€¢ Connection is released.
Example of WAN subnet consisting of
routers connected by point-to-point leased
lines
3
6
ā€¢ Fig. placement of the data link protocol
Router
Data link
layer process
Frames Packets
process
Transmission
line to a router
Data link
....
3
7
Framing ..
ā€¢ The data link uses the services provided by the
physical layer.
ā€¢ The physical layer will not be perfect. It is up to the
data link layer to detect, and if necessary, correct
errors.
ā€¢ The usual approach is for the data link layer to
break the bit stream up into discrete frames and
compute the checksum for each frame.
ā€¢ When a frame arrives at the destination, the
checksum is recomputed.
ā€¢ If the newly computed checksum is different from
the one contained in the frame, the data link layer
knows that an error has occurred and takes steps to
deal with it.
Framing
3
8
ā€¢ Breaking the bit stream into frames is called
framing. One way is to insert time gaps
between frames.
ā€¢ But practically this technique does not work
satisfactorily, because networks generally do
not make any guarantees about timing.
ā€¢ So following methods are used:
1. Character count.
2. Starting and ending characters, with character
stuffing.
3. Starting and ending flags, with bit stuffing.
4. Physical layer coding violations.
3
9
....
jj:Ā°
Character count
ā€¢ In this method, a field in the header is used to
specify the number of characters in the frame.
ā€¢ This number helps the receiver to know the number
of characters in the frame following this count.
ā€¢ Disadvantage:
ā€¢ An error can change the character count
ā€¢ If the wrong character count is received then the
receiver will get out of synchronization and will be
unable to locate the stai1of next frame.
ā€¢ This method is rarely used in practice.
5 1 2 3 4 7 6 7 8 9 8 0 1 2 3 4 5 6 8 7 8 9 0 1 2 3
4
0
5 1 2 3 4 5 6 7 8 9 8 0 1 2 3 4 5 6 8 7 8 9 0 1 2 3
Character
count
Character count One character
(a)
Frame 1
5 characters
Frame 2
5 characters
Error
Frame 3
8characters
Frame 4
8 characters
Without error
(b)
Frame 1 Frame 2
(Wrong)
Now a
character count
With one error
Starting and ending character with
character stuffing
4
1
ā€¢ Here starting character is used before the start of each
frame and an end character is used at the end of each
frame.
ā€¢ Flag byte FLAG. is used as starting and ending delimiter
ā€¢ Two consecutive flag bytes indicate the end of one frame
and start of the next one.
ā€¢ Problem in case of programs or floating point numbers.
ā€¢ Solution is to use escape sequence (ESC) before flag.
ā€¢ The data link layer at the receiving side removes the
ESC byte before sending to the network layer
+ Known as byte or character stuffing
Starting and ending character
4
2
with character stuffing h ā€ž,c e
FLAG Heade r
Original characters
FLAG
ESC
ESC FLAG
ESC ESC
Payload field
(a)
(b)
After stuffing
ESC FLAG
ESC ESC
Trailer FLAG
ESC ESC ESC FLAG
ESC ESC ESC ESC
Disadvantages of character
stuffing
4
3
ā€¢ A major disadvantage of using this framing
method is that it is closely tied to 8-bit
characters in general and the ASCII
character code in particular.
ā€¢ We need a technique to allow arbitrary sized
characters.
ā€¢ This technique allows the frames to contain arbi rary
number of bits and codes.
ā€¢ At the beginning and end of each frame , a specific
bit pattern 01111110 called flag byte is transmitted.
ā€¢ Since there are six consecutive 1s in this byte, a
technique called bit stuffing is used.
ā€¢ Whenever the sender data link layer detects the
presence of 5 consecutive 1s in the data, it
automatically stuffs a 0 bit in the outgoing bit
stream.
ā€¢ De-stuffing is done at the receiving end.
21
Bit stuffing
4
5
(a) Original data (b) the data as they appear on the line
(c) the data as they are stored in the receivers memory after de-stuffing
Flags (01111110) at the beginning and e
0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0
(b) 0 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 0 0 1 0
Stuffed bits
(c) 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0
Bit-oriented framing with bit stullii g
4
6
Physical layer coding
violations
))):
Ā°Tā€™ā€™ā€
ā€¢ This method of framing is only applicable o
networks in which the encoding on the
physical medium contains some redundancy.
ā€¢ For example, some LANs encode 1 bit of
data by using 2 physical bits.
ā€¢ Normally, a 1 bit is a high-low pair and a 0 bit
is a low-high pair.
ā€¢ The combinations high-high and low-low are
not used for data and they can be used as
frame boundaries.
....
Error control jt:ā€
4
7
The usual way to ensure reliable delivery is to
provide the sender with some feedback about what
is happening at the other end of the line.
Data Frame
Sender
Acknowledgement(ACK)
Or negative
Acknowledgement (NAK)
Receiver
4
8
....
Error control jt:ā€
An additional complication comes from the
possibility that hardware troubles may cause a
frame to vanish completely. In this case, the
receiver will not react at all.
This possibility is dealt with by introducing
timers into the data link layer.
....
4
9
Error control
Sender
retransmit
if time-out
error code ACK if
correct
| paCket
physical
layer
ack
error code
physical
layer
Receiver
5
0
....
jt:ā€
Error control
ā€¢ However, when frames may be transmitte
multiple times there is a danger that the
receiver will accept the same frame two or
more times, and pass it to the network layer
more than once.
x To prevent this from happening, it is generally
necessary to assign sequence numbers to
outgoing frames, so that the receiver can
distinguish retransmissions from originals.
5
1
....
Flow control jt:ā€
ā€¢ What to do with a sender that systematical y
wants to transmit frames faster than the
receiver can accept them?
ā€¢ The usual solution is to introduce flow control
to throttle the sender into sending no faster
than the receiver can handle the traffic.
ā€¢ This throttling generally requires some kind ol
a feedback mechanism, so the sender can be
made aware of whether or not the receiver is
able to keep up.
5
2
..
y.
:ā€
.
Flow control
ā€¢ Various flow control schemes are there, b I
most of them use the same basic principle.
ā€¢ The protocol contains well-defined rules
about when a sender may transmit the next
frame.
x These rules often prohibit frames from being
sent until the receiver has granted permission,
either implicitly or explicitly.
ā€¢ Two techniques are there:
ā€¢ Stop and wait flow control
ā€¢ Sliding window flow control
detection and
correction
ā€¢ Error correcting codes
ā€¢ Error detecting codes

..
.)
::
,
^
T
"
ā€™
31
32
Error detection and .
.
.
)::
,
correction ^
T
"
ā€™
ā€¢ Transmission errors are going to be a fact of
life for many years to come. (in local loop, in
wireless communications)
ā€¢ As a result of the physical processes that
generate them, errors on some media (e.g.,
radio) tend to come in bursts rather than
singly.
ā€¢ Disadvantage: They are much harder to
detect and correct than isolated errors.
Error detection and
correction
Advantage:
:
*"ā€™
error model: bursty errors
every packet would be in error
bursty error, only one packet is incorrect
34
ā€¹Ā»
.
ā€ž.
...
Types of error
ā€¢ Single bit error: only one bit gets corrupt d.
Common in parallel transmission.
Ā» Multiple bit errors: more than one bits get
corrupted
ā€¢ Bursf error: more than one bit gets
corrupted at the same place or at once. Very
common in serial transmission of data.
Occurs when the duration of noise is greater
than the duration of one bit.
ā€¢ Single bit error:
Sent
ā€¢ Multiple bit error:
Sent
Two errors
Received
Received
ā€¢ Burst error:
Sent
Burst error
Received
5
9
.
Error detection tech ues
6
0
ā€¢ Use of redundancy: additional bits are addedto facilitate
detection and correction of errors.
ā€¢ x Popular techniques:
ā€¢ Simple parity check
ā€¢ Two-dimensional parity check
ā€¢ Checksum
ā€¢ Cyclic redundancy check
6
1
....
*'ā€
Simple parity check
ā€¢ The simplest and most popular error
detection technique
ā€¢ Appends a parity bit to the end of the data
Ā« Even parity: means the number of 1ā€™s in the
given word including parity bit should be
even (2,4,6...)
ā€¢ Odd Rarity: means the number of 1ā€™s in the
given word including parity bit should be odd
(1,3,5...)
6
5
ā€¹Ā»
. .
Performance of simple parity ))ā€¢ā€¹
check ā€™
ā€
ā€¢ Simple parity check can detect all single bit
errors.
ā€¢ It can also detect burst errors if the number of
bits in error is odd.
ā€¢ The technique is not foolproof against burst
errors that inverts more than one bits. If an
even number of bits are inverted due to error,
the error is not detected.
ā€¢ It cannot correct errors.
6
6
. . . ā€¢
ā€¹ā€¢
Ā»
ā€¢Ā°
Two dimensional parity check tt'ā€
ā€¢ Performance can be improved by using two
dimensional parity check, which organizes the
block of bits in the form of a table
ā€¢ Parity check bits are calculated for each row
which is equivalent to a simple parity check bit
ā€¢ Parity check bits are also calculated for all
columns
ā€¢ Both are sent along with the data
ā€¢ At the receiving end these are compared with
the parity bits calculated on the receiving data
Example
6
7
LRC and VRC
ā€¢ Two sets of parity bits are generated known as:
ā€¢ Longitudinal redundancy check (LRC)
ā€¢ Vertical redundancy check (VRC)
Vertical Redundancy Check (VRC)
ā€¢ Vertical Redundancy Check is also known as Parity Check. In
this method, a redundant bit also called parity bit is added to
each data unit. This method includes even parity and odd parity.
Even parity means the total number of 1s in data is to be
even and odd parity means the total number of 1s in data is
to be odd.
ā€¢ Example ā€“ If the source wants to transmit data unit 1100111
using even parity to the destination. The source will have to pass
through Even Parity Generator.
Even parity VRC
LRC (Longitudinal redundancy check)
ā€¢ In this error detection method, a block of bits are organized in a table
(of rows and columns).
ā€¢ For example, instead of sending block of 32 bits, first it is organized
into four rows and eight columns.
ā€¢ Then parity bits for each column is calculated and new row of eight
parity bits is formed.
ā€¢ These eight parity bits are appended to original data before
transmission
7
3
....
*'ā€
Performance
ā€¢ Extra overhead is traded for better error
detection capability
x Two-dimensional parity check significantly
improves error detection capability compared
to simple parity check
ā€¢ It can detect many burst errors but not all
ā€¢ It cannot correct the errors
Checksum
7
4
ā€¢ At the senders end:
ā€¢ The data is divided into k
segments each of m bits.
ā€¢ The segments are added
using one's complement
arithmetic to get the sum
ā€¢ The sum is complemented
to get the checksum
ā€¢ The checksum segment is
sent along with the data
segments
ā€¢ At the receiver's end:
x All received segments
are added using one's
complement arithmetic
to get the sum
ā€¢ The sum is
complemented
ā€¢ If the result is zero the
received data is
accepted otherwise
discarded 7
5
,
10110011
10101011
10 Q1111
ā€¢ The checksum detects all errors involving an
odd number of bits
x It also detects most errors involving even
number of bits
7
8
Cyclic redundancy check
7
9
ā€¢ One of the most powerful and commonly used
detecting codes
ā€¢ Basic approach:
ā€¢ Given a m-bit block of bit sequence, the sender
generates an n-bit sequence known as frame check
sequence (FCS), so that the resulting frame,
consisting of m+n bits, is exactly divisible by some
predetermined number
ā€¢ The receiver divides the incoming frame by that
number and, if there is no remainder, assumes there
was no error
Cyclic redundancy check
8
0
ModuIo-2 arithmetic
5O
)))Ćæā€¢
Modulo-2 arithmet
8
2
1 1 1 1 0 1
0 0 1 0 0 0 0
1 1 0 1
Binary Division
I
1 0 1 0
1 1 0 1
1 1 1 0
1 1 0 1
0 1 1 0
0 0 0 0
1 1 0 0
1 1 0 l
Remainder
10.83
Figure 10.15 Division in CRC encoder
10.84
Figure 10.16 Division in the CRC decoder for two cases
8
5
Polynomials ā€¹Ā».
jt:
ā€¢ AII the variables can be expressed as polynomials Ć“f
a dummy variable X.
ā€¢ P= 11001 => X^4 +X^3+ X^1
ā€¢ CRC process can be expressed as X^nM(X)/P(X) =
Q(X) + R(X) / P(X)
ā€¢ Commonly used divisor polynomials are:
ā€¢ CRC-12= X^12 + X^11 + Xā€™3 + Xā€˜2 + X + 1
ā€¢ CRC-16= X^16 + X^15 + Xā€™2 + 1
ā€¢ CRC-CCITT X^16 + X^12 + X^5 + 1
ā€¢ CRCā€”32 = X^32 + X^26 + X^23 + X^22 + X^16 +
X^12 + X^11 + X^10 + X^8 + X^7 + X^5 + X^4 + X^2
+ X + 1
ā€¢ Can detect all single bit errors
ā€¢ Can detect all double bit errors (three 1ā€™s)
ā€¢ Can detect any odd number of errors (X+1)
ā€¢ Can detect all burst errors of less than the
degree of the polynomial
ā€¢ Detects most of the larger burst errors with a
high probability
x For example CRC-12 detects 99.97% of
errors with a length 12 or more
.
ā€¹.
Ā»
.ā€¹
.
8
7
....:,
*ā€
Error correction
ā€¢ Backward error correction:
ā€¢ When an error is detected in a frame, the
sender is asked to retransmit the data/frame.
This approach is known as Automatic Repeat
Request (ARQ) technique.
Ā« Forward error correction:
ā€¢ Use more redundancy in the transmitted data
to not only detect but correct error in the
received data.
Error correcting codes
8
8
Codeword: an n-bit unit containing data and check ts
is called as n-bit codeword
m data bits
n=m+r
There are 2" possible codewords and 2f
" possible data messages.
Hamming distance between codewords:
min d(C ,C2)=number of (same bit position) bits which differ
d(10010010,00010001)ā€”3
If two codewords are a hamming distance d apart, it will
require d single-bit errors to convert one into the other.
r check bits
ā€¢ Hamming distance: the number of differences
in the corresponding bits
x The minimum Hamming distance is the
smallest Hamming distance between all
possible pairs in a set of words
8
9
.
ā€¹.
Ā»
.ā€¹
.
9
0
....:,
*ā€
Error correction
Ā« Reouirement for error detection.ā€¢ A code is an error
detecting code if and only if minimum distance
between any two code words is two
Ā« Re uirement for error correction: For a code to be
error correcting the minimum distance between any
two code words must be more than two
ā€¢ Number of additional bits should be such that it can
point to the position of the bit in error. If k is the
number of additional bits, the condition is 2^k> m+
k+1
HAMMING code
ā€¢ Basic Approach
ā€¢ To each group of m information k parity bits are
added to form m+k bit code
ā€¢ Location of each of the m+k digits is assigned a
decimal value
ā€¢ The k parity bits are placed in 1,2 ...2^k-1 positions.
ā€¢ K parity checks are performed on selected digits of
each codeword
ā€¢ At the receiving end the parity bits are recalculated.
The decimal value of the k parity bits provides the bit
position in error, if any.
9
1
9
2
. zz
Hamming Code j j jā€¢
11 10 9 8 7 6 5 4 3 2 l
Redundancy bits
Hamming Code
j;;;
1011 1001 0111 0101 001 1 0001
11 V 7 S 3 1
^2 will take care
of these bits
10111010
11 10
01110110
7 6
0011 0010
3 2
it if il r if it it rJ it r r j
Hamming Code
9
4
j j j;
0111011& 101 0100
7 6 5 4
rg will take care
of these bits
101 l l0l0l00l 1000
11 10 9 8
Daa
Adding 'Ā»
Adding
Adding r4
Adding ā€¹8
9
5
Example of Hamming Code
Ā”Ā”Ā”Ā”,
Code: 1 0 0 1 1 1 0 0 1 0 1
i o|o i i i o o i o i i o o i o i o o i o i
Si.ngle-bi.t error ā€¢ā€¢
Ā°ā€¢
Sent Received
Error
1 1
1 0 1 0 1 0 II 1 1
1 1
I
64
I I I
11 10 9 8 7 6 5 4 3 2 I
I I
I I lt) 9 S 7 6 5 4 3 2 I
1 0 II 1 0 1 il 1
1 1 0 1
I I I I
I I
1. .. 9 8 7 6 5 4 3 2 1
1 ā€¹ā€ŗ ā€¹ā€ŗ i o i o o i ā€¹i i
Error
Detection
11 10 9 8 7 6 5 4 3 2 l
The bit in position 7
is in error.
Elementary data Iink
9
9
:
*"ā€™
protocols
ā€¢ An unrestricted simplex protocol
ā€¢ A simplex stop and wait protocol
ā€¢ A simplex protocol for noisy channel
ā€¢ Piggybacking
1
0
1
. . ā€¹Ā»
An Unrestricted Simplex ))ā€¢ā€¹
protocol
ā€¢ This is the simplest possible protocol
ā€¢ Has no flow control and no error control
ā€¢ Unidirectional protocol in which frames travel from
sender to receiver
ā€¢ Assumption is noiseless channel
ā€¢ It is assumed that the network layer of the sender
and the receiver are always ready.
ā€¢ It is also assumed that the processing time can be
ignored and infinite buffer space is available
ā€¢ This protocol is also known as ā€œutopiaā€
An Unrestri
ā€¢cted Sā€¢
implex
protocol
1
0
2
ā€¹
tt
Ā»
:ā€¢
.
Ā°
ā€¢ This protocol consists of two distinct procedures
namely a sender and a receiver.
ā€¢ The sender runs in the data link layer of the sender
machine and receiver runs in the data link layer of
the receiver machine
ā€¢ The sender site cannot send a frame until its
network layer has a data packet to send.
ā€¢ No sequence numbers and no acknowledgments
are used.
ā€¢ Both procedures are constantly running because
they don't know when the corresponding events will
occur
Physical Send frame
Request from.
Renat forever
Data frames
Data link
Recri {tqyg Physical
Repeat forever
TOO
Sender site algorithm for the
simplex protocol
// Repeat f0rever
ltaitForEvĀ»ntII;
it(Irent|nepestP0SenƩ)I
// Sleep vltil aE erent occur
//rlere is i paclet t0 aezd
Receiver site algorithm for the
simplex protocol
// lepeat forever
#d1II0Ā£$Y
en1tJĀ” // /lee9 vntil an erat 0
C
C
c
r
//&Iixec datatoaĀ«tvoct laye
. ā€¹Ā»
Flow iagram
protocol
for simplex ))ā€¢ā€¢ā€
Roquā€¹;|
Sender
Time
Arrival
Arriral
72
. . ā€¹Ā»
A simplex Stop and Wait
protocol
)))ā€¢Ā°
ā€™
ā€
ā€¢ Assumption is noiseless channel and
communication is unidirectional
ā€¢ Flow control is added to previous protocol
ā€¢ In this protocol, a small dummy frame is sent
back from the receiver to the transmitter to
indicate that it can send the next frame.
ā€¢ Here the sender sends one frame, stops until it
receives confirmation from the receiver and then
sends the next frame.
ā€¢ Hence the name stop and wait.
73
Design of stOp and wait
Protocol
duta tā€rainc
data link
lO
11
//Repeat zorev
//Allow the first frame to go
hile(true)
aosend = t cue
WaitForEvent( j / Sleep until an event
occur
if(Brent(RequestToSend) AND cansezd)
77 send the data 5zawe
/lean:not aend unt11 ACs arrive
WaitForEvent(); // Sleep until aE event occura
iI(Evest(ArrivalWotification) /f An ASK bas arrived
Sender site algorithm for the
Stop and wait protoCol
Receiver site algorithm for the
Stop and wait protoCol
//Repeat forever
faitf0r9vect I) i // Sleep utit ac evect occur(
if lavent l7irri*alNotificationl} //Onta frase drrires
Recetve7ā€¹ae() ;
Deliver(data),
fecdPrael);
//BJJverdatatonetwDr2faye,
Sender
AT
WT
WT
Time
Stop and Wait
WT =
Data
ACK
Data
ACK
Data
ACK
Receiver '
Time
Sā€¢
implex Protocol for Noā€¢
isy ā€¹
)
Ā»
ā€¢
.ā€¢ā€ŗ
Channel
Assumption
ā€¢ Frames may be damaged or lost completely
ā€¢ In this protocol, the sender waits for positive
acknowledgement before advancing to the next data
item
ā€¢ So it is called as PAR (positive acknowledgement with
retransmission) or Automatic Repeat Request (ARQ)
ā€¢ Due to retransmission there is always a possibility of
duplication of frames at the receiver.
ā€¢ To avoid this, sender puts a sequence number in the
header of each frame it sends.
ā€¢ The operation can be divided into two modes:
ā€¢1. Normal operatione
2.Time out
78
ASiITIp[ix ProtocOl fOr NoiSy Channei t;tt
Get date
Receive tend
frame frame
:Repe.it forever
ā€¢ā€¢ā€¢ ' 0 ā€¢ā€¢ā€¢
ackN o
Receis'er
Del iver
data
Receive Sentl
frame tiame.
Repeat forex-cr
Physical
ā€¹Ā»
Flow diā€¢agram
ż
ā€ž:
:ā€¢
::ā€¢
Stop
WƬme-uut
Sender
Time
Receiver
Time
ā€¢ In all practical situations, the transmission of
data needs to be bi-directional (full duplex)
ā€¢ One way of achieving full duplex
transmission is to have separate channels for
forward and reverse data transfer
ā€¢ But this will waste the bandwidth of reverse
channel almost entirely
ā€¢ A better solution would be to use each
channel (forward and reverse) to transmit
frames both ways, with both channels having
the same capacity
1
1
9
ā€ž.
ā€¢ Let A and B be the users.
ā€¢ When a frame is carrying data from A to B, it can
also carry control information about arrived or lost
frames from B; and vice-versa.
ā€¢ This technique where outgoing acknowledgement is
delayed temporarily is called as piggybacking.
ā€¢ Advantage: better use of available bandwidth
ā€¢ Disadvantage: additional complexity
ā€¢ If data link layer waits too long before transmitting
acknowledgement, then retransmission of frame
would take place
1
2
0
Back-N ARO
Design of Piggybacking
Scud
N et wOrk l9elis'er 'ei
Re ei vc
fā€ra
tend
fĀ°rame
Receive
ackNn
xegMo
Send
deliver Gct Nelw nrk
ā€™
ā€™
. - -.ā€™.ā€™.ā€™ā€ā€™ā€™
ā€™ ā€™ ā€™ ' : : ā€™ : : ā€™
ā€™
ā€™
ā€
-:
Receive SenU
fcamo frame
Data link
Php sical
Sliding Window
ā€¢ Sliding window is an abstract concept that define
the range of sequence numbers that is the conc
of the sender and receiver
ā€¢ The sender maintains a set of sequence numbers
corresponding to frames it is permitted to send.
ā€¢ These frames are said to fall within the sending
window.
ā€¢ Similarly, the receiver also maintains a receiving
window corresponding to the set of frames it is
permitted to accept.
ā€¢ The sender's window and the receiver's window
need not have the same lower and upper limits, or
even have the same size.
Sliding Window
ā€¢ In some protocols they are fixed in size, but in
others they can grow or shrink as frames are sent
and received.
ā€¢ The sequence numbers within the sender's window
represent frames sent but as yet not acknowledged.
ā€¢ Whenever a new packet arrives from the network
layer, it is given the next higher sequence number,
and the upper edge of the window is advanced by
one.
ā€¢ When an acknowledgement comes in, the lower
edge is advanced by one. In this way the window
continuously maintains a list of unacknowledged
frames.
Sliding window
ā€¢ Since frames currently within the sender's wind
may ultimately be lost or damaged in transmit, t
sender must keep all these frames in its memory for
possible retransmission.
ā€¢ Thus if the maximum window size is n, the senders
need n buffers to hold the unacknowledged frames.
ā€¢ If the window ever grows to its maximum size, the
sending data link layer must forcibly shut off the
network layer until another buffer becomes free.
ā€¢ The receiving data link layer's window corresponds
to the frames it may accept. Any frame falling
outside the window is discarded without comment.
Slidiā€¢ng wi
ā€¢ndow ā€¹
)Ā»
ā€¢ā€¢ā€¹
ā€ŗ
ā€¢ When a frame whose sequence number i equal to the lower edge o
the window is received, it is passed to the network layer, an
acknowledgement is generated, and the window is rotated by one
ā€¢ xFig. sliding window
ā€¢Window
ā€¢6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5
r $ e n
Sender window
ā€”> Direction Direction
This wall moves to the
ht frame by frame,
frame is sent.
This wall moves to the right,
the size of several frames
at a time, when an
ACK is received.
Sender sliding window
Recelver wlndow
Receiver slid window
Recelver wlndow
Direction Direction
This wall moves to the
rlght, frame byĀ°f ame,
when a frame
is received.
This wall moves to the right,
the slze of several frames at
a time, when an
ACK 1s sent.
Sliding window example
ata 2
ata
ReCeiVeF ā€˜ā€˜ā€˜ā€˜ā€˜ā€˜ā€˜ā€˜ā€˜ā€˜ā€˜ā€˜ā€˜
ā€¢ A One-bit sliding window protocol (Stop and
Wait ARQ)
x A protocol using Go Back N (Go-Back-N
ARQ)
ā€¢ A protocol using Selective Repeat (Selective
Repeat Request)
. . . . ā€¢
ā€¢
ā€¢
One bit slidi window )))ā€¢Ā°
protocol (Stop and Wait ARQ) *ā€ ā€™
ā€
ā€¢ One bit protocol because the maximum window size
is n=1.
ā€¢ Operation is based on ARQ
ā€¢ Transmitter sends one frame of data and waits for
an acknowledgement from the receiver
ā€¢ If it receives a positive acknowledgement (ACK) it
transmits the next frame.
ā€¢ If it receives a negative acknowledgement (NACK) it
retransmits the same frame.
))ā€¢ā€¹
retransmission ā€¢.
ā€¢ The transmitter stores the copy of last frame
transmitted until it receives an
acknowledgement for those frames.
ā€¢ Data frame is numbered 0 and ACK frame as 1
ā€¢ If an error occurs while transmission, receiver
sends a NAK back for retransmission of the
corrupted frame.
ā€¢ A timer is there for lost ACK and NACK frames
ā€¹Ā»
When is retransmission
required???
ā€¢ If the received frame is damaged
)))ā€¢
Ā°
ā€™
ā€
ā€¢ If the transmitted frame is lost
ā€¢ If the acknowledgement from the receiver is
lost
ā€¹Ā»ā€¹
Received Damaged frame ))
Ā»
)
Ƙ
O
Ā»ā€¹
ƏƏā€¢"
Lost acknowledgement
ā€¢ Advantages:
ā€¢ Simplicity
ā€¢ Requires minimum buffer size
ā€¢ Disadvantages:
ā€¢ Very inefficient. At any time only one frame
is in transition
x The sender will have to wait at least one
round trip time before sending next frame
ā€¹Ā»ā€¹
ā€¹ā€ŗā€¹.
Go-Back-N Protocol (Go-Back-NAR ):'
ā€¢ Based on sliding window protocol
ā€¢ Most commonly used
ā€¢ A sending station may send a series of
frames sequentially up to a maximum number
ā€¢ The number of unacknowledged frames is
determined by window size, using the sliding
window flow control technique
ā€¢ In case of no error, the destination will
acknowledge incoming frames as usual
ā€¢ If the destination detects error in a frame, or it
receives a frame out of order, it sends a NAK
for that frame
ā€¢ The destination will discard the frame in error
and all frames succeeding that frame in error
ā€¢ The source station on receiving the NAK,
must retransmit the frame in error plus all
succeeding frames.
Damaged
frame
Sender
Data
Data
Data
Data
Receiver
Data
Data
Data
NAK S Error in Iraise 3
Di bearded
dcd
Lost frame
Sender
Data O
Data I
Data 2
Data
Data
Receiver
Data O
Data I
NAK 2
Discarded
DƏxcarded
Time
out
Lost
ACK
Sender
Data
Data
Data
Receiver
Data
Data
Data
ACK 3
ā€¢ It transmits all the frames if one frame is
damaged or lost
x It transmits frames continuously as long as it
does not receive the ACK or NACK signals
ā€¢ Error can be introduced if NAK is lost
ā€¹Ā»
. ....
Selective Repeat ARQ
ā€¢ In this method only the damaged or lost
frame is retransmitted.
ā€¢ The receiver can do the sorting of data
frames and is also able to store frames
t::.
received after a NAK has been sent until the
damaged frame has been replaced
ā€¢ The transmitter must contain a searching
mechanism that allows it to find and select
only the requested frame for retransmission
.
ā€¹.
Ā»
..
.
,.ā€¢,
Selective Repeat ARO
Sender
ā€¢.
ā€
Data
Data
Data
Data
Data
Data
Receiver
Data
Data
NAK 2
Data
Data
Data
ā€¹Ā»
. ....
Selective Repeat ARQ
ā€¢ Transmitter does not wait for the ACK signal for
transmitting the next code.
t::.
ā€¢ It transmits the code continuously till it receives the
NAK signal from the receiver.
ā€¢ On reception of the NAK signal, the transmitter will
retransmit only that frame 2 and continue with the
sequence 6, 7
ā€¢ The frames 6,7 received by the receiver are not
discarded by the receiver.
ā€¢ The receiver receives the retransmitted frames in
between the regular frames.
ā€¢ Therefore receiver will have to maintain the frames
sequentially.
Exa I data I
rotocol
ā€¹Ā»ā€¹
.
ā€¹.ā€ŗ
..ā€¹
:,
.
. ee:
Example data Iink protocols
ā€¢ HDLC
ā€¢ SDLC
ā€¢ PPP protocol
ā€¢ LAP protocol
ā€¢.
Ā»
level data link )))ā€¢Ā°
DLC Hig
control
ā€¢ Bit oriented protocol for communication over
point to point and point to multipoint links.
x It implements ARQ mechanisms
ā€¢ HDLC provides two common transfer mode:
ā€¢ Normal response mode (NRM)
Ā» Asynchronous balanced mode (ABM)
ā€¹Ā»
.
i::Ā°
Normal response mode (NRM) :ā€¢
ā€¢ The station configuration is unbalanced
ā€¢ One primary station and multiple secondary
stations
ā€¢ Aprimary station can send commands; a
secondary station can only respond
a. Point-toā€¢point
b. Multipoint
Rcstxā€ŗnse
Secondary
.
ā€¹.
Ā»
..
.
....:,
Asynchronous Balanced Mode
ā€¢ In this the configuration is balanced
ā€¢ Link is balanced and each station can
function as a primary and a secondary
Balanced
Combined
omnian
iā€¢esponse
Combined
iā€¢esponse
+
....
..
,
...
ā€¢..
ā€žā€ŗ
.
DLC Frames
Ā» Information frames (I-frames): transport
user data and control information
ā€
ā€¢ Supervisory frames (S-frames): transport
control information
Ā« Unnumbered frames (U-frames): used for
system management
Frame format
Field
s
use """?Fentify beginning and end of frame
ā€¢ field: 8-bit sequence with bit pattern 011111
ā€¢ Address field: contains address of secondary
station. I primary station created the frame contains
to if secondary created the frame, it contains from
address. Address field can be 1 byte or several
bytes long. 1 byte identifies 128 stations (1bit used
for some purpose)
ā€¢ Control field: 1 or 2 byte segment used for error
control and flow control
Ā« Information field: contains user data or
management information. Length varies for different
networks
Ā« FCS field: HDLC error correction field. It can
contain 2 or 4 byte ITU-T CRC.
ā€¹Ā»
.
,
...
ā€¢.
,.
DLC address field ā€
Flag Adā€¹lress Control Information FCS Flag
The address is one byte
or a multiple of bytes.
One-byte address
Multi-byte address
0
ā€¢ Determines the type of frame and defines it
functionality
Flag Address Information FCS Flag
I-Frā€¹ime
NtS) N(Rā€ŗ P/F Poll/final bit
N(S) Sequence number of
frame sent
N(R) Sequence number of
next frame expected
Code Code for supervisory
or unnumbered frame
S-fā€œrā€¹ime
U- Fi ante
Code N( R)
Code Code
ā€¹Ā»
. ....
Control field for I-frames
ā€¢ First bit 0 denotes that it is I-frame
::ā€¢.
ā€™
ā€
ā€¢ 3 bits of N(S) denotes that it is sequence
number. 0 to 7 sequence numbers possible
ā€¢ Last 3 bits of N(R) denote acknowledgement
number
ā€¢ P/F bit called poll-final bit
ā€¢ Poll- means frame sent from primary to
secondary
ā€¢ Final ā€”means frame is sent from secondary
to primary
Final
Primary Secondary
1
6
0
.
ā€¹.
Ā»
..
.
,.ā€¢,
Control field for S-frames ā€
ā€¢ Used for error and flow control when
piggybacking is impossible or inappropriate
ā€¢ 10 bit indicates it is S-frame
ā€¢ PF is poll-final bit
ā€¢ N(R) denotes ACK no or NAK depending on
type of frame.
ā€¢ 2 code bits define the type of S-frames:
ā€¹Ā».
field for S-frames tā€¢
ā€¢ Receive Ready (RR) : if code field is 00, it is S
ā€”
frame. Denotes safe receipt of frame by receiver.
Here N(R) denotes ACK
ā€¢ Receive Not ready (RNR): if code is 10 it is RNR. It
means frame is received safely but the receiver is
busy. Here N(R) is ACK no.
ā€¢ Reiect (REV): if code field is 01, it is REJ Sā€”frame. It
is NAK frame used in Go-Back-N ARQ. N(R) is NAK
ā€¢ Selective reiect (SREd): if code field is 11, it is
SREJ S-frame. It is NAK frame used in selective
repeat ARQ. N(R) here is NAK
ā€¹Ā»
ā€¢ ....
field for U-frames
ā€¢ U-frames used to exchange session
ement and control information
between connected devices
ā€¢ U-frame codes are divided into 2 sections:
ttā€¢
ā€¢ 2-bit prefix before PF bit and 3-bit suffix after
PF.
ā€¢ These 5 bits together can be used to create
up to 32 different types of U-frames
U-frame control field
ā‚¬ā‚¬i
II 011
11 010
11 1
@
II 110
@ 110
& 010
II 1
0
1
10 @1
Coiā€ŗii/iz/id
Set normal response mode
SNRM extended
Disconnect mode
Unnumbered information
Request disconnect
Set initialization mode/
Request information mode
1IIIā€
qā€ŗ
!
1: 
IIIā€ŗ
){)t]
Unnumbered poll
Frame reject
SDLC Synchronous Data li
ā€¢nk
control protocol
ā€¹
)Ā»
ā€¢ā€¢ā€¢
.
ā€™
ā€
ā€¢ Used by IBM
ā€¢ Not a standard but is widely used
ā€¢ Asubset of HDLC
ā€¢ There are primary and secondary stations
defined for HDLC
KGF16 aa OT11410
. layer
.
the
in
sLIPa
n
dP
P
P
ā€¹Ā»
The data link ))ā€¢ā€¹
.
i n t e r n e t
t. :
ā€œ
PC
User's home
Client process
using TCP/IP
Internet provider's office
Modems
Dial-up
telephone line
Modem
TCP/IP connection
using SLIP or PPP
Router
process
The
1
6
6
ā€¢ Used to connect the home computers to the server
of an ISP
ā€¢ Most of the users have a traditional modem and
they are connected to the Internet through a
telephone line or cable TV
ā€¢ PPP is used for controlling and managing the data
transfer
ā€¢ Can operate over a full duplex point-to-point
transmission link, asynchronous links, bit
synchronous links or ADSL and SONET
ā€¢ Character-oriented protocol
1
6
7
ā€¹Ā».
Services provided by PPP tt:
ā€¢ Defines the format of the frames
ā€¢ It defines how the link between two devices is
to be established and how the data exchange
should take place. Uses LCP (link control
protocol)
ā€¢ Decides the encapsulation of network layer
into the data link frame. Uses NCP (network
control protocol)
ā€¢ It defines the way in which the two devices
can authenticate each other
ā€¹Ā»
1
6
8
Frame format of PPP .
i.
!:ā€¢ā€
ā€ž.
Ā» Fla . the PPP always begin and end with flag
ā€¢ Address: broadcast address. All 1s in the
frame indicate all stations can accept the
frame
ā€¢ Control: denotes unnumbered frame,
indicates no flow control and error control
Bytes 1
Flag Address
01111110 111111
11
1 or2 Variable 2or 4
Conol
0000001i
Protocol Paytload Checksum
1
Flag
01111110
Ā» Protocol: tells the type of packet contain d
in payload. E.g. LCP, NCP, IP, OSI CLNP,
XNS
1
6
9
Ā» Payload field: variable length, up to
negotiated maximum. Default 1500 bytes.
Padding may follow payload field
Ā« Checksum: normally 2 bytes, but 4 bytes
can be used. Can use CCITT 16 or 32
generator polynomial
ā€¹Ā»
1
7
0
....
Making a communication t::.
1. PC calls the provider's router by a mode
2. Use LCP packets to select PPP parameters
3. Use NCP to receive an IP address
4. Send and receive IP packets
5. Use NCP to tear down the network layer
connection and free up the IP address
6. Use LCP to shutdown the data link
connection
7. The computer tells the modem to hang up
Transition states
of
ā€¹ Asimple phase diagram for bringing line
and down
Carter
Failod
Failed
aueeā€¢scarĀ»ā€¢
NCP
1
7
2
ā€¹Ā»
.
Transition states of PPP :
Ā«:::
.'ā€œ
ā€¢ Dead: link is not used. No active carrier and line is
quiet
ā€¢ Establish: when communication starts. User sends
configure request packet to negotiate options. If
successful goes into authenticating state. LCP
packets used
Ā« Authentication: user sends the authenticate
request packet
Ā« Network: NCP protocol is invoked to configure the
network layer
Ā« Ooen: exchange of user data and control packets
ā€¢ Terminate: user sends terminate packet to
terminate the link
1
7
3
ā€¹Ā».
Link control protocol tt:
ā€¢ LCP responsibilities:
ā€¢ To establish links
ā€¢ To maintain established links
ā€¢ To configure the links
ā€¢ Termination of the links
ā€¢ It also provides negotiation mechanisms.
ā€¢ When PPP is carrying LCP packet it is in the link
establishina state or in link terminating state and
user data is not carried in these states
ā€¢ All LCP packets are carried in the payload field of
the PPP frame with protocol field set to C021 in
hexadecimal
..e
1
7
4
LCP packet encapsulƤted n Ć£ ))
frame oo
1 1 I
nłrtirrtƬoi:
ā€¹Ā».
1
7
5
.
...
..
.:.
,
Types of LCP packets
ackets: first 4 used for link
configuration during establish phase
Ā« Link terminatin ackets: 5 and 6 used for
link termination during termination phase
ackets: last five used for
link monitoring and debugging
ā€œ
ā€ .t ā€ cut.Ty.pā€™ ā€ tā€˜ Detcnā€™ptjOn . .- ;
0x0l . Configure-request Contains thelist of proposed options andtheir vnlues
Configure-ack Accepts all options proposed
0s02
0x03 Configure-nak Announces thatsomeoptions arenot acceptable
'0x04 Configure-reject Announces thatsoineoptions arenotrecognized
0 05 Terminate-request Request toshut dOWntheline
0x06 Terminal-ack Accept theshutdownrequest
0x07 Code-reject Announces anunknown code
0xO8 Protocolā€”reject Announces anunknown protocol
0x09 Ecb0-fequest A typeof hellomessage tocheck if theotherendisalive
0x0A Echoā€”reply Theresponse totheecho-request message
0x0B Discard-request A request todiscardlttepacket
LCP packets
1
7
6
0pi!ā€™vn .Default
Maximum receive unit (payload field size) 15 0
Authentication protocol None
Protocol field compression Ofl
Address and control field compression Off
Common options
ā€¢ Many options that can be negotiated betw en
two endpoints
ā€¢ Options are inserted in the information field
ā€¢ Information 1ield is divided into option type,
option length and option data
ā€¹Ā»
.
Authentication protocols tt'ā€
ā€¢ PPP needs authentication because it is u ed
for dial-up links.
ā€¢ Authentication is to validate the identity of a
user who needs to access the set of
resources.
ā€¢ Two protocols created by PPP for
authentication are:
Ā» Password authentication Rā€¢O^OcOI (PAP)
ā€¢ Challenge handshake protocol (CHAP)
ā€¢ These are used during authentication and no
user data is exchanged
140
Payload
(and padding)
Flag
PAP
ā€ŗ PAP packetsencapsulated in a PPP tram
client
Accnā€¢ granted ! g{8d
Authentic ate-request
Authonticatc-ack
Authenticate-nak Code: 3 Length
Mcssag llmzname
Code: I Length
UNIT name Password
length
Varsablc
PAP packet.s
CHAP
ā€¢ CHAP packets encapsulated in a PPP fra
CHAP LhalleĀ»ge: H6ty" t@![ā€ŗ
CHAP Response: Answer: 89it%-OkL
1
8
1
ā€¹Ā»
. ....
Link Access Protocol (LAP)
ā€¢ LAP originates from IBM SDLC.
Ā« Later it was named as LAPB (LAR balanced:/|
t::.
ā€¢ LAP is data link protocol for X.25
ā€¢ LAPB is used to manage communication and packet
framing between data terminal equipment (DTE) and
the data circuit-terminating equipment (DCE)
devices in the X.25 protocol stack.
ā€¢ LAPB is essentially HDLC in Asynchronous
Balanced Mode (ABM).
ā€¢ LAPB sessions can be established by either the
DTE or DCE.
ā€¢ Bit oriented
ā€¢ LAPB makes sure that frames are error free and
properly sequenced.
ā€¢ I-Frames :
1
8
2
*
ā€¢ Carries data and control information.
ā€¢ It includes sequencing, flow control, and error detection
and recovery. I-frames carry send and receive sequence
numbers.
ā€¢ S-Frames :
e Carries control information.
ā€¢ S-frame functions include requesting and suspending
transmissions, reporting on status, and acknowledging the
receipt of I-frames.
ā€¢ U-Frames :
ā€¢ carries control information.
ā€¢ U-frame functions include link setup and disconnection, as
well as error reporting.
DW
1
8
3
D
1
1
1
1
1
1
0
LAPB protocol operation
1
8
4
ā€¢ In LAPB, since there is no master/slave relations
the sender uses the Poll bit to insist on an
immediate response.
ā€¢ In the response frame this same bit becomes the
receivers Final bit.
ā€¢ The receiver always turns on the Final bit in its
response to a command from the sender with the
Poll bit set.
ā€¢ The P/F bit is generally used when either end
becomes unsure about proper frame sequencing
because of a possible missing acknowledgement,
and it is necessary to re-establish a point of
reference.
LAPF- Link Access Procedure/proto
for Frame Mode Services
1
8
5
ā€¢ Defined in the ITU Q.922
ā€¢ An enhanced LAPD (Q.921 with congestion control
capabilities
ā€¢ Used for Frame Mode Services in the Frame Relay
network.
ā€¢ The core functions of LAPF are:
ā€¢ Frame delimiting, alignment, and flag transparency
ā€¢ Virtual circuit multiplexing and de-multiplexing
Octet alignment: Integer number of octets before
zero-bit insertion
ā€¢ Checking minimum and maximum frame sizes
ā€¢ Error detection, Sequence and non-duplication
ā€¢ Congestion control
Flag Address field Control elo Information F
C
S Flag
Protocol format
1
8
6

More Related Content

Similar to module 2 cn new.pptx

CN R16 -UNIT-3.pdf
CN R16 -UNIT-3.pdfCN R16 -UNIT-3.pdf
CN R16 -UNIT-3.pdfJoshuaeeda1
Ā 
Unit 3 - Data Link Layer - Part A
Unit 3 - Data Link Layer - Part AUnit 3 - Data Link Layer - Part A
Unit 3 - Data Link Layer - Part AChandan Gupta Bhagat
Ā 
Computer Network
Computer NetworkComputer Network
Computer NetworkRubaya Mim
Ā 
Lecture 2 data link layer 1 v1
Lecture 2 data link layer 1 v1Lecture 2 data link layer 1 v1
Lecture 2 data link layer 1 v1Ronoh Kennedy
Ā 
Computer Network Notes UNIT II
Computer Network Notes UNIT IIComputer Network Notes UNIT II
Computer Network Notes UNIT IINANDINI SHARMA
Ā 
Jaimin chp-3 - data-link layer- 2011 batch
Jaimin   chp-3 - data-link layer- 2011 batchJaimin   chp-3 - data-link layer- 2011 batch
Jaimin chp-3 - data-link layer- 2011 batchJaimin Jani
Ā 
UNIT-2 PPT Data link layer.pptx
UNIT-2 PPT Data link layer.pptxUNIT-2 PPT Data link layer.pptx
UNIT-2 PPT Data link layer.pptxdiptijilhare
Ā 
Chapter 2.1.1.pptx
Chapter 2.1.1.pptxChapter 2.1.1.pptx
Chapter 2.1.1.pptxbotAlert
Ā 
data link layer to print
data link layer to printdata link layer to print
data link layer to printBishalWosti1
Ā 
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSComputer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSDr. SELVAGANESAN S
Ā 
unit2-210710110327.pdf
unit2-210710110327.pdfunit2-210710110327.pdf
unit2-210710110327.pdfssuser3aa461
Ā 
A427 nic card
A427 nic cardA427 nic card
A427 nic cardsurajbhai
Ā 
IEEE standards and Data Link Layer Protocol
IEEE standards and Data Link Layer ProtocolIEEE standards and Data Link Layer Protocol
IEEE standards and Data Link Layer ProtocolSajith Ekanayaka
Ā 
unit2-210710110327.pptx
unit2-210710110327.pptxunit2-210710110327.pptx
unit2-210710110327.pptxLAVANYAsrietacin
Ā 

Similar to module 2 cn new.pptx (20)

CN R16 -UNIT-3.pdf
CN R16 -UNIT-3.pdfCN R16 -UNIT-3.pdf
CN R16 -UNIT-3.pdf
Ā 
Unit 2 [autosaved]
Unit 2 [autosaved]Unit 2 [autosaved]
Unit 2 [autosaved]
Ā 
Unit 3 - Data Link Layer - Part A
Unit 3 - Data Link Layer - Part AUnit 3 - Data Link Layer - Part A
Unit 3 - Data Link Layer - Part A
Ā 
Computer Network
Computer NetworkComputer Network
Computer Network
Ā 
Lecture 2 data link layer 1 v1
Lecture 2 data link layer 1 v1Lecture 2 data link layer 1 v1
Lecture 2 data link layer 1 v1
Ā 
Computer Network Notes UNIT II
Computer Network Notes UNIT IIComputer Network Notes UNIT II
Computer Network Notes UNIT II
Ā 
Jaimin chp-3 - data-link layer- 2011 batch
Jaimin   chp-3 - data-link layer- 2011 batchJaimin   chp-3 - data-link layer- 2011 batch
Jaimin chp-3 - data-link layer- 2011 batch
Ā 
III_UNIT.pptx
III_UNIT.pptxIII_UNIT.pptx
III_UNIT.pptx
Ā 
III_UNIT.pptx
III_UNIT.pptxIII_UNIT.pptx
III_UNIT.pptx
Ā 
UNIT-2 PPT Data link layer.pptx
UNIT-2 PPT Data link layer.pptxUNIT-2 PPT Data link layer.pptx
UNIT-2 PPT Data link layer.pptx
Ā 
Chapter 2.1.1.pptx
Chapter 2.1.1.pptxChapter 2.1.1.pptx
Chapter 2.1.1.pptx
Ā 
Data link layer
Data link layerData link layer
Data link layer
Ā 
Data link layer
Data link layerData link layer
Data link layer
Ā 
data link layer to print
data link layer to printdata link layer to print
data link layer to print
Ā 
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSComputer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Ā 
unit2-210710110327.pdf
unit2-210710110327.pdfunit2-210710110327.pdf
unit2-210710110327.pdf
Ā 
A427 nic card
A427 nic cardA427 nic card
A427 nic card
Ā 
IEEE standards and Data Link Layer Protocol
IEEE standards and Data Link Layer ProtocolIEEE standards and Data Link Layer Protocol
IEEE standards and Data Link Layer Protocol
Ā 
unit2-210710110327.pptx
unit2-210710110327.pptxunit2-210710110327.pptx
unit2-210710110327.pptx
Ā 
Datalinklayer tanenbaum
Datalinklayer tanenbaumDatalinklayer tanenbaum
Datalinklayer tanenbaum
Ā 

More from DrPreethiD1

Introduction to healthcare.pptx
Introduction to healthcare.pptxIntroduction to healthcare.pptx
Introduction to healthcare.pptxDrPreethiD1
Ā 
JAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptxJAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptxDrPreethiD1
Ā 
Module 1 CN -new.pptx
Module 1 CN -new.pptxModule 1 CN -new.pptx
Module 1 CN -new.pptxDrPreethiD1
Ā 
B19CA4020_SE_Unit3.pptx
B19CA4020_SE_Unit3.pptxB19CA4020_SE_Unit3.pptx
B19CA4020_SE_Unit3.pptxDrPreethiD1
Ā 
B21DA0201_04.ppt
B21DA0201_04.pptB21DA0201_04.ppt
B21DA0201_04.pptDrPreethiD1
Ā 
Introduction-to-Software-Engineering.ppt
Introduction-to-Software-Engineering.pptIntroduction-to-Software-Engineering.ppt
Introduction-to-Software-Engineering.pptDrPreethiD1
Ā 
B21DA0201_03.ppt
B21DA0201_03.pptB21DA0201_03.ppt
B21DA0201_03.pptDrPreethiD1
Ā 
CCNA-lab-Manual.pdf
CCNA-lab-Manual.pdfCCNA-lab-Manual.pdf
CCNA-lab-Manual.pdfDrPreethiD1
Ā 
B21DA0201_02.ppt
B21DA0201_02.pptB21DA0201_02.ppt
B21DA0201_02.pptDrPreethiD1
Ā 
B21DA0201_01.ppt
B21DA0201_01.pptB21DA0201_01.ppt
B21DA0201_01.pptDrPreethiD1
Ā 
138045890.pdf
138045890.pdf138045890.pdf
138045890.pdfDrPreethiD1
Ā 
Module 1 CN -new.pptx
Module 1 CN -new.pptxModule 1 CN -new.pptx
Module 1 CN -new.pptxDrPreethiD1
Ā 
presentation_intro_to_networking_1457926557_181219.ppt
presentation_intro_to_networking_1457926557_181219.pptpresentation_intro_to_networking_1457926557_181219.ppt
presentation_intro_to_networking_1457926557_181219.pptDrPreethiD1
Ā 
SE-TEXT-BOOK_Material.doc
SE-TEXT-BOOK_Material.docSE-TEXT-BOOK_Material.doc
SE-TEXT-BOOK_Material.docDrPreethiD1
Ā 
SE-TEXT-BOOK_Material.doc
SE-TEXT-BOOK_Material.docSE-TEXT-BOOK_Material.doc
SE-TEXT-BOOK_Material.docDrPreethiD1
Ā 
presentation_intro_to_networking_1457926557_181219.ppt
presentation_intro_to_networking_1457926557_181219.pptpresentation_intro_to_networking_1457926557_181219.ppt
presentation_intro_to_networking_1457926557_181219.pptDrPreethiD1
Ā 
138045890.pdf
138045890.pdf138045890.pdf
138045890.pdfDrPreethiD1
Ā 
presentation_intro_to_networking_1457926557_181219.ppt
presentation_intro_to_networking_1457926557_181219.pptpresentation_intro_to_networking_1457926557_181219.ppt
presentation_intro_to_networking_1457926557_181219.pptDrPreethiD1
Ā 

More from DrPreethiD1 (18)

Introduction to healthcare.pptx
Introduction to healthcare.pptxIntroduction to healthcare.pptx
Introduction to healthcare.pptx
Ā 
JAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptxJAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptx
Ā 
Module 1 CN -new.pptx
Module 1 CN -new.pptxModule 1 CN -new.pptx
Module 1 CN -new.pptx
Ā 
B19CA4020_SE_Unit3.pptx
B19CA4020_SE_Unit3.pptxB19CA4020_SE_Unit3.pptx
B19CA4020_SE_Unit3.pptx
Ā 
B21DA0201_04.ppt
B21DA0201_04.pptB21DA0201_04.ppt
B21DA0201_04.ppt
Ā 
Introduction-to-Software-Engineering.ppt
Introduction-to-Software-Engineering.pptIntroduction-to-Software-Engineering.ppt
Introduction-to-Software-Engineering.ppt
Ā 
B21DA0201_03.ppt
B21DA0201_03.pptB21DA0201_03.ppt
B21DA0201_03.ppt
Ā 
CCNA-lab-Manual.pdf
CCNA-lab-Manual.pdfCCNA-lab-Manual.pdf
CCNA-lab-Manual.pdf
Ā 
B21DA0201_02.ppt
B21DA0201_02.pptB21DA0201_02.ppt
B21DA0201_02.ppt
Ā 
B21DA0201_01.ppt
B21DA0201_01.pptB21DA0201_01.ppt
B21DA0201_01.ppt
Ā 
138045890.pdf
138045890.pdf138045890.pdf
138045890.pdf
Ā 
Module 1 CN -new.pptx
Module 1 CN -new.pptxModule 1 CN -new.pptx
Module 1 CN -new.pptx
Ā 
presentation_intro_to_networking_1457926557_181219.ppt
presentation_intro_to_networking_1457926557_181219.pptpresentation_intro_to_networking_1457926557_181219.ppt
presentation_intro_to_networking_1457926557_181219.ppt
Ā 
SE-TEXT-BOOK_Material.doc
SE-TEXT-BOOK_Material.docSE-TEXT-BOOK_Material.doc
SE-TEXT-BOOK_Material.doc
Ā 
SE-TEXT-BOOK_Material.doc
SE-TEXT-BOOK_Material.docSE-TEXT-BOOK_Material.doc
SE-TEXT-BOOK_Material.doc
Ā 
presentation_intro_to_networking_1457926557_181219.ppt
presentation_intro_to_networking_1457926557_181219.pptpresentation_intro_to_networking_1457926557_181219.ppt
presentation_intro_to_networking_1457926557_181219.ppt
Ā 
138045890.pdf
138045890.pdf138045890.pdf
138045890.pdf
Ā 
presentation_intro_to_networking_1457926557_181219.ppt
presentation_intro_to_networking_1457926557_181219.pptpresentation_intro_to_networking_1457926557_181219.ppt
presentation_intro_to_networking_1457926557_181219.ppt
Ā 

Recently uploaded

Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PPRINCE C P
Ā 
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPirithiRaju
Ā 
GenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptxGenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptxBerniceCayabyab1
Ā 
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxLIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxmalonesandreagweneth
Ā 
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.PraveenaKalaiselvan1
Ā 
TOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physicsTOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physicsssuserddc89b
Ā 
Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024AyushiRastogi48
Ā 
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxTHE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxNandakishor Bhaurao Deshmukh
Ā 
Analytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptxAnalytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptxSwapnil Therkar
Ā 
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptxRESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptxFarihaAbdulRasheed
Ā 
OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024innovationoecd
Ā 
Best Call Girls In Sector 29 Gurgaonā¤ļø8860477959 EscorTs Service In 24/7 Delh...
Best Call Girls In Sector 29 Gurgaonā¤ļø8860477959 EscorTs Service In 24/7 Delh...Best Call Girls In Sector 29 Gurgaonā¤ļø8860477959 EscorTs Service In 24/7 Delh...
Best Call Girls In Sector 29 Gurgaonā¤ļø8860477959 EscorTs Service In 24/7 Delh...lizamodels9
Ā 
ā€ā€VIRUS - 123455555555555555555555555555555555555555
ā€ā€VIRUS -  123455555555555555555555555555555555555555ā€ā€VIRUS -  123455555555555555555555555555555555555555
ā€ā€VIRUS - 123455555555555555555555555555555555555555kikilily0909
Ā 
Call Girls in Munirka Delhi šŸ’ÆCall Us šŸ”8264348440šŸ”
Call Girls in Munirka Delhi šŸ’ÆCall Us šŸ”8264348440šŸ”Call Girls in Munirka Delhi šŸ’ÆCall Us šŸ”8264348440šŸ”
Call Girls in Munirka Delhi šŸ’ÆCall Us šŸ”8264348440šŸ”soniya singh
Ā 
Environmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial BiosensorEnvironmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial Biosensorsonawaneprad
Ā 
Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)DHURKADEVIBASKAR
Ā 
Manassas R - Parkside Middle School šŸŒŽšŸ«
Manassas R - Parkside Middle School šŸŒŽšŸ«Manassas R - Parkside Middle School šŸŒŽšŸ«
Manassas R - Parkside Middle School šŸŒŽšŸ«qfactory1
Ā 
Transposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.pptTransposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.pptArshadWarsi13
Ā 

Recently uploaded (20)

Artificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C PArtificial Intelligence In Microbiology by Dr. Prince C P
Artificial Intelligence In Microbiology by Dr. Prince C P
Ā 
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdfPests of jatropha_Bionomics_identification_Dr.UPR.pdf
Pests of jatropha_Bionomics_identification_Dr.UPR.pdf
Ā 
GenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptxGenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptx
Ā 
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxLIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
Ā 
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
Ā 
TOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physicsTOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physics
Ā 
Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024Vision and reflection on Mining Software Repositories research in 2024
Vision and reflection on Mining Software Repositories research in 2024
Ā 
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptxTHE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
THE ROLE OF PHARMACOGNOSY IN TRADITIONAL AND MODERN SYSTEM OF MEDICINE.pptx
Ā 
Analytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptxAnalytical Profile of Coleus Forskohlii | Forskolin .pptx
Analytical Profile of Coleus Forskohlii | Forskolin .pptx
Ā 
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptxRESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
RESPIRATORY ADAPTATIONS TO HYPOXIA IN HUMNAS.pptx
Ā 
OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024
Ā 
Best Call Girls In Sector 29 Gurgaonā¤ļø8860477959 EscorTs Service In 24/7 Delh...
Best Call Girls In Sector 29 Gurgaonā¤ļø8860477959 EscorTs Service In 24/7 Delh...Best Call Girls In Sector 29 Gurgaonā¤ļø8860477959 EscorTs Service In 24/7 Delh...
Best Call Girls In Sector 29 Gurgaonā¤ļø8860477959 EscorTs Service In 24/7 Delh...
Ā 
ā€ā€VIRUS - 123455555555555555555555555555555555555555
ā€ā€VIRUS -  123455555555555555555555555555555555555555ā€ā€VIRUS -  123455555555555555555555555555555555555555
ā€ā€VIRUS - 123455555555555555555555555555555555555555
Ā 
Call Girls in Munirka Delhi šŸ’ÆCall Us šŸ”8264348440šŸ”
Call Girls in Munirka Delhi šŸ’ÆCall Us šŸ”8264348440šŸ”Call Girls in Munirka Delhi šŸ’ÆCall Us šŸ”8264348440šŸ”
Call Girls in Munirka Delhi šŸ’ÆCall Us šŸ”8264348440šŸ”
Ā 
Environmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial BiosensorEnvironmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial Biosensor
Ā 
Hot Sexy call girls in Moti Nagar,šŸ” 9953056974 šŸ” escort Service
Hot Sexy call girls in  Moti Nagar,šŸ” 9953056974 šŸ” escort ServiceHot Sexy call girls in  Moti Nagar,šŸ” 9953056974 šŸ” escort Service
Hot Sexy call girls in Moti Nagar,šŸ” 9953056974 šŸ” escort Service
Ā 
Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)
Ā 
Manassas R - Parkside Middle School šŸŒŽšŸ«
Manassas R - Parkside Middle School šŸŒŽšŸ«Manassas R - Parkside Middle School šŸŒŽšŸ«
Manassas R - Parkside Middle School šŸŒŽšŸ«
Ā 
Transposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.pptTransposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.ppt
Ā 
Engler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomyEngler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomy
Ā 

module 2 cn new.pptx

  • 1. COMPUTER NETWORKS MODULE II Dr.Preethi Assistant Professor School of CS and IT
  • 2. Physical & Data Link Layer: Ethernet- Physical Layer and Data link layer switching: Learning bridges- spanning tree bridges, repeaters, hubs, bridges, switches, routers, and gateways. Data Link Layer - Design issues, Error Detection & Correction, Data Link Layer Protocols, Sliding window protocols.
  • 4. 13-1 IEEE STANDARDS In 1985,,,, the Computer Society of the IEEE started a project, called Project 802, to set standards to enable intercommunication among equipment from a variety of manufacturers. Project 802 is a way of specifying functions of the physical layer and the data link layer of major LAN protocols. Topics discussed in this section: Data Link Layer Physical Layer 13.4
  • 5. Figure 13.1 IEEE standard for LANs 13.5
  • 6. 13-2 STANDARD ETHERNET The original Ethernet was created in 1976 at Xeroxā€™s Palo Alto Research Center (PARC). Since then, it has gone through four generations.. We briefly discuss the Standard (or traditional) Ethernet in this section. 13.6 Topics discussed in this section: MAC Sublayer Physical Layer
  • 7. Figure 13.3 Ethernet evolution through four generations 13.7
  • 8. Figure 13.4 802.3 MAC frame 13.8
  • 9. Note Frame length: Minimum: 64 bytes (512 bits) Maximum: 1518 bytes (12,144 bits) 13.9
  • 10. Note The least significant bit of the first byte defines the type of address. If the bit is 0, the address is unicast; otherwise, it is multicast.
  • 11. Figure 13.8 Categories of Standard Ethernet
  • 12. Figure 13.13 10Base-F implementation
  • 13. 13-4 FAST ETHERNET Fast Ethernet was designed to compete with LAN protocols such as FDDI or Fiber Channel. IEEE created Fast Ethernet under th nam 80 .. u.. Fast Ethernet is backward-compatible with Standard Ethernet, but it can transmit data 10 times faster at a rate of 100 Mbps. Topics discussed in this section: MAC Sublayer Physical Layer
  • 14. Figure 13.19 Fast Ethernet topology
  • 15. Figure 13.20 Fast Ethernet implementations
  • 16. 13-5 GIGABIT ETHERNET The need for an even higher data rate resulted in the design of the Gigabit Ethernet protocol (1000 Mbps). The IEEE committee calls the standard 802..3z.. Topics discussed in this section: MAC Sublayer Physical Layer Ten-Gigabit Ethernet
  • 17. Note In the full-duplex mode of Gigabit Ethernet, there is no collision; the maximum length of the cable is determined by the signal attenuation in the cable.
  • 18. Figure 13.22 Topologies of Gigabit Ethernet
  • 19. Figure 13.23 Gigabit Ethernet implementations
  • 20.
  • 21.
  • 22.
  • 23.
  • 25. 2 5 Topics ā€¢ Data link layer design issues ā€¢ Error detection and correction ā€¢ Elementary data link protocols ā€¢ Sliding window protocols ā€¢ Example data link protocols ā€¢ HDLC ā€¢ LAP .... ::-
  • 27. Data Link layer design issues ā€¢ Services provided to the network layer ā€¢ Framing ā€¢ Error control ā€¢ Flow control
  • 28. 2 8 Datalink layerdesign issues ā€¢ Functions of data link layer ā€¢ Providing a well-defined service interface to the network layer ā€¢ Determining how the bits of the physical layer are grouped into frames ā€¢ Dealing with transmission errors ā€¢ Regulating the flow of frames so that slow receivers are not swamped by fast senders
  • 29. Header Payload field Trailer Header Payload field Trailer Datalinklayer design 2 9 issues Relationship between packets and frames Sending machine Packet Frame Receiving machine Packet
  • 30. Services provided the network layer ā€¢ Main service to be provided is to transfer data from network layer on the sending machine to the network layer on the destination machine. a) virtual communication b) actual communication Host 1 Host 2 Host 1 Host 2 Virtual data path Actua1 data path 7
  • 31. 3 1 Types services provided Ā° ā€¢ Three reasonable possibilities for data link services: 1.Unacknowledged connectionless service 2. Acknowledged connectionless service 3. Acknowledged connection-oriented service
  • 32. 3 2 Unacknowledged connectionless service 1. Source sends independent frames to the destination without the destination acknowledging them. 2. No connection is established or released 3. If a frame is lost due to noise on the line, no attempt is made to recover it. 4. Appropriate when the error rate is very low s. Appropriate for real-time traffic, such as speech, in which late data are worse than bad data 6. Mostly LANs use this.
  • 33. 3 3 Acknowledged connectionless service ā€¢ Next step to improve reliability ā€¢ No connections used but for each frame received, the receiver sends an acknowledgement. ā€¢ If frame is not received within specified time, the sender will retransmit it. ā€¢ Suitable for communication over unreliable channels, such as wireless systems
  • 34. Acknowledged nection oriented service 3 4 ā€¢ The source and the destination establish a connection before data transfer. ā€¢ Each frame sent is numbered ā€¢ The data link layer guarantees that each frame sent is indeed received. ā€¢ It also guarantees that each frame is received exactly once and all frames are received in the right order. ā€¢ Connection-oriented service provides the network layer with the equivalent of a reliable bit stream.
  • 35. 3 5 . nn Acknowledged co ection oriented service ā€¢ The data transfer takes place by following three phases: ā€¢ Connection establishment ā€¢ One or more frames actually transmitted ā€¢ Connection is released.
  • 36. Example of WAN subnet consisting of routers connected by point-to-point leased lines 3 6 ā€¢ Fig. placement of the data link protocol Router Data link layer process Frames Packets process Transmission line to a router Data link
  • 37. .... 3 7 Framing .. ā€¢ The data link uses the services provided by the physical layer. ā€¢ The physical layer will not be perfect. It is up to the data link layer to detect, and if necessary, correct errors. ā€¢ The usual approach is for the data link layer to break the bit stream up into discrete frames and compute the checksum for each frame. ā€¢ When a frame arrives at the destination, the checksum is recomputed. ā€¢ If the newly computed checksum is different from the one contained in the frame, the data link layer knows that an error has occurred and takes steps to deal with it.
  • 38. Framing 3 8 ā€¢ Breaking the bit stream into frames is called framing. One way is to insert time gaps between frames. ā€¢ But practically this technique does not work satisfactorily, because networks generally do not make any guarantees about timing. ā€¢ So following methods are used: 1. Character count. 2. Starting and ending characters, with character stuffing. 3. Starting and ending flags, with bit stuffing. 4. Physical layer coding violations.
  • 39. 3 9 .... jj:Ā° Character count ā€¢ In this method, a field in the header is used to specify the number of characters in the frame. ā€¢ This number helps the receiver to know the number of characters in the frame following this count. ā€¢ Disadvantage: ā€¢ An error can change the character count ā€¢ If the wrong character count is received then the receiver will get out of synchronization and will be unable to locate the stai1of next frame. ā€¢ This method is rarely used in practice.
  • 40. 5 1 2 3 4 7 6 7 8 9 8 0 1 2 3 4 5 6 8 7 8 9 0 1 2 3 4 0 5 1 2 3 4 5 6 7 8 9 8 0 1 2 3 4 5 6 8 7 8 9 0 1 2 3 Character count Character count One character (a) Frame 1 5 characters Frame 2 5 characters Error Frame 3 8characters Frame 4 8 characters Without error (b) Frame 1 Frame 2 (Wrong) Now a character count With one error
  • 41. Starting and ending character with character stuffing 4 1 ā€¢ Here starting character is used before the start of each frame and an end character is used at the end of each frame. ā€¢ Flag byte FLAG. is used as starting and ending delimiter ā€¢ Two consecutive flag bytes indicate the end of one frame and start of the next one. ā€¢ Problem in case of programs or floating point numbers. ā€¢ Solution is to use escape sequence (ESC) before flag. ā€¢ The data link layer at the receiving side removes the ESC byte before sending to the network layer + Known as byte or character stuffing
  • 42. Starting and ending character 4 2 with character stuffing h ā€ž,c e FLAG Heade r Original characters FLAG ESC ESC FLAG ESC ESC Payload field (a) (b) After stuffing ESC FLAG ESC ESC Trailer FLAG ESC ESC ESC FLAG ESC ESC ESC ESC
  • 43. Disadvantages of character stuffing 4 3 ā€¢ A major disadvantage of using this framing method is that it is closely tied to 8-bit characters in general and the ASCII character code in particular. ā€¢ We need a technique to allow arbitrary sized characters.
  • 44. ā€¢ This technique allows the frames to contain arbi rary number of bits and codes. ā€¢ At the beginning and end of each frame , a specific bit pattern 01111110 called flag byte is transmitted. ā€¢ Since there are six consecutive 1s in this byte, a technique called bit stuffing is used. ā€¢ Whenever the sender data link layer detects the presence of 5 consecutive 1s in the data, it automatically stuffs a 0 bit in the outgoing bit stream. ā€¢ De-stuffing is done at the receiving end. 21
  • 45. Bit stuffing 4 5 (a) Original data (b) the data as they appear on the line (c) the data as they are stored in the receivers memory after de-stuffing Flags (01111110) at the beginning and e 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 (b) 0 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 0 0 1 0 Stuffed bits (c) 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 Bit-oriented framing with bit stullii g
  • 46. 4 6 Physical layer coding violations ))): Ā°Tā€™ā€™ā€ ā€¢ This method of framing is only applicable o networks in which the encoding on the physical medium contains some redundancy. ā€¢ For example, some LANs encode 1 bit of data by using 2 physical bits. ā€¢ Normally, a 1 bit is a high-low pair and a 0 bit is a low-high pair. ā€¢ The combinations high-high and low-low are not used for data and they can be used as frame boundaries.
  • 47. .... Error control jt:ā€ 4 7 The usual way to ensure reliable delivery is to provide the sender with some feedback about what is happening at the other end of the line. Data Frame Sender Acknowledgement(ACK) Or negative Acknowledgement (NAK) Receiver
  • 48. 4 8 .... Error control jt:ā€ An additional complication comes from the possibility that hardware troubles may cause a frame to vanish completely. In this case, the receiver will not react at all. This possibility is dealt with by introducing timers into the data link layer.
  • 49. .... 4 9 Error control Sender retransmit if time-out error code ACK if correct | paCket physical layer ack error code physical layer Receiver
  • 50. 5 0 .... jt:ā€ Error control ā€¢ However, when frames may be transmitte multiple times there is a danger that the receiver will accept the same frame two or more times, and pass it to the network layer more than once. x To prevent this from happening, it is generally necessary to assign sequence numbers to outgoing frames, so that the receiver can distinguish retransmissions from originals.
  • 51. 5 1 .... Flow control jt:ā€ ā€¢ What to do with a sender that systematical y wants to transmit frames faster than the receiver can accept them? ā€¢ The usual solution is to introduce flow control to throttle the sender into sending no faster than the receiver can handle the traffic. ā€¢ This throttling generally requires some kind ol a feedback mechanism, so the sender can be made aware of whether or not the receiver is able to keep up.
  • 52. 5 2 .. y. :ā€ . Flow control ā€¢ Various flow control schemes are there, b I most of them use the same basic principle. ā€¢ The protocol contains well-defined rules about when a sender may transmit the next frame. x These rules often prohibit frames from being sent until the receiver has granted permission, either implicitly or explicitly. ā€¢ Two techniques are there: ā€¢ Stop and wait flow control ā€¢ Sliding window flow control
  • 53.
  • 54. detection and correction ā€¢ Error correcting codes ā€¢ Error detecting codes .. .) :: , ^ T " ā€™ 31
  • 55. 32 Error detection and . . . ):: , correction ^ T " ā€™ ā€¢ Transmission errors are going to be a fact of life for many years to come. (in local loop, in wireless communications) ā€¢ As a result of the physical processes that generate them, errors on some media (e.g., radio) tend to come in bursts rather than singly. ā€¢ Disadvantage: They are much harder to detect and correct than isolated errors.
  • 56. Error detection and correction Advantage: : *"ā€™ error model: bursty errors every packet would be in error bursty error, only one packet is incorrect
  • 57. 34 ā€¹Ā» . ā€ž. ... Types of error ā€¢ Single bit error: only one bit gets corrupt d. Common in parallel transmission. Ā» Multiple bit errors: more than one bits get corrupted ā€¢ Bursf error: more than one bit gets corrupted at the same place or at once. Very common in serial transmission of data. Occurs when the duration of noise is greater than the duration of one bit.
  • 58. ā€¢ Single bit error: Sent ā€¢ Multiple bit error: Sent Two errors Received Received
  • 59. ā€¢ Burst error: Sent Burst error Received 5 9
  • 60. . Error detection tech ues 6 0 ā€¢ Use of redundancy: additional bits are addedto facilitate detection and correction of errors. ā€¢ x Popular techniques: ā€¢ Simple parity check ā€¢ Two-dimensional parity check ā€¢ Checksum ā€¢ Cyclic redundancy check
  • 61. 6 1 .... *'ā€ Simple parity check ā€¢ The simplest and most popular error detection technique ā€¢ Appends a parity bit to the end of the data Ā« Even parity: means the number of 1ā€™s in the given word including parity bit should be even (2,4,6...) ā€¢ Odd Rarity: means the number of 1ā€™s in the given word including parity bit should be odd (1,3,5...)
  • 62.
  • 63.
  • 64.
  • 65. 6 5 ā€¹Ā» . . Performance of simple parity ))ā€¢ā€¹ check ā€™ ā€ ā€¢ Simple parity check can detect all single bit errors. ā€¢ It can also detect burst errors if the number of bits in error is odd. ā€¢ The technique is not foolproof against burst errors that inverts more than one bits. If an even number of bits are inverted due to error, the error is not detected. ā€¢ It cannot correct errors.
  • 66. 6 6 . . . ā€¢ ā€¹ā€¢ Ā» ā€¢Ā° Two dimensional parity check tt'ā€ ā€¢ Performance can be improved by using two dimensional parity check, which organizes the block of bits in the form of a table ā€¢ Parity check bits are calculated for each row which is equivalent to a simple parity check bit ā€¢ Parity check bits are also calculated for all columns ā€¢ Both are sent along with the data ā€¢ At the receiving end these are compared with the parity bits calculated on the receiving data
  • 68. LRC and VRC ā€¢ Two sets of parity bits are generated known as: ā€¢ Longitudinal redundancy check (LRC) ā€¢ Vertical redundancy check (VRC)
  • 69. Vertical Redundancy Check (VRC) ā€¢ Vertical Redundancy Check is also known as Parity Check. In this method, a redundant bit also called parity bit is added to each data unit. This method includes even parity and odd parity. Even parity means the total number of 1s in data is to be even and odd parity means the total number of 1s in data is to be odd. ā€¢ Example ā€“ If the source wants to transmit data unit 1100111 using even parity to the destination. The source will have to pass through Even Parity Generator.
  • 71. LRC (Longitudinal redundancy check) ā€¢ In this error detection method, a block of bits are organized in a table (of rows and columns). ā€¢ For example, instead of sending block of 32 bits, first it is organized into four rows and eight columns. ā€¢ Then parity bits for each column is calculated and new row of eight parity bits is formed. ā€¢ These eight parity bits are appended to original data before transmission
  • 72.
  • 73. 7 3 .... *'ā€ Performance ā€¢ Extra overhead is traded for better error detection capability x Two-dimensional parity check significantly improves error detection capability compared to simple parity check ā€¢ It can detect many burst errors but not all ā€¢ It cannot correct the errors
  • 74. Checksum 7 4 ā€¢ At the senders end: ā€¢ The data is divided into k segments each of m bits. ā€¢ The segments are added using one's complement arithmetic to get the sum ā€¢ The sum is complemented to get the checksum ā€¢ The checksum segment is sent along with the data segments
  • 75. ā€¢ At the receiver's end: x All received segments are added using one's complement arithmetic to get the sum ā€¢ The sum is complemented ā€¢ If the result is zero the received data is accepted otherwise discarded 7 5 , 10110011 10101011 10 Q1111
  • 76.
  • 77.
  • 78. ā€¢ The checksum detects all errors involving an odd number of bits x It also detects most errors involving even number of bits 7 8
  • 79. Cyclic redundancy check 7 9 ā€¢ One of the most powerful and commonly used detecting codes ā€¢ Basic approach: ā€¢ Given a m-bit block of bit sequence, the sender generates an n-bit sequence known as frame check sequence (FCS), so that the resulting frame, consisting of m+n bits, is exactly divisible by some predetermined number ā€¢ The receiver divides the incoming frame by that number and, if there is no remainder, assumes there was no error
  • 82. Modulo-2 arithmet 8 2 1 1 1 1 0 1 0 0 1 0 0 0 0 1 1 0 1 Binary Division I 1 0 1 0 1 1 0 1 1 1 1 0 1 1 0 1 0 1 1 0 0 0 0 0 1 1 0 0 1 1 0 l Remainder
  • 83. 10.83 Figure 10.15 Division in CRC encoder
  • 84. 10.84 Figure 10.16 Division in the CRC decoder for two cases
  • 85. 8 5 Polynomials ā€¹Ā». jt: ā€¢ AII the variables can be expressed as polynomials Ć“f a dummy variable X. ā€¢ P= 11001 => X^4 +X^3+ X^1 ā€¢ CRC process can be expressed as X^nM(X)/P(X) = Q(X) + R(X) / P(X) ā€¢ Commonly used divisor polynomials are: ā€¢ CRC-12= X^12 + X^11 + Xā€™3 + Xā€˜2 + X + 1 ā€¢ CRC-16= X^16 + X^15 + Xā€™2 + 1 ā€¢ CRC-CCITT X^16 + X^12 + X^5 + 1 ā€¢ CRCā€”32 = X^32 + X^26 + X^23 + X^22 + X^16 + X^12 + X^11 + X^10 + X^8 + X^7 + X^5 + X^4 + X^2 + X + 1
  • 86. ā€¢ Can detect all single bit errors ā€¢ Can detect all double bit errors (three 1ā€™s) ā€¢ Can detect any odd number of errors (X+1) ā€¢ Can detect all burst errors of less than the degree of the polynomial ā€¢ Detects most of the larger burst errors with a high probability x For example CRC-12 detects 99.97% of errors with a length 12 or more
  • 87. . ā€¹. Ā» .ā€¹ . 8 7 ....:, *ā€ Error correction ā€¢ Backward error correction: ā€¢ When an error is detected in a frame, the sender is asked to retransmit the data/frame. This approach is known as Automatic Repeat Request (ARQ) technique. Ā« Forward error correction: ā€¢ Use more redundancy in the transmitted data to not only detect but correct error in the received data.
  • 88. Error correcting codes 8 8 Codeword: an n-bit unit containing data and check ts is called as n-bit codeword m data bits n=m+r There are 2" possible codewords and 2f " possible data messages. Hamming distance between codewords: min d(C ,C2)=number of (same bit position) bits which differ d(10010010,00010001)ā€”3 If two codewords are a hamming distance d apart, it will require d single-bit errors to convert one into the other. r check bits
  • 89. ā€¢ Hamming distance: the number of differences in the corresponding bits x The minimum Hamming distance is the smallest Hamming distance between all possible pairs in a set of words 8 9
  • 90. . ā€¹. Ā» .ā€¹ . 9 0 ....:, *ā€ Error correction Ā« Reouirement for error detection.ā€¢ A code is an error detecting code if and only if minimum distance between any two code words is two Ā« Re uirement for error correction: For a code to be error correcting the minimum distance between any two code words must be more than two ā€¢ Number of additional bits should be such that it can point to the position of the bit in error. If k is the number of additional bits, the condition is 2^k> m+ k+1
  • 91. HAMMING code ā€¢ Basic Approach ā€¢ To each group of m information k parity bits are added to form m+k bit code ā€¢ Location of each of the m+k digits is assigned a decimal value ā€¢ The k parity bits are placed in 1,2 ...2^k-1 positions. ā€¢ K parity checks are performed on selected digits of each codeword ā€¢ At the receiving end the parity bits are recalculated. The decimal value of the k parity bits provides the bit position in error, if any. 9 1
  • 92. 9 2 . zz Hamming Code j j jā€¢ 11 10 9 8 7 6 5 4 3 2 l Redundancy bits
  • 93. Hamming Code j;;; 1011 1001 0111 0101 001 1 0001 11 V 7 S 3 1 ^2 will take care of these bits 10111010 11 10 01110110 7 6 0011 0010 3 2
  • 94. it if il r if it it rJ it r r j Hamming Code 9 4 j j j; 0111011& 101 0100 7 6 5 4 rg will take care of these bits 101 l l0l0l00l 1000 11 10 9 8
  • 95. Daa Adding 'Ā» Adding Adding r4 Adding ā€¹8 9 5 Example of Hamming Code Ā”Ā”Ā”Ā”, Code: 1 0 0 1 1 1 0 0 1 0 1
  • 96. i o|o i i i o o i o i i o o i o i o o i o i Si.ngle-bi.t error ā€¢ā€¢ Ā°ā€¢ Sent Received Error
  • 97. 1 1 1 0 1 0 1 0 II 1 1 1 1 I 64 I I I 11 10 9 8 7 6 5 4 3 2 I I I I I lt) 9 S 7 6 5 4 3 2 I 1 0 II 1 0 1 il 1 1 1 0 1 I I I I I I 1. .. 9 8 7 6 5 4 3 2 1 1 ā€¹ā€ŗ ā€¹ā€ŗ i o i o o i ā€¹i i Error Detection 11 10 9 8 7 6 5 4 3 2 l The bit in position 7 is in error.
  • 98.
  • 99. Elementary data Iink 9 9 : *"ā€™ protocols ā€¢ An unrestricted simplex protocol ā€¢ A simplex stop and wait protocol ā€¢ A simplex protocol for noisy channel ā€¢ Piggybacking
  • 100.
  • 101. 1 0 1 . . ā€¹Ā» An Unrestricted Simplex ))ā€¢ā€¹ protocol ā€¢ This is the simplest possible protocol ā€¢ Has no flow control and no error control ā€¢ Unidirectional protocol in which frames travel from sender to receiver ā€¢ Assumption is noiseless channel ā€¢ It is assumed that the network layer of the sender and the receiver are always ready. ā€¢ It is also assumed that the processing time can be ignored and infinite buffer space is available ā€¢ This protocol is also known as ā€œutopiaā€
  • 102. An Unrestri ā€¢cted Sā€¢ implex protocol 1 0 2 ā€¹ tt Ā» :ā€¢ . Ā° ā€¢ This protocol consists of two distinct procedures namely a sender and a receiver. ā€¢ The sender runs in the data link layer of the sender machine and receiver runs in the data link layer of the receiver machine ā€¢ The sender site cannot send a frame until its network layer has a data packet to send. ā€¢ No sequence numbers and no acknowledgments are used. ā€¢ Both procedures are constantly running because they don't know when the corresponding events will occur
  • 103.
  • 104.
  • 105. Physical Send frame Request from. Renat forever Data frames Data link Recri {tqyg Physical Repeat forever TOO
  • 106. Sender site algorithm for the simplex protocol // Repeat f0rever ltaitForEvĀ»ntII; it(Irent|nepestP0SenĆ©)I // Sleep vltil aE erent occur //rlere is i paclet t0 aezd
  • 107. Receiver site algorithm for the simplex protocol // lepeat forever #d1II0Ā£$Y en1tJĀ” // /lee9 vntil an erat 0 C C c r //&Iixec datatoaĀ«tvoct laye
  • 108. . ā€¹Ā» Flow iagram protocol for simplex ))ā€¢ā€¢ā€ Roquā€¹;| Sender Time Arrival Arriral 72
  • 109. . . ā€¹Ā» A simplex Stop and Wait protocol )))ā€¢Ā° ā€™ ā€ ā€¢ Assumption is noiseless channel and communication is unidirectional ā€¢ Flow control is added to previous protocol ā€¢ In this protocol, a small dummy frame is sent back from the receiver to the transmitter to indicate that it can send the next frame. ā€¢ Here the sender sends one frame, stops until it receives confirmation from the receiver and then sends the next frame. ā€¢ Hence the name stop and wait. 73
  • 110. Design of stOp and wait Protocol duta tā€rainc data link
  • 111.
  • 112.
  • 113. lO 11 //Repeat zorev //Allow the first frame to go hile(true) aosend = t cue WaitForEvent( j / Sleep until an event occur if(Brent(RequestToSend) AND cansezd) 77 send the data 5zawe /lean:not aend unt11 ACs arrive WaitForEvent(); // Sleep until aE event occura iI(Evest(ArrivalWotification) /f An ASK bas arrived Sender site algorithm for the Stop and wait protoCol
  • 114. Receiver site algorithm for the Stop and wait protoCol //Repeat forever faitf0r9vect I) i // Sleep utit ac evect occur( if lavent l7irri*alNotificationl} //Onta frase drrires Recetve7ā€¹ae() ; Deliver(data), fecdPrael); //BJJverdatatonetwDr2faye,
  • 115. Sender AT WT WT Time Stop and Wait WT = Data ACK Data ACK Data ACK Receiver ' Time
  • 116. Sā€¢ implex Protocol for Noā€¢ isy ā€¹ ) Ā» ā€¢ .ā€¢ā€ŗ Channel Assumption ā€¢ Frames may be damaged or lost completely ā€¢ In this protocol, the sender waits for positive acknowledgement before advancing to the next data item ā€¢ So it is called as PAR (positive acknowledgement with retransmission) or Automatic Repeat Request (ARQ) ā€¢ Due to retransmission there is always a possibility of duplication of frames at the receiver. ā€¢ To avoid this, sender puts a sequence number in the header of each frame it sends. ā€¢ The operation can be divided into two modes: ā€¢1. Normal operatione 2.Time out 78
  • 117. ASiITIp[ix ProtocOl fOr NoiSy Channei t;tt Get date Receive tend frame frame :Repe.it forever ā€¢ā€¢ā€¢ ' 0 ā€¢ā€¢ā€¢ ackN o Receis'er Del iver data Receive Sentl frame tiame. Repeat forex-cr Physical
  • 119. ā€¢ In all practical situations, the transmission of data needs to be bi-directional (full duplex) ā€¢ One way of achieving full duplex transmission is to have separate channels for forward and reverse data transfer ā€¢ But this will waste the bandwidth of reverse channel almost entirely ā€¢ A better solution would be to use each channel (forward and reverse) to transmit frames both ways, with both channels having the same capacity 1 1 9
  • 120. ā€ž. ā€¢ Let A and B be the users. ā€¢ When a frame is carrying data from A to B, it can also carry control information about arrived or lost frames from B; and vice-versa. ā€¢ This technique where outgoing acknowledgement is delayed temporarily is called as piggybacking. ā€¢ Advantage: better use of available bandwidth ā€¢ Disadvantage: additional complexity ā€¢ If data link layer waits too long before transmitting acknowledgement, then retransmission of frame would take place 1 2 0
  • 121. Back-N ARO Design of Piggybacking Scud N et wOrk l9elis'er 'ei Re ei vc fā€ra tend fĀ°rame Receive ackNn xegMo Send deliver Gct Nelw nrk ā€™ ā€™ . - -.ā€™.ā€™.ā€™ā€ā€™ā€™ ā€™ ā€™ ā€™ ' : : ā€™ : : ā€™ ā€™ ā€™ ā€ -: Receive SenU fcamo frame Data link Php sical
  • 122.
  • 123. Sliding Window ā€¢ Sliding window is an abstract concept that define the range of sequence numbers that is the conc of the sender and receiver ā€¢ The sender maintains a set of sequence numbers corresponding to frames it is permitted to send. ā€¢ These frames are said to fall within the sending window. ā€¢ Similarly, the receiver also maintains a receiving window corresponding to the set of frames it is permitted to accept. ā€¢ The sender's window and the receiver's window need not have the same lower and upper limits, or even have the same size.
  • 124. Sliding Window ā€¢ In some protocols they are fixed in size, but in others they can grow or shrink as frames are sent and received. ā€¢ The sequence numbers within the sender's window represent frames sent but as yet not acknowledged. ā€¢ Whenever a new packet arrives from the network layer, it is given the next higher sequence number, and the upper edge of the window is advanced by one. ā€¢ When an acknowledgement comes in, the lower edge is advanced by one. In this way the window continuously maintains a list of unacknowledged frames.
  • 125. Sliding window ā€¢ Since frames currently within the sender's wind may ultimately be lost or damaged in transmit, t sender must keep all these frames in its memory for possible retransmission. ā€¢ Thus if the maximum window size is n, the senders need n buffers to hold the unacknowledged frames. ā€¢ If the window ever grows to its maximum size, the sending data link layer must forcibly shut off the network layer until another buffer becomes free. ā€¢ The receiving data link layer's window corresponds to the frames it may accept. Any frame falling outside the window is discarded without comment.
  • 126. Slidiā€¢ng wi ā€¢ndow ā€¹ )Ā» ā€¢ā€¢ā€¹ ā€ŗ ā€¢ When a frame whose sequence number i equal to the lower edge o the window is received, it is passed to the network layer, an acknowledgement is generated, and the window is rotated by one ā€¢ xFig. sliding window ā€¢Window ā€¢6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5
  • 127. r $ e n Sender window ā€”> Direction Direction This wall moves to the ht frame by frame, frame is sent. This wall moves to the right, the size of several frames at a time, when an ACK is received. Sender sliding window Recelver wlndow
  • 128. Receiver slid window Recelver wlndow Direction Direction This wall moves to the rlght, frame byĀ°f ame, when a frame is received. This wall moves to the right, the slze of several frames at a time, when an ACK 1s sent.
  • 129. Sliding window example ata 2 ata ReCeiVeF ā€˜ā€˜ā€˜ā€˜ā€˜ā€˜ā€˜ā€˜ā€˜ā€˜ā€˜ā€˜ā€˜
  • 130. ā€¢ A One-bit sliding window protocol (Stop and Wait ARQ) x A protocol using Go Back N (Go-Back-N ARQ) ā€¢ A protocol using Selective Repeat (Selective Repeat Request)
  • 131. . . . . ā€¢ ā€¢ ā€¢ One bit slidi window )))ā€¢Ā° protocol (Stop and Wait ARQ) *ā€ ā€™ ā€ ā€¢ One bit protocol because the maximum window size is n=1. ā€¢ Operation is based on ARQ ā€¢ Transmitter sends one frame of data and waits for an acknowledgement from the receiver ā€¢ If it receives a positive acknowledgement (ACK) it transmits the next frame. ā€¢ If it receives a negative acknowledgement (NACK) it retransmits the same frame.
  • 132. ))ā€¢ā€¹ retransmission ā€¢. ā€¢ The transmitter stores the copy of last frame transmitted until it receives an acknowledgement for those frames. ā€¢ Data frame is numbered 0 and ACK frame as 1 ā€¢ If an error occurs while transmission, receiver sends a NAK back for retransmission of the corrupted frame. ā€¢ A timer is there for lost ACK and NACK frames
  • 133. ā€¹Ā» When is retransmission required??? ā€¢ If the received frame is damaged )))ā€¢ Ā° ā€™ ā€ ā€¢ If the transmitted frame is lost ā€¢ If the acknowledgement from the receiver is lost
  • 135.
  • 137. ā€¢ Advantages: ā€¢ Simplicity ā€¢ Requires minimum buffer size ā€¢ Disadvantages: ā€¢ Very inefficient. At any time only one frame is in transition x The sender will have to wait at least one round trip time before sending next frame
  • 138. ā€¹Ā»ā€¹ ā€¹ā€ŗā€¹. Go-Back-N Protocol (Go-Back-NAR ):' ā€¢ Based on sliding window protocol ā€¢ Most commonly used ā€¢ A sending station may send a series of frames sequentially up to a maximum number ā€¢ The number of unacknowledged frames is determined by window size, using the sliding window flow control technique ā€¢ In case of no error, the destination will acknowledge incoming frames as usual
  • 139. ā€¢ If the destination detects error in a frame, or it receives a frame out of order, it sends a NAK for that frame ā€¢ The destination will discard the frame in error and all frames succeeding that frame in error ā€¢ The source station on receiving the NAK, must retransmit the frame in error plus all succeeding frames.
  • 141. Lost frame Sender Data O Data I Data 2 Data Data Receiver Data O Data I NAK 2 Discarded DƏxcarded
  • 143. ā€¢ It transmits all the frames if one frame is damaged or lost x It transmits frames continuously as long as it does not receive the ACK or NACK signals ā€¢ Error can be introduced if NAK is lost
  • 144. ā€¹Ā» . .... Selective Repeat ARQ ā€¢ In this method only the damaged or lost frame is retransmitted. ā€¢ The receiver can do the sorting of data frames and is also able to store frames t::. received after a NAK has been sent until the damaged frame has been replaced ā€¢ The transmitter must contain a searching mechanism that allows it to find and select only the requested frame for retransmission
  • 146. ā€¹Ā» . .... Selective Repeat ARQ ā€¢ Transmitter does not wait for the ACK signal for transmitting the next code. t::. ā€¢ It transmits the code continuously till it receives the NAK signal from the receiver. ā€¢ On reception of the NAK signal, the transmitter will retransmit only that frame 2 and continue with the sequence 6, 7 ā€¢ The frames 6,7 received by the receiver are not discarded by the receiver. ā€¢ The receiver receives the retransmitted frames in between the regular frames. ā€¢ Therefore receiver will have to maintain the frames sequentially.
  • 147. Exa I data I rotocol
  • 148. ā€¹Ā»ā€¹ . ā€¹.ā€ŗ ..ā€¹ :, . . ee: Example data Iink protocols ā€¢ HDLC ā€¢ SDLC ā€¢ PPP protocol ā€¢ LAP protocol ā€¢.
  • 149. Ā» level data link )))ā€¢Ā° DLC Hig control ā€¢ Bit oriented protocol for communication over point to point and point to multipoint links. x It implements ARQ mechanisms ā€¢ HDLC provides two common transfer mode: ā€¢ Normal response mode (NRM) Ā» Asynchronous balanced mode (ABM)
  • 150. ā€¹Ā» . i::Ā° Normal response mode (NRM) :ā€¢ ā€¢ The station configuration is unbalanced ā€¢ One primary station and multiple secondary stations ā€¢ Aprimary station can send commands; a secondary station can only respond
  • 152. . ā€¹. Ā» .. . ....:, Asynchronous Balanced Mode ā€¢ In this the configuration is balanced ā€¢ Link is balanced and each station can function as a primary and a secondary Balanced Combined omnian iā€¢esponse Combined iā€¢esponse
  • 153. + .... .. , ... ā€¢.. ā€žā€ŗ . DLC Frames Ā» Information frames (I-frames): transport user data and control information ā€ ā€¢ Supervisory frames (S-frames): transport control information Ā« Unnumbered frames (U-frames): used for system management
  • 155. Field s use """?Fentify beginning and end of frame ā€¢ field: 8-bit sequence with bit pattern 011111 ā€¢ Address field: contains address of secondary station. I primary station created the frame contains to if secondary created the frame, it contains from address. Address field can be 1 byte or several bytes long. 1 byte identifies 128 stations (1bit used for some purpose) ā€¢ Control field: 1 or 2 byte segment used for error control and flow control Ā« Information field: contains user data or management information. Length varies for different networks Ā« FCS field: HDLC error correction field. It can contain 2 or 4 byte ITU-T CRC.
  • 156. ā€¹Ā» . , ... ā€¢. ,. DLC address field ā€ Flag Adā€¹lress Control Information FCS Flag The address is one byte or a multiple of bytes. One-byte address Multi-byte address
  • 157. 0 ā€¢ Determines the type of frame and defines it functionality Flag Address Information FCS Flag I-Frā€¹ime NtS) N(Rā€ŗ P/F Poll/final bit N(S) Sequence number of frame sent N(R) Sequence number of next frame expected Code Code for supervisory or unnumbered frame S-fā€œrā€¹ime U- Fi ante Code N( R) Code Code
  • 158. ā€¹Ā» . .... Control field for I-frames ā€¢ First bit 0 denotes that it is I-frame ::ā€¢. ā€™ ā€ ā€¢ 3 bits of N(S) denotes that it is sequence number. 0 to 7 sequence numbers possible ā€¢ Last 3 bits of N(R) denote acknowledgement number ā€¢ P/F bit called poll-final bit ā€¢ Poll- means frame sent from primary to secondary ā€¢ Final ā€”means frame is sent from secondary to primary
  • 160. 1 6 0 . ā€¹. Ā» .. . ,.ā€¢, Control field for S-frames ā€ ā€¢ Used for error and flow control when piggybacking is impossible or inappropriate ā€¢ 10 bit indicates it is S-frame ā€¢ PF is poll-final bit ā€¢ N(R) denotes ACK no or NAK depending on type of frame. ā€¢ 2 code bits define the type of S-frames:
  • 161. ā€¹Ā». field for S-frames tā€¢ ā€¢ Receive Ready (RR) : if code field is 00, it is S ā€” frame. Denotes safe receipt of frame by receiver. Here N(R) denotes ACK ā€¢ Receive Not ready (RNR): if code is 10 it is RNR. It means frame is received safely but the receiver is busy. Here N(R) is ACK no. ā€¢ Reiect (REV): if code field is 01, it is REJ Sā€”frame. It is NAK frame used in Go-Back-N ARQ. N(R) is NAK ā€¢ Selective reiect (SREd): if code field is 11, it is SREJ S-frame. It is NAK frame used in selective repeat ARQ. N(R) here is NAK
  • 162. ā€¹Ā» ā€¢ .... field for U-frames ā€¢ U-frames used to exchange session ement and control information between connected devices ā€¢ U-frame codes are divided into 2 sections: ttā€¢ ā€¢ 2-bit prefix before PF bit and 3-bit suffix after PF. ā€¢ These 5 bits together can be used to create up to 32 different types of U-frames
  • 163. U-frame control field ā‚¬ā‚¬i II 011 11 010 11 1 @ II 110 @ 110 & 010 II 1 0 1 10 @1 Coiā€ŗii/iz/id Set normal response mode SNRM extended Disconnect mode Unnumbered information Request disconnect Set initialization mode/ Request information mode 1IIIā€ qā€ŗ ! 1: IIIā€ŗ ){)t] Unnumbered poll Frame reject
  • 164. SDLC Synchronous Data li ā€¢nk control protocol ā€¹ )Ā» ā€¢ā€¢ā€¢ . ā€™ ā€ ā€¢ Used by IBM ā€¢ Not a standard but is widely used ā€¢ Asubset of HDLC ā€¢ There are primary and secondary stations defined for HDLC KGF16 aa OT11410
  • 165. . layer . the in sLIPa n dP P P ā€¹Ā» The data link ))ā€¢ā€¹ . i n t e r n e t t. : ā€œ PC User's home Client process using TCP/IP Internet provider's office Modems Dial-up telephone line Modem TCP/IP connection using SLIP or PPP Router process
  • 166. The 1 6 6 ā€¢ Used to connect the home computers to the server of an ISP ā€¢ Most of the users have a traditional modem and they are connected to the Internet through a telephone line or cable TV ā€¢ PPP is used for controlling and managing the data transfer ā€¢ Can operate over a full duplex point-to-point transmission link, asynchronous links, bit synchronous links or ADSL and SONET ā€¢ Character-oriented protocol
  • 167. 1 6 7 ā€¹Ā». Services provided by PPP tt: ā€¢ Defines the format of the frames ā€¢ It defines how the link between two devices is to be established and how the data exchange should take place. Uses LCP (link control protocol) ā€¢ Decides the encapsulation of network layer into the data link frame. Uses NCP (network control protocol) ā€¢ It defines the way in which the two devices can authenticate each other
  • 168. ā€¹Ā» 1 6 8 Frame format of PPP . i. !:ā€¢ā€ ā€ž. Ā» Fla . the PPP always begin and end with flag ā€¢ Address: broadcast address. All 1s in the frame indicate all stations can accept the frame ā€¢ Control: denotes unnumbered frame, indicates no flow control and error control Bytes 1 Flag Address 01111110 111111 11 1 or2 Variable 2or 4 Conol 0000001i Protocol Paytload Checksum 1 Flag 01111110
  • 169. Ā» Protocol: tells the type of packet contain d in payload. E.g. LCP, NCP, IP, OSI CLNP, XNS 1 6 9 Ā» Payload field: variable length, up to negotiated maximum. Default 1500 bytes. Padding may follow payload field Ā« Checksum: normally 2 bytes, but 4 bytes can be used. Can use CCITT 16 or 32 generator polynomial
  • 170. ā€¹Ā» 1 7 0 .... Making a communication t::. 1. PC calls the provider's router by a mode 2. Use LCP packets to select PPP parameters 3. Use NCP to receive an IP address 4. Send and receive IP packets 5. Use NCP to tear down the network layer connection and free up the IP address 6. Use LCP to shutdown the data link connection 7. The computer tells the modem to hang up
  • 171. Transition states of ā€¹ Asimple phase diagram for bringing line and down Carter Failod Failed aueeā€¢scarĀ»ā€¢ NCP
  • 172. 1 7 2 ā€¹Ā» . Transition states of PPP : Ā«::: .'ā€œ ā€¢ Dead: link is not used. No active carrier and line is quiet ā€¢ Establish: when communication starts. User sends configure request packet to negotiate options. If successful goes into authenticating state. LCP packets used Ā« Authentication: user sends the authenticate request packet Ā« Network: NCP protocol is invoked to configure the network layer Ā« Ooen: exchange of user data and control packets ā€¢ Terminate: user sends terminate packet to terminate the link
  • 173. 1 7 3 ā€¹Ā». Link control protocol tt: ā€¢ LCP responsibilities: ā€¢ To establish links ā€¢ To maintain established links ā€¢ To configure the links ā€¢ Termination of the links ā€¢ It also provides negotiation mechanisms. ā€¢ When PPP is carrying LCP packet it is in the link establishina state or in link terminating state and user data is not carried in these states ā€¢ All LCP packets are carried in the payload field of the PPP frame with protocol field set to C021 in hexadecimal
  • 174. ..e 1 7 4 LCP packet encapsulƤted n Ć£ )) frame oo 1 1 I nłrtirrtƬoi:
  • 175. ā€¹Ā». 1 7 5 . ... .. .:. , Types of LCP packets ackets: first 4 used for link configuration during establish phase Ā« Link terminatin ackets: 5 and 6 used for link termination during termination phase ackets: last five used for link monitoring and debugging
  • 176. ā€œ ā€ .t ā€ cut.Ty.pā€™ ā€ tā€˜ Detcnā€™ptjOn . .- ; 0x0l . Configure-request Contains thelist of proposed options andtheir vnlues Configure-ack Accepts all options proposed 0s02 0x03 Configure-nak Announces thatsomeoptions arenot acceptable '0x04 Configure-reject Announces thatsoineoptions arenotrecognized 0 05 Terminate-request Request toshut dOWntheline 0x06 Terminal-ack Accept theshutdownrequest 0x07 Code-reject Announces anunknown code 0xO8 Protocolā€”reject Announces anunknown protocol 0x09 Ecb0-fequest A typeof hellomessage tocheck if theotherendisalive 0x0A Echoā€”reply Theresponse totheecho-request message 0x0B Discard-request A request todiscardlttepacket LCP packets 1 7 6
  • 177. 0pi!ā€™vn .Default Maximum receive unit (payload field size) 15 0 Authentication protocol None Protocol field compression Ofl Address and control field compression Off Common options ā€¢ Many options that can be negotiated betw en two endpoints ā€¢ Options are inserted in the information field ā€¢ Information 1ield is divided into option type, option length and option data
  • 178. ā€¹Ā» . Authentication protocols tt'ā€ ā€¢ PPP needs authentication because it is u ed for dial-up links. ā€¢ Authentication is to validate the identity of a user who needs to access the set of resources. ā€¢ Two protocols created by PPP for authentication are: Ā» Password authentication Rā€¢O^OcOI (PAP) ā€¢ Challenge handshake protocol (CHAP) ā€¢ These are used during authentication and no user data is exchanged 140
  • 179. Payload (and padding) Flag PAP ā€ŗ PAP packetsencapsulated in a PPP tram client Accnā€¢ granted ! g{8d Authentic ate-request Authonticatc-ack Authenticate-nak Code: 3 Length Mcssag llmzname Code: I Length UNIT name Password length Varsablc PAP packet.s
  • 180. CHAP ā€¢ CHAP packets encapsulated in a PPP fra CHAP LhalleĀ»ge: H6ty" t@![ā€ŗ CHAP Response: Answer: 89it%-OkL
  • 181. 1 8 1 ā€¹Ā» . .... Link Access Protocol (LAP) ā€¢ LAP originates from IBM SDLC. Ā« Later it was named as LAPB (LAR balanced:/| t::. ā€¢ LAP is data link protocol for X.25 ā€¢ LAPB is used to manage communication and packet framing between data terminal equipment (DTE) and the data circuit-terminating equipment (DCE) devices in the X.25 protocol stack. ā€¢ LAPB is essentially HDLC in Asynchronous Balanced Mode (ABM). ā€¢ LAPB sessions can be established by either the DTE or DCE. ā€¢ Bit oriented ā€¢ LAPB makes sure that frames are error free and properly sequenced.
  • 182. ā€¢ I-Frames : 1 8 2 * ā€¢ Carries data and control information. ā€¢ It includes sequencing, flow control, and error detection and recovery. I-frames carry send and receive sequence numbers. ā€¢ S-Frames : e Carries control information. ā€¢ S-frame functions include requesting and suspending transmissions, reporting on status, and acknowledging the receipt of I-frames. ā€¢ U-Frames : ā€¢ carries control information. ā€¢ U-frame functions include link setup and disconnection, as well as error reporting.
  • 184. LAPB protocol operation 1 8 4 ā€¢ In LAPB, since there is no master/slave relations the sender uses the Poll bit to insist on an immediate response. ā€¢ In the response frame this same bit becomes the receivers Final bit. ā€¢ The receiver always turns on the Final bit in its response to a command from the sender with the Poll bit set. ā€¢ The P/F bit is generally used when either end becomes unsure about proper frame sequencing because of a possible missing acknowledgement, and it is necessary to re-establish a point of reference.
  • 185. LAPF- Link Access Procedure/proto for Frame Mode Services 1 8 5 ā€¢ Defined in the ITU Q.922 ā€¢ An enhanced LAPD (Q.921 with congestion control capabilities ā€¢ Used for Frame Mode Services in the Frame Relay network. ā€¢ The core functions of LAPF are: ā€¢ Frame delimiting, alignment, and flag transparency ā€¢ Virtual circuit multiplexing and de-multiplexing Octet alignment: Integer number of octets before zero-bit insertion ā€¢ Checking minimum and maximum frame sizes ā€¢ Error detection, Sequence and non-duplication ā€¢ Congestion control
  • 186. Flag Address field Control elo Information F C S Flag Protocol format 1 8 6