0% found this document useful (0 votes)
42 views

Data Link Layer

1. The data link layer provides three main services - error control, flow control, and framing. 2. Error control services include acknowledged and unacknowledged connectionless services, as well as acknowledged connection-oriented services. Unacknowledged is used for low error rate real-time traffic like voice. 3. Framing involves separating messages sent from one node to another using techniques like delimiter characters, variable length fields, or fixed length fields with flags. This allows messages to be properly assembled at the receiving end.

Uploaded by

Sanket Agarwal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Data Link Layer

1. The data link layer provides three main services - error control, flow control, and framing. 2. Error control services include acknowledged and unacknowledged connectionless services, as well as acknowledged connection-oriented services. Unacknowledged is used for low error rate real-time traffic like voice. 3. Framing involves separating messages sent from one node to another using techniques like delimiter characters, variable length fields, or fixed length fields with flags. This allows messages to be properly assembled at the receiving end.

Uploaded by

Sanket Agarwal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 53

DATA LINK LAYER

Data link provides to network layer

Services

Framing
Flow control

Error Control
Access control

Services

I Unacknowledged connectionless Service

It is appropriate when error


rate is very low

It is suitable for real time


traffic such as voice

2 Acknowleged connectionless Service

It useful over unreliable channel


is
such as wireless systems

3 Acknowledged connection Oriented Service

It is the most sophisticated service

provided by DLL to network layer


It gasuntees two important points

Every frame will be recieved


exactly once

Frame is relieved in the


order

right
Application WAN

Framing It is a process
of separating

messages from one sender to another

or from one destination to another


Framing

Variable
Fined sized

sized
An application of fined size framing is

in ATM is in WAN
variable sized is LAN

Appen
of

Delimiter It is a character that marks


the beginning and end the unit
or
of

of Data

0111 Data 1011


Variable sized framing is categorizedinto
character oriented protocol

Bit

These utilizes U diff ways
Character
to. t

I3iiiziFsiottjj

Limitation The count can be garbled l
transmission
during

The problem with resynchronization


is eminent b'coz of which it
is barely

used

Flag Bytes with Byte Stating


In this mechanism each frame starts
and end with special bytes

It helps in removal
of resynchronization
Flag lit 1 Payloadfield It I Fly

IIs 0 DA DRAG DB TAT E IF


DA ED DB DA ED TE D

AT EI Dia DB DA DERE DA IBI


Limitations The use 8 bit characters
of

is not always possible in


every machine

Utilised in PPP protocol

point to point

Starting end flag with bit stuffing

Each frame starts end with same

pattern
whenever sender's DLL encounters 5

consecutive 1s in data It automatticaly

stuff O bits into outgoing bit stream

This bit stuffing is analogue to byte

stuffing in which an escape byte


is stuffed into the ongoing character

scheme before the flag byte in


Data

When reciever relieves 5 consecutive

I bit followed by bit O It automatically

destuff the zero bit


O
1111110

0110 11 11 1 1 11 11 11 11 I 0010

I
0110

11111001111100111111,0010
I

stuffed
bits

4 Physical Layer Coding voilations It is

only applicable to networks in which

the encoding on physical medium contains

some redundancy
y
We can apply diff set of rules to
the problem extraction
data

solve of
from a
frame En enforcing a high Low pair

as I and low high fair as zero


and proving the transition
necessity for
a

to occur only in middle will help


in identifying the data as the transition

in middle ensures to locate the bit


boundaries In such a case the delimiter

can be set as either a high high pair


or a low low pair

1 I 0

I
i

IMI tide

Types of Delays
It

is the amount
Guing Delay of
time
message is waiting in the

queue before being taken out

for processing Varies from O o

It depends on the processing speed and

buffer capacity
Amount time taken
of

Processing
the machines to process a packet

by
or frame or
message i e looking at
destination network id

it extracting
searching in the routing table and

the destination route


identifying
Depends on processing speed of

machine

TxDely Amount time taken


of the

by machine to transfer
message to the outgoing link
packet

