<s>
The	O
data	B-Protocol
link	I-Protocol
layer	I-Protocol
,	O
or	O
layer	B-Protocol
2	I-Protocol
,	O
is	O
the	O
second	O
layer	O
of	O
the	O
seven-layer	O
OSI	O
model	O
of	O
computer	B-Architecture
networking	I-Architecture
.	O
</s>
<s>
This	O
layer	O
is	O
the	O
protocol	O
layer	O
that	O
transfers	O
data	O
between	O
nodes	O
on	O
a	O
network	B-Protocol
segment	I-Protocol
across	O
the	O
physical	B-Application
layer	I-Application
.	O
</s>
<s>
The	O
data	B-Protocol
link	I-Protocol
layer	I-Protocol
provides	O
the	O
functional	O
and	O
procedural	O
means	O
to	O
transfer	O
data	O
between	O
network	O
entities	O
and	O
may	O
also	O
provide	O
the	O
means	O
to	O
detect	O
and	O
possibly	O
correct	O
errors	O
that	O
can	O
occur	O
in	O
the	O
physical	B-Application
layer	I-Application
.	O
</s>
<s>
The	O
data	B-Protocol
link	I-Protocol
layer	I-Protocol
is	O
concerned	O
with	O
local	O
delivery	O
of	O
frames	B-Protocol
between	O
nodes	O
on	O
the	O
same	O
level	O
of	O
the	O
network	O
.	O
</s>
<s>
Data-link	O
frames	B-Protocol
,	O
as	O
these	O
protocol	B-Protocol
data	I-Protocol
units	I-Protocol
are	O
called	O
,	O
do	O
not	O
cross	O
the	O
boundaries	O
of	O
a	O
local	B-General_Concept
area	I-General_Concept
network	I-General_Concept
.	O
</s>
<s>
In	O
this	O
way	O
,	O
the	O
data	B-Protocol
link	I-Protocol
layer	I-Protocol
is	O
analogous	O
to	O
a	O
neighborhood	O
traffic	O
cop	O
;	O
it	O
endeavors	O
to	O
arbitrate	O
between	O
parties	O
contending	O
for	O
access	O
to	O
a	O
medium	O
,	O
without	O
concern	O
for	O
their	O
ultimate	O
destination	O
.	O
</s>
<s>
When	O
devices	O
attempt	O
to	O
use	O
a	O
medium	O
simultaneously	O
,	O
frame	B-Protocol
collisions	O
occur	O
.	O
</s>
<s>
Examples	O
of	O
data	O
link	O
protocols	O
are	O
Ethernet	O
,	O
the	O
IEEE	O
802.11	O
WiFi	O
protocols	O
,	O
ATM	O
and	O
Frame	B-Protocol
Relay	I-Protocol
.	O
</s>
<s>
In	O
the	O
Internet	B-Protocol
Protocol	I-Protocol
Suite	I-Protocol
(	O
TCP/IP	B-Protocol
)	O
,	O
the	O
data	B-Protocol
link	I-Protocol
layer	I-Protocol
functionality	O
is	O
contained	O
within	O
the	O
link	B-Protocol
layer	I-Protocol
,	O
the	O
lowest	O
layer	O
of	O
the	O
descriptive	O
model	O
,	O
which	O
is	O
assumed	O
to	O
be	O
independent	O
of	O
physical	O
infrastructure	O
.	O
</s>
<s>
The	O
data	O
link	O
provides	O
for	O
the	O
transfer	O
of	O
data	B-Protocol
frames	I-Protocol
between	O
hosts	O
connected	O
to	O
the	O
physical	B-Application
link	I-Application
.	O
</s>
<s>
Within	O
the	O
semantics	O
of	O
the	O
OSI	O
network	O
architecture	O
,	O
the	O
protocols	O
of	O
the	O
data	B-Protocol
link	I-Protocol
layer	I-Protocol
respond	O
to	O
service	O
requests	O
from	O
the	O
network	B-Application
layer	I-Application
,	O
and	O
perform	O
their	O
function	O
by	O
issuing	O
service	O
requests	O
to	O
the	O
physical	B-Application
layer	I-Application
.	O
</s>
<s>
That	O
transfer	O
can	O
be	O
reliable	B-Protocol
or	I-Protocol
unreliable	I-Protocol
;	O
many	O
data	O
link	O
protocols	O
do	O
not	O
have	O
acknowledgments	O
of	O
successful	O
frame	B-Protocol
reception	O
and	O
acceptance	O
,	O
and	O
some	O
data	O
link	O
protocols	O
might	O
not	O
even	O
perform	O
any	O
check	O
for	O
transmission	O
errors	O
.	O
</s>
<s>
In	O
those	O
cases	O
,	O
higher-level	O
protocols	O
must	O
provide	O
flow	O
control	O
,	O
error	B-Error_Name
checking	I-Error_Name
,	O
acknowledgments	O
,	O
and	O
retransmission	O
.	O
</s>
<s>
The	O
frame	B-Protocol
header	O
contains	O
the	O
source	O
and	O
destination	O
addresses	O
that	O
indicate	O
which	O
device	O
originated	O
the	O
frame	B-Protocol
and	O
which	O
device	O
is	O
expected	O
to	O
receive	O
and	O
process	O
it	O
.	O
</s>
<s>
In	O
contrast	O
to	O
the	O
hierarchical	O
and	O
routable	O
addresses	O
of	O
the	O
network	B-Application
layer	I-Application
,	O
layer	B-Protocol
2	I-Protocol
addresses	O
are	O
flat	O
,	O
meaning	O
that	O
no	O
part	O
of	O
the	O
address	O
can	O
be	O
used	O
to	O
identify	O
the	O
logical	O
or	O
physical	O
group	O
to	O
which	O
the	O
address	O
belongs	O
.	O
</s>
<s>
In	O
some	O
networks	O
,	O
such	O
as	O
IEEE	O
802	O
local	B-General_Concept
area	I-General_Concept
networks	I-General_Concept
,	O
the	O
data	B-Protocol
link	I-Protocol
layer	I-Protocol
is	O
described	O
in	O
more	O
detail	O
with	O
media	B-Protocol
access	I-Protocol
control	I-Protocol
(	O
MAC	O
)	O
and	O
logical	O
link	O
control	O
(	O
LLC	O
)	O
sublayers	O
;	O
this	O
means	O
that	O
the	O
IEEE	O
802.2	O
LLC	O
protocol	O
can	O
be	O
used	O
with	O
all	O
of	O
the	O
IEEE	O
802	O
MAC	B-Protocol
layers	I-Protocol
,	O
such	O
as	O
Ethernet	O
,	O
Token	B-Device
Ring	I-Device
,	O
IEEE	O
802.11	O
,	O
etc.	O
,	O
as	O
well	O
as	O
with	O
some	O
non-802	O
MAC	B-Protocol
layers	I-Protocol
such	O
as	O
FDDI	B-Protocol
.	O
</s>
<s>
Other	O
data-link-layer	B-Protocol
protocols	O
,	O
such	O
as	O
HDLC	O
,	O
are	O
specified	O
to	O
include	O
both	O
sublayers	O
,	O
although	O
some	O
other	O
protocols	O
,	O
such	O
as	O
Cisco	B-Protocol
HDLC	I-Protocol
,	O
use	O
HDLC	O
's	O
low-level	O
framing	O
as	O
a	O
MAC	B-Protocol
layer	I-Protocol
in	O
combination	O
with	O
a	O
different	O
LLC	O
layer	O
.	O
</s>
<s>
In	O
the	O
ITU-T	B-General_Concept
G.hn	I-General_Concept
standard	O
,	O
which	O
provides	O
a	O
way	O
to	O
create	O
a	O
high-speed	O
(	O
up	O
to	O
1	O
Gigabit/s	O
)	O
local	B-General_Concept
area	I-General_Concept
network	I-General_Concept
using	O
existing	O
home	O
wiring	O
(	O
power	B-Device
lines	I-Device
,	O
phone	O
lines	O
and	O
coaxial	B-Protocol
cables	I-Protocol
)	O
,	O
the	O
data	B-Protocol
link	I-Protocol
layer	I-Protocol
is	O
divided	O
into	O
three	O
sub-layers	O
(	O
application	O
protocol	O
convergence	O
,	O
logical	O
link	O
control	O
and	O
media	B-Protocol
access	I-Protocol
control	I-Protocol
)	O
.	O
</s>
<s>
The	O
data	B-Protocol
link	I-Protocol
layer	I-Protocol
is	O
often	O
divided	O
into	O
two	O
sublayers	O
:	O
logical	O
link	O
control	O
(	O
LLC	O
)	O
and	O
media	B-Protocol
access	I-Protocol
control	I-Protocol
(	O
MAC	O
)	O
.	O
</s>
<s>
The	O
uppermost	O
sublayer	O
,	O
LLC	O
,	O
multiplexes	B-Architecture
protocols	O
running	O
at	O
the	O
top	O
of	O
the	O
data	B-Protocol
link	I-Protocol
layer	I-Protocol
,	O
and	O
optionally	O
provides	O
flow	O
control	O
,	O
acknowledgment	O
,	O
and	O
error	O
notification	O
.	O
</s>
<s>
Other	O
times	O
it	O
refers	O
to	O
a	O
frame	B-Protocol
structure	O
delivered	O
based	O
on	O
MAC	O
addresses	O
inside	O
.	O
</s>
<s>
There	O
are	O
generally	O
two	O
forms	O
of	O
media	B-Protocol
access	I-Protocol
control	I-Protocol
:	O
distributed	O
and	O
centralized	O
.	O
</s>
<s>
The	O
Media	B-Protocol
Access	I-Protocol
Control	I-Protocol
sublayer	I-Protocol
also	O
performs	O
frame	B-Protocol
synchronization	O
,	O
which	O
determines	O
the	O
start	O
and	O
end	O
of	O
each	O
frame	B-Protocol
of	O
data	O
in	O
the	O
transmission	O
bitstream	O
.	O
</s>
<s>
It	O
entails	O
one	O
of	O
several	O
methods	O
:	O
timing-based	O
detection	O
,	O
character	O
counting	O
,	O
byte	O
stuffing	O
,	O
and	O
bit	B-Protocol
stuffing	I-Protocol
.	O
</s>
<s>
The	O
time-based	O
approach	O
expects	O
a	O
specified	O
amount	O
of	O
time	O
between	O
frames	B-Protocol
.	O
</s>
<s>
Character	O
counting	O
tracks	O
the	O
count	O
of	O
remaining	O
characters	O
in	O
the	O
frame	B-Protocol
header	O
.	O
</s>
<s>
Byte	O
stuffing	O
precedes	O
the	O
frame	B-Protocol
with	O
a	O
special	O
byte	O
sequence	O
such	O
as	O
DLE	O
STX	O
and	O
succeeds	O
it	O
with	O
DLE	O
ETX	O
.	O
</s>
<s>
Similarly	O
,	O
bit	B-Protocol
stuffing	I-Protocol
replaces	O
these	O
start	O
and	O
end	O
marks	O
with	O
flags	O
consisting	O
of	O
a	O
special	O
bit	O
pattern	O
(	O
e.g.	O
</s>
<s>
This	O
makes	O
for	O
arbitrary	O
long	O
frames	B-Protocol
and	O
easy	O
synchronization	O
for	O
the	O
recipient	O
.	O
</s>
<s>
The	O
services	O
provided	O
by	O
the	O
data	B-Protocol
link	I-Protocol
layer	I-Protocol
are	O
:	O
</s>
<s>
Error	B-Error_Name
control	I-Error_Name
(	O
automatic	B-Error_Name
repeat	I-Error_Name
request	I-Error_Name
,	O
ARQ	O
)	O
,	O
in	O
addition	O
to	O
ARQ	O
provided	O
by	O
some	O
transport-layer	B-Architecture
protocols	I-Architecture
,	O
to	O
forward	B-Error_Name
error	I-Error_Name
correction	I-Error_Name
(	O
FEC	O
)	O
techniques	O
provided	O
on	O
the	O
physical	B-Application
layer	I-Application
,	O
and	O
to	O
error-detection	O
and	O
packet	O
canceling	O
provided	O
at	O
all	O
layers	O
,	O
including	O
the	O
network	B-Application
layer	I-Application
.	O
</s>
<s>
Data-link-layer	B-Protocol
error	B-Error_Name
control	I-Error_Name
(	O
i.e.	O
</s>
<s>
retransmission	O
of	O
erroneous	O
packets	O
)	O
is	O
provided	O
in	O
wireless	O
networks	O
and	O
V.42	O
telephone	O
network	O
modems	O
,	O
but	O
not	O
in	O
LAN	B-General_Concept
protocols	O
such	O
as	O
Ethernet	O
,	O
since	O
bit	O
errors	O
are	O
so	O
uncommon	O
in	O
short	O
wires	O
.	O
</s>
<s>
In	O
that	O
case	O
,	O
only	O
error	B-Error_Name
detection	I-Error_Name
and	O
canceling	O
of	O
erroneous	O
packets	O
are	O
provided	O
.	O
</s>
<s>
Flow	O
control	O
,	O
in	O
addition	O
to	O
the	O
one	O
provided	O
on	O
the	O
transport	B-Architecture
layer	I-Architecture
.	O
</s>
<s>
Data-link-layer	B-Protocol
flow	O
control	O
is	O
not	O
used	O
in	O
LAN	B-General_Concept
protocols	O
such	O
as	O
Ethernet	O
,	O
but	O
in	O
modems	O
and	O
wireless	O
networks	O
.	O
</s>
<s>
In	O
the	O
medium	B-Protocol
access	I-Protocol
control	I-Protocol
(	O
MAC	O
)	O
sublayer	O
:	O
</s>
<s>
Multiple	O
access	O
methods	O
for	O
channel-access	O
control	O
,	O
for	O
example	O
CSMA/CD	O
protocols	O
for	O
collision	O
detection	O
and	O
re-transmission	O
in	O
Ethernet	O
bus	O
networks	O
and	O
hub	O
networks	O
,	O
or	O
the	O
CSMA/CA	O
protocol	O
for	O
collision	B-Protocol
avoidance	I-Protocol
in	O
wireless	O
networks	O
.	O
</s>
<s>
In	O
addition	O
to	O
framing	O
,	O
the	O
data	B-Protocol
link	I-Protocol
layer	I-Protocol
may	O
also	O
detect	O
and	O
recover	O
from	O
transmission	O
errors	O
.	O
</s>
<s>
For	O
a	O
receiver	O
to	O
detect	O
transmission	O
errors	O
,	O
the	O
sender	O
must	O
add	O
redundant	O
information	O
as	O
an	O
error	B-Error_Name
detection	I-Error_Name
code	I-Error_Name
to	O
the	O
frame	B-Protocol
sent	O
.	O
</s>
<s>
When	O
the	O
receiver	O
obtains	O
a	O
frame	B-Protocol
it	O
verifies	O
whether	O
the	O
received	O
error	B-Error_Name
detection	I-Error_Name
code	I-Error_Name
matches	O
a	O
recomputed	O
error	B-Error_Name
detection	I-Error_Name
code	I-Error_Name
.	O
</s>
<s>
An	O
error	B-Error_Name
detection	I-Error_Name
code	I-Error_Name
can	O
be	O
defined	O
as	O
a	O
function	O
that	O
computes	O
the	O
(	O
amount	O
of	O
redundant	O
bits	O
)	O
corresponding	O
to	O
each	O
string	O
of	O
total	O
number	O
of	O
bits	O
.	O
</s>
<s>
The	O
simplest	O
error	B-Error_Name
detection	I-Error_Name
code	I-Error_Name
is	O
the	O
parity	B-Error_Name
bit	I-Error_Name
,	O
which	O
allows	O
a	O
receiver	O
to	O
detect	O
transmission	O
errors	O
that	O
have	O
affected	O
a	O
single	O
bit	O
among	O
the	O
transmitted	O
bits	O
.	O
</s>
<s>
More	O
advanced	O
methods	O
than	O
parity	B-Error_Name
error	I-Error_Name
detection	O
do	O
exist	O
providing	O
higher	O
grades	O
of	O
quality	O
and	O
features	O
.	O
</s>
<s>
More	O
sophisticated	O
error	B-Error_Name
detection	I-Error_Name
and	I-Error_Name
correction	I-Error_Name
algorithms	O
are	O
designed	O
to	O
reduce	O
the	O
risk	O
that	O
multiple	O
transmission	O
errors	O
in	O
the	O
data	O
would	O
cancel	O
each	O
other	O
out	O
and	O
go	O
undetected	O
.	O
</s>
<s>
This	O
algorithm	O
is	O
often	O
used	O
in	O
the	O
data	B-Protocol
link	I-Protocol
layer	I-Protocol
.	O
</s>
<s>
and	O
most	O
forms	O
of	O
serial	B-Protocol
communication	I-Protocol
e.g.	O
</s>
<s>
USB	B-Protocol
,	O
PCI	O
Express	O
.	O
</s>
<s>
In	O
the	O
Internet	B-Protocol
Protocol	I-Protocol
Suite	I-Protocol
(	O
TCP/IP	B-Protocol
)	O
,	O
OSI	O
's	O
data	B-Protocol
link	I-Protocol
layer	I-Protocol
functionality	O
is	O
contained	O
within	O
its	O
lowest	O
layer	O
,	O
the	O
link	B-Protocol
layer	I-Protocol
.	O
</s>
<s>
The	O
TCP/IP	B-Protocol
link	B-Protocol
layer	I-Protocol
has	O
the	O
operating	O
scope	O
of	O
the	O
link	O
a	O
host	O
is	O
connected	O
to	O
,	O
and	O
only	O
concerns	O
itself	O
with	O
hardware	O
issues	O
to	O
the	O
point	O
of	O
obtaining	O
hardware	O
(	O
MAC	O
)	O
addresses	O
for	O
locating	O
hosts	O
on	O
the	O
link	O
and	O
transmitting	O
data	B-Protocol
frames	I-Protocol
onto	O
the	O
link	O
.	O
</s>
<s>
The	O
link-layer	B-Protocol
functionality	O
was	O
described	O
in	O
RFC	O
1122	O
and	O
is	O
defined	O
differently	O
than	O
the	O
data	B-Protocol
link	I-Protocol
layer	I-Protocol
of	O
OSI	O
,	O
and	O
encompasses	O
all	O
methods	O
that	O
affect	O
the	O
local	O
link	O
.	O
</s>
<s>
The	O
TCP/IP	B-Protocol
model	I-Protocol
is	O
not	O
a	O
top-down	O
comprehensive	O
design	O
reference	O
for	O
networks	O
.	O
</s>
<s>
It	O
was	O
formulated	O
for	O
the	O
purpose	O
of	O
illustrating	O
the	O
logical	O
groups	O
and	O
scopes	O
of	O
functions	O
needed	O
in	O
the	O
design	O
of	O
the	O
suite	O
of	O
internetworking	O
protocols	O
of	O
TCP/IP	B-Protocol
,	O
as	O
needed	O
for	O
the	O
operation	O
of	O
the	O
Internet	O
.	O
</s>
<s>
In	O
general	O
,	O
direct	O
or	O
strict	O
comparisons	O
of	O
the	O
OSI	O
and	O
TCP/IP	B-Protocol
models	I-Protocol
should	O
be	O
avoided	O
,	O
because	O
the	O
layering	O
in	O
TCP/IP	B-Protocol
is	O
not	O
a	O
principal	O
design	O
criterion	O
and	O
in	O
general	O
,	O
considered	O
to	O
be	O
"	O
harmful	O
"	O
(	O
RFC	O
3439	O
)	O
.	O
</s>
<s>
In	O
particular	O
,	O
TCP/IP	B-Protocol
does	O
not	O
dictate	O
a	O
strict	O
hierarchical	O
sequence	O
of	O
encapsulation	O
requirements	O
,	O
as	O
is	O
attributed	O
to	O
OSI	O
protocols	O
.	O
</s>