TD Size of
Bandwidth
channel
of

Propagation Delay Amount


of time

taken by the message to make


a physical journey from one machine
another dista b w those
to PD
dy

two machine

Link to Link Delay Assuming that

there are 2 devices in the network

d da

Round Trip Time RTT

Q Q DR
to l
s

th c
I

PD CD D2 PRD D TD D2
RTT D

PD CD
DCP
O

End to End Delay

RTT ZED

CD Da N COD P
DID

N intermediate router machines

Time Out TO 2X RTT

NOTE In networked enviornment 3 types


of packets are possible

Data

Control
Acknowledgement

tve Ive

It n is the no
of messages to be sent

for the
ve
ntl
n

If

Independent Cumulative
to 1

For every message The reciever send Ack
encieved have to
youack after some set of

Send messages

R
Piggybacking 7

DATA


DEFIED
Note Network traffic is low in cumulative

Ack
In independent Ack if the Ack no


is me the nth packet is
then
assumed to be levered


In independent Ack high traffic
is accepted

Reliability is higher in independentAck
Error Control

Error
f Packet

Bit Error
Error
InvalidDuplicate
M

I bit Multiple
error

Multiple Bit error is also called burst err

Note Single bit error occurs in parallel


transmission while multi bit errors occurs in

serial transmission usually

Reason for Bit error


Noise

Usually the serial communication takes place


when length
of communication is long other

transmission is used
parallel
Burst length is calculated from extreme

end of error

knantle Burst length of an OS depends


the
on no
of bits that OS

possesses

Error Detection Error detecting codes

include redundancy to allow the relieve


to deduce that error has occurred but

not which error and no request for


lee transmission is initiated

Error Correction Ecc includes enough

redundant info along with each

block
of data pent to enable the
reciever to deduce what the transmitted

data must have been

Consider that m represents data bits

ee redundant bits

N mtr
codeword

here the redundant bit is the additional


number bits added to already existing
of

data word or data bit for the purpose


ofchecking the error in the bits transmitted

m
bit pataword m bits
Dataword
Posited

I
Generator Checker
Redundanter bits
I p bit
Is

n bit codeword
Channel
code way
Encoder Decoder

Sender enciever

Hamming Distance Given two


codewords X X Hamming distance

provides the no
of bit position
in which two code words differ

Find min distance

9 Hamming

Codeword
Data Word

00 00000 f
01 01 1 fr
10 101.01 73

11 t
I
d Cf f 3 Altaf Y

d fists 3

dc fi ta n

Min 3

Note To garuntee the detection of

upto f errors the min Hamming


distance in a code must be 9 1

To garuntee the correction upto


of

S errors the min hamming distance


must be 29 1

Error detection 7
Techniques of

The codes can be


of two types
Linear block code

Cyclic Code

In

case
of linear block code the Xor

of two codeword another


any gives

valid codeword
In cyclic code the code word is cyclically

shifted or rotated to obtain a result


which is another codeword

Simple Parity check

odd Even

000 I 1 1 1

011 00 1
001 11 0011 001
f t z 3

f 01100100 11 trailer

2 1000 1111 I

3 10011001 Do

CRC 7 Cyclic Redundancy Check


It is based on binary division

It consists of peg redundant bits


of
called cyclic redundancy check bits which
are appended to the end data unit

of
go that the resulting data unit becomes

exactly divible by second binary number

which is predetermined
At destination it is divided by

determined number
fame

If at this step there is no reminder


data unit is assumed to be correct

and accept

A reminder indicate the data unit


has been damaged during transmission

therefore must be rejected

Algorithms
of Gen

Let r be the degree


where Gcse is called

generator poly
I Append r bits to the low order end of

the frame so that it now contains intr

bits Inhere mas no bits in data and


corresponds to the poly n'Mix

Divide the bit string corresponding

modulo 2 division
to Nr M n
using

Subtract the reminder which is always

r or
fewer bits tie the bit string
corresponding to ur Mcn using mudulo 2

The result is Checksummed frame to be

transmitted Assume it to be polym

Tca

Note If Gen has n bits then


1 in the data word
append a zeros

11011
m
NVM N NYT 23 Nt

G a N't k t

Example Frame 1101011011

G n aunt

1041 1101
1 4,8 3

toting

KS zeros a 1
I

To Meminder

110101101111107 new append hardia


0000 kijagah

Adv Good performance in detecting


single bit and burst errors

It can be implemented efficiently

in hardware and software

Checkfum In checksum error detection


scheme the data is divided into

N segments each
of m bits
In

the sender's end the segments are added

using I's complement to


get the sum

This sum is complemented to


get the

checksum

The checksum segment is sent


along the data unit

Atthe reliever's end all recieved


segments are added using
1 s complement

arithmetic the sum


sum to get

The sum is complemented and if

that is zero then it is accefted

n m Gender

3
3 10 8,9711141 10

8
9
f 1001

I's complex 0100


4 checksum

Recieverpartye
be add hogawith the

given data
Recieves

3
10
8

0101101 I

41

I I
I
complent is zero

Example 2
i_
7

100110011110001
t te te tu

n y
M 8

f 10011001

jI

0111110T

410000101

00 100101

I'S cap 11011010 checksum

Internet CheckSum

Sender Message is divided into

16 bits words
Value of checksum word is

said to 0
All words including checksum

are added using 1 s complement


addition
Sum is complemented and

considered as checksum for the

whole data
Checksum is sent with the

data
is divided into 16

Reiger Message

bit words

All words are added using


1s complement addition

Sum is complemented and becomes

the new checksum

If value of checksum is zero

then it is accepted otherwise it

is rejected

En Forouzan

FO in A IT 2
16TH
Ase 70 3 64
20 GF
Uz n 2

5 4446
a na c
7 97 a

F 46
B
o

o GE f 164th

B
83 El
D
012

75
JEFE
u
ESTA

a 762
n GE

Fo
466 F

726 F ro

757 A uz

7038

RIE

8 FC 7

FEE
t's complement
I

0000

Error Correction Techniques There are two


with which error correction is performed

ways
Backward error correction

It is done by the virtue


of ex transmission

Forward Error Correction

It uses error correcting codes to


generate actual frames
the methods utilized
some of

are

hamming code

convalation code
Binary
Read Solomon code

Low density parity check code

Self paced assignment 7 What is the Int Std

in IEEE 802 to detect errors


232 it detect

Nof means can 32


burst error

Access Control

Ed
It

is
D

levels of signals

zero Idle n
A
Normal

Abnormal collision
III

DI gticalink control

Media access control


Katiple
f

SLIDES Aness
J
Pure Aloha relies on Ack from if

luciever thus two imp parameter

affect the efficiency of Alohaprotoal

Mann en transmission
attempts
of

Backoff time Aloha dictates


pure
that when time out period passes

each station waits a random amount


time before resending its frames

of
Randomness will help to avoid more

collisions This time is known as


backoff time

The stations on a wireless Aloha Network


600 km apart If

are a man
of
we assume thatsignals propagate at

3 108 my
find the value of backoff
time TB for ke 1 2 3

Tp 2ms Idly

K I 2K combination I

O
g1

OX 1 0 choir for T

1 2 2

K 2

0,1 2,3

pure Aloha network transit


A 200 bit
9 channel 200k bps What
frame On a

is the req to make it collisionfree

Sol 7 I 1ms

Egg
Vulnerable time 2ms

No station should transmit later than 1ms

before the station starts transmission and


an noother station should start sending

during the 1 me period while this station


is transmitting or sending

9 A pure Aloha network transmit 200 bit

Shared
frames the n
channel 200 Kbts
of
on

What

is the throughput if system produce


1000frame see

Tg Ims

G I frame ms

Throughput G e 26

0135

MA slides sepadhua

A network using IMA cd has a


4

bow
of 10 Mbp
If manm propagation

time two way propagation is 25.6ps


what is the min Size frame

of
Sat

Ty 2 256
512g
51.2 Hs

2923
frame size Is X B w 34

512 bits
69 bytes

NOTE The value


of Ty implies that

the station needs to transmit for


51.211s to detect the collision

FLOW CONTROL

L S

Noiseless
Noisy
Channell

Stop GBN SR
L
Stop waitin ARG Ara
Simpler

wait protad t
protocol Automatic repeat
request

Theoretical protocols flow control

Note of
considers unidireen flow of data

whereas Irl the data flow is bidirecn


which sometimes utilizes piggybacking

Simplex Protocol It is a unidirean

protocol
in which dataframes travel

only in one direch


has error control no
It no

control
flow
S
R

Requests Frame o Arrival

Req 7 Frame I Arr

Frame 2 As
M Ree

yf If

a sender sends data frame at

much higher
then that can
processed at reciever end with storage

limitations then this model will not be


a suitable one

2 The denial of Services

Stop Wait Protocol This mechanism

support flow control but doesn't support

error control
g p

Frame

L AdFrame

s
Ack

Probleys No error control

Circuit Lost data frame

Lost Ack

Delayed Ark

Solutions Time out mechanism

Seq no
of data transmitted

Seq no
of Ack

Sw TO seq F Seq Aik

t
SWARY

SLIDING WINDOW Protocol Used in

connection oriented communication

Offers flow control and packet level


error control

Used in both transport and DLL

It is a theoretical concept which is

practically implemented as stop wait

back N and selective repeat


go

Stop Wait AR It adds


simple control mechanism in the
error

existing stop wait protocol

Error correction is done by beep


sent frame and retransmitting

a copy of
when timer expire

The seq me is used to


the to the frames

provide numbering
being sent

The ne Scheme specifies thefact


that if nth frame is sent then neat

will be KH th

The control variables utilized in


stop wait ARO are Sn and rn

when S is the n't


frame to be sent and

Rn is the nth frame relieved The

seq no utilized modulo 2 arithmetic

S RD
É F
S É
Tt

Aik
option e

Fi
Sn C
Ti Consent
ontill F
lot

Ain on

Su s DR
WI F

I
am I 01110

T lot d
oh Fo

a
Doth
sin L

I
T Ark
olim

Numerical If B w
of a link is

Round trip 45ms


1 5 M bps is

and packet size


kilobytes Then
Link utilization in stop wait

find
protocol

B w 105 Mbbs
size I RB

RTT 45 ms

Throughout

1117 1314

1882 Kbps

Pipelining D Thighttxioo

i I x 100

12 139

Problems with pipelining

It requires more seq numbers


In hardware it req
terms of

more
butter space

IEEE 802 Standards 7

LLC

MAC

Name
IEEE 802 Standard of standard

802.1
higher layer LAN protoral

working group
802.2 Standardization

LLC
of
802 3 Ethernet

8024 Token bus

8025 Token Ring


8026 Standardization
MAN

of
802.7 Broadband LAN using

coaxial cable
802.8 Fibre optic
Tag

802.9 Integrated services

LAN
802 10 Interoperable LAN

security
1802 17 wireless

LAN
802 12 100 base VG

802.13 unused
802.14 Cable modems

802 15 wirless PAN


802 15 1 Bluetooth

802 1502 Co existence


of

802 15 3 Ultra wide band

15.4 be
155
zig
wireless PAN

Mesh network
1 I5 I
BAN body Area

Network
15.7 Visible Light communicate

802.16 Wi Man Broadband

wireless Access

802.24
Characteristics

Ehret
Ethernet offer connectionless

communication
control and packet level
No
flow

error control
No acknoledgement

uses bus topology as a

logical topology and star as

the physinal topology

It uses CSM SCD


i as an access control

Method

Evolution Ethernet
of

Std Ethernet sometimes known

as basic ethernet
Fast Ethernet 100M bps

Ethernet I Gbps
Gigabit

10 Gigabit Ethernet 1093ps

Frame Format
1 Byte 6Byte 6 Byte 2 Byte 46 1500Byte y byte

7Byte

preamble Data CRC


SFD SA DA Ratgth

K
eaderactt ta.br

Data
Preamble It 1 and
consists of s
zeros
7 Bytes
forUsed

for synchronization
purpose
Start
Frame Delimiter
SED of

47Consists of 1 s and zeros but


Last two bits will always be

11
SA DA They are 48 bit

physical actress representing


1 y
source destination

DITA The min frame in ethernet


is 46 Bytes Long So that

we can make out 72 Bytes


frames wherein Mann size
of data

is 1500 Bytes

Datatength Since data is


varying

from 46 1500 Bytes to keep track


of correct size data this

needed
of
field is

Lf It is added as part of

trailer to identify bit errors

Not ethernet
0 Data
are
rate supported by
10 Mbbs 100 Mbbs lamps

It utilizes 48 bit physical


adressing scheme

Signaling used is Manchester

encoding
Min Man

46 1500 Data
72 1526 frame

Efficiency

NOTE In worst case scenario it

takes 51.2 yes to detect a collision


in ethernet protocol

The min size of frame supported


by ethernet is 512 bits
of

te D DD ETTY Bridge a

collision

Ethernet Performance
period
IIe peri

Let N is total number


of systems

in the network P is probability of a

station to transfer data I Ps probability

of station not to transfer data


Cl Ps a Probability for remaining

N l
stations not to transfer data
Ps Cl Ps Probability

of success

of a single station

PIP

1
Efficiency

Assume IP is negligible
0

y II
NP Cl Ps probability of success
of

A Ye any arbitrary station


02 among N stations

Number Contention slots will be


of
equal to
Ya

From equation when N as

then A Ye

Contention period is the sum of no


of

contention slot and slot duration


Distance
D
Hate L

t
Length of th size
of packet

IIe

ttifzxtpropxe flat

Iae f una

where
Iggy

Consider 802.3 LAN with 500 stations


9 connected
an

to55500 segments
m

The data rate is 10Mbps Slot time 51.2

Hs
all stations transmit with equal
If

probability What is the channel


utilization for frame size of 512 Bytes

Assume no
of contention slot 1.716

Given B W 10 Mbbs
N 500

slot time 5124s

L 512
Bytes
Tx

period
t 5,34g

If
0 4096 ms

p no
of contention slots X 51.2 10

1.716 51 2 10
8.78 10 S

D
Ffp
8gg

gnsms

0.82
Y

Utilization 82

A channel has bit rate of 4 kips


9 and

Propagation delay 20ms

I see me 20m propagate


horah

For what range of frame sizes


The stop and wait protocol gives

efficiency of 50

II É
3
55 EE 2
E

Iza

where a
Bt
D

YEAR

LER
Note 0ft L BR 50

y
It L BR D 50

LL BR D 250

B UKbps

L BR

3
L Y X 103 240 10

160 bits

Consider MAN with avg


9 Src

dst 20 Km apart

and one
way delay of looks

At what data rate does the

Road trip delay Tx delay for


a 1 KBS frame

RTT TD

2X PD

ZX 100 10 6 87.1024

BW 103

size 1024

Steps to solve Problems in stop await

Protocols
Calculate RTT

Based on the given B w a RTT

either them whichever is

or
of the problem at hand
suitable for

calculate no of bits we are able

to transfer within RTT equate


it as w bits

sliding window
where PS is the packet
Wp Wpgity

size in bits

Seq no req up
where k
Equate 2k
no
Wp

bits in seq no which is fined

of

that are designing


9

Suppose you
protocol
lombps
for P2P link
sliding window

to the moon which has one way


latency of 1.25 see Assume that
data
of

each frame carries 1 KB


bits

what is the min no of


you
need for seq member
Sols

RTT 2.5 second

I see 106 bits

Waits 2.5 10 bits

wp

3IÉ

305.17

2k 305.17

1 9

You might also like