<s>
ATM	B-Protocol
Adaptation	I-Protocol
Layer	I-Protocol
5	I-Protocol
(	O
AAL5	B-Protocol
)	O
is	O
an	O
ATM	B-Protocol
adaptation	I-Protocol
layer	I-Protocol
used	O
to	O
send	O
variable-length	O
packets	B-Protocol
up	O
to	O
65,535	O
octets	O
in	O
size	O
across	O
an	O
Asynchronous	O
Transfer	O
Mode	O
(	O
ATM	O
)	O
network	O
.	O
</s>
<s>
Unlike	O
most	O
network	O
frames	O
,	O
which	O
place	O
control	O
information	O
in	O
the	O
header	B-General_Concept
,	O
AAL5	B-Protocol
places	O
control	O
information	O
in	O
an	O
8-octet	O
trailer	B-Device
at	O
the	O
end	O
of	O
the	O
packet	B-Protocol
.	O
</s>
<s>
The	O
AAL5	B-Protocol
trailer	B-Device
contains	O
a	O
16-bit	O
length	O
field	B-Application
,	O
a	O
32-bit	O
cyclic	O
redundancy	O
check	O
(	O
CRC	O
)	O
and	O
two	O
8-bit	O
fields	O
labeled	O
UU	O
and	O
CPI	O
that	O
are	O
currently	O
unused	O
.	O
</s>
<s>
Each	O
AAL5	B-Protocol
packet	B-Protocol
is	O
divided	O
into	O
an	O
integral	O
number	O
of	O
ATM	O
cells	O
and	O
reassembled	O
into	O
a	O
packet	B-Protocol
before	O
delivery	O
to	O
the	O
receiving	O
host	B-Device
.	O
</s>
<s>
This	O
process	O
is	O
known	O
as	O
Segmentation	B-Protocol
and	I-Protocol
Reassembly	I-Protocol
(	O
see	O
below	O
)	O
.	O
</s>
<s>
The	O
last	O
cell	O
contains	O
padding	O
to	O
ensure	O
that	O
the	O
entire	O
packet	B-Protocol
is	O
a	O
multiple	O
of	O
48	O
octets	O
long	O
.	O
</s>
<s>
The	O
final	O
cell	O
contains	O
up	O
to	O
40	O
octets	O
of	O
data	O
,	O
followed	O
by	O
padding	O
bytes	O
and	O
the	O
8-octet	O
trailer	B-Device
.	O
</s>
<s>
In	O
other	O
words	O
,	O
AAL5	B-Protocol
places	O
the	O
trailer	B-Device
in	O
the	O
last	O
8	O
octets	O
of	O
the	O
final	O
cell	O
where	O
it	O
can	O
be	O
found	O
without	O
knowing	O
the	O
length	O
of	O
the	O
packet	B-Protocol
;	O
the	O
final	O
cell	O
is	O
identified	O
by	O
a	O
bit	O
in	O
the	O
ATM	O
header	B-General_Concept
(	O
see	O
below	O
)	O
,	O
and	O
the	O
trailer	B-Device
is	O
always	O
in	O
the	O
last	O
8	O
octets	O
of	O
that	O
cell	O
.	O
</s>
<s>
When	O
an	O
application	B-Application
sends	O
data	O
over	O
an	O
ATM	O
connection	O
using	O
AAL5	B-Protocol
,	O
the	O
host	B-Device
delivers	O
a	O
block	O
of	O
data	O
to	O
the	O
AAL5	B-Protocol
interface	O
.	O
</s>
<s>
AAL5	B-Protocol
generates	O
a	O
trailer	B-Device
,	O
divides	O
the	O
information	O
into	O
48-octet	O
pieces	O
,	O
and	O
transfers	O
each	O
piece	O
across	O
the	O
ATM	O
network	O
in	O
a	O
single	O
cell	O
.	O
</s>
<s>
On	O
the	O
receiving	O
end	O
of	O
the	O
connection	O
,	O
AAL5	B-Protocol
reassembles	O
incoming	O
cells	O
into	O
a	O
packet	B-Protocol
,	O
checks	O
the	O
CRC	O
to	O
ensure	O
that	O
all	O
pieces	O
arrived	O
correctly	O
,	O
and	O
passes	O
the	O
resulting	O
block	O
of	O
data	O
to	O
the	O
host	B-Device
software	O
.	O
</s>
<s>
The	O
process	O
of	O
dividing	O
a	O
block	O
of	O
data	O
into	O
cells	O
and	O
regrouping	O
them	O
is	O
known	O
as	O
ATM	O
segmentation	B-Protocol
and	I-Protocol
reassembly	I-Protocol
(	O
SAR	O
)	O
.	O
</s>
<s>
By	O
separating	O
the	O
functions	O
of	O
segmentation	B-Protocol
and	I-Protocol
reassembly	I-Protocol
from	O
cell	O
transport	O
,	O
AAL5	B-Protocol
follows	O
the	O
layering	O
principle	O
.	O
</s>
<s>
The	O
ATM	O
cell	O
transfer	O
layer	O
is	O
classified	O
as	O
"	O
machine-to-machine	O
"	O
because	O
the	O
layering	O
principle	O
applies	O
from	O
one	O
machine	O
to	O
the	O
next	O
(	O
e.g.	O
,	O
between	O
a	O
host	B-Device
and	O
a	O
switch	O
or	O
between	O
two	O
switches	O
)	O
.	O
</s>
<s>
The	O
AAL5	B-Protocol
layer	O
is	O
classified	O
as	O
"	O
end-to-end	O
"	O
because	O
the	O
layering	O
principle	O
applies	O
from	O
the	O
source	O
to	O
the	O
destination	O
-	O
AAL5	B-Protocol
presents	O
the	O
receiving	O
software	O
with	O
data	O
in	O
exactly	O
the	O
same	O
size	O
blocks	O
as	O
the	O
application	B-Application
passed	O
to	O
the	O
AAL5	B-Protocol
on	O
the	O
sending	O
end	O
.	O
</s>
<s>
The	O
AAL5	B-Protocol
on	O
the	O
receiving	O
side	O
knows	O
how	O
many	O
cells	O
comprise	O
a	O
packet	B-Protocol
because	O
the	O
sending	O
AAL5	B-Protocol
uses	O
the	O
low-order	O
bit	O
of	O
the	O
"	O
PAYLOAD	O
TYPE	O
"	O
field	B-Application
of	O
the	O
ATM	O
cell	O
header	B-General_Concept
to	O
mark	O
the	O
final	O
cell	O
in	O
a	O
packet	B-Protocol
.	O
</s>
<s>
This	O
final	O
cell	O
header	B-General_Concept
can	O
be	O
thought	O
of	O
as	O
an	O
"	O
end-to-end	O
bit	O
"	O
.	O
</s>
<s>
Thus	O
,	O
the	O
receiving	O
AAL5	B-Protocol
collects	O
incoming	O
cells	O
until	O
it	O
finds	O
one	O
with	O
an	O
end-of-packet	O
bit	O
set	O
.	O
</s>
<s>
ATM	O
standards	O
use	O
the	O
term	O
"	O
convergence	O
"	O
to	O
describe	O
mechanisms	O
that	O
recognize	O
the	O
end	O
of	O
a	O
packet	B-Protocol
.	O
</s>
<s>
Although	O
AAL5	B-Protocol
uses	O
a	O
single	O
bit	O
in	O
the	O
cell	O
header	B-General_Concept
for	O
convergence	O
,	O
other	O
ATM	B-Protocol
adaptation	I-Protocol
layer	I-Protocol
protocols	O
are	O
free	O
to	O
use	O
other	O
convergence	O
mechanisms	O
.	O
</s>
<s>
The	O
AAL5	B-Protocol
trailer	B-Device
does	O
not	O
include	O
a	O
type	O
field	B-Application
.	O
</s>
<s>
Thus	O
,	O
an	O
AAL5	B-Protocol
frame	O
does	O
not	O
identify	O
its	O
content	O
.	O
</s>
<s>
This	O
means	O
that	O
either	O
the	O
two	O
hosts	O
at	O
the	O
ends	O
of	O
a	O
virtual	B-Protocol
circuit	I-Protocol
must	O
agree	O
a	O
priori	O
that	O
the	O
circuit	O
will	O
be	O
used	O
for	O
one	O
specific	O
protocol	O
(	O
e.g.	O
</s>
<s>
the	O
circuit	O
will	O
only	O
be	O
used	O
to	O
send	O
IP	O
datagrams	O
)	O
,	O
or	O
the	O
two	O
hosts	O
at	O
the	O
ends	O
of	O
a	O
virtual	B-Protocol
circuit	I-Protocol
must	O
agree	O
a	O
priori	O
that	O
some	O
octets	O
of	O
the	O
data	O
area	O
will	O
be	O
reserved	O
for	O
use	O
as	O
a	O
type	O
field	B-Application
to	O
distinguish	O
packets	B-Protocol
containing	O
one	O
protocol	O
's	O
data	O
from	O
packets	B-Protocol
containing	O
another	O
protocol	O
's	O
data	O
.	O
</s>
<s>
It	O
has	O
the	O
advantage	O
of	O
not	O
requiring	O
additional	O
information	O
in	O
a	O
packet	B-Protocol
,	O
which	O
minimises	O
the	O
overhead	O
.	O
</s>
<s>
For	O
example	O
,	O
if	O
the	O
hosts	O
agree	O
to	O
transfer	O
IP	O
,	O
a	O
sender	O
can	O
pass	O
each	O
datagram	O
directly	O
to	O
AAL5	B-Protocol
to	O
transfer	O
,	O
nothing	O
needs	O
to	O
be	O
sent	O
besides	O
the	O
datagram	O
and	O
the	O
AAL5	B-Protocol
trailer	B-Device
.	O
</s>
<s>
The	O
chief	O
disadvantage	O
of	O
such	O
a	O
scheme	O
lies	O
in	O
duplication	O
of	O
virtual	B-Protocol
circuits	I-Protocol
:	O
a	O
host	B-Device
must	O
create	O
a	O
separate	O
virtual	B-Protocol
circuit	I-Protocol
for	O
each	O
high-level	O
protocol	O
if	O
more	O
than	O
one	O
protocol	O
is	O
used	O
.	O
</s>
<s>
Because	O
most	O
carriers	O
charge	O
for	O
each	O
virtual	B-Protocol
circuit	I-Protocol
,	O
customers	O
try	O
to	O
avoid	O
using	O
multiple	O
circuits	O
because	O
it	O
adds	O
unnecessary	O
cost	O
.	O
</s>
<s>
The	O
latter	O
scheme	O
,	O
in	O
which	O
the	O
hosts	O
use	O
a	O
single	O
virtual	B-Protocol
circuit	I-Protocol
for	O
multiple	O
protocols	O
,	O
is	O
referred	O
to	O
in	O
RFC	O
2684	O
as	O
"	O
LLC	O
Encapsulation	O
"	O
.	O
</s>
<s>
The	O
standards	O
suggest	O
that	O
hosts	O
should	O
use	O
a	O
standard	O
IEEE	O
802.2	O
Logical	O
Link	O
Control	O
(	O
LLC	O
)	O
header	B-General_Concept
,	O
followed	O
by	O
a	O
Subnetwork	B-Protocol
Access	I-Protocol
Protocol	I-Protocol
(	O
SNAP	O
)	O
header	B-General_Concept
if	O
necessary	O
.	O
</s>
<s>
This	O
scheme	O
has	O
the	O
advantage	O
of	O
allowing	O
all	O
traffic	O
over	O
the	O
same	O
circuit	O
,	O
but	O
the	O
disadvantage	O
of	O
requiring	O
each	O
packet	B-Protocol
to	O
contain	O
octets	O
that	O
identify	O
the	O
protocol	O
type	O
,	O
which	O
adds	O
overhead	O
.	O
</s>
<s>
The	O
scheme	O
also	O
has	O
the	O
disadvantage	O
that	O
packets	B-Protocol
from	O
all	O
protocols	O
travel	O
with	O
the	O
same	O
delay	O
and	O
priority	O
.	O
</s>
<s>
RFC	O
2684	O
specifies	O
that	O
hosts	O
can	O
choose	O
between	O
the	O
two	O
methods	O
of	O
using	O
AAL5	B-Protocol
.	O
</s>
<s>
Internet	B-Protocol
Protocol	I-Protocol
(	O
IP	O
)	O
can	O
use	O
AAL5	B-Protocol
,	O
combined	O
with	O
one	O
of	O
the	O
encapsulation	O
schemes	O
described	O
in	O
RFC	O
2684	O
,	O
to	O
transfer	O
datagrams	O
across	O
an	O
ATM	O
network	O
,	O
as	O
specified	O
in	O
.	O
</s>
<s>
Before	O
data	O
can	O
be	O
sent	O
,	O
a	O
virtual	B-Protocol
circuit	I-Protocol
(	O
PVC	O
or	O
SVC	O
)	O
must	O
be	O
in	O
place	O
to	O
the	O
destination	O
host	B-Device
and	O
both	O
ends	O
must	O
agree	O
to	O
use	O
AAL5	B-Protocol
on	O
the	O
circuit	O
.	O
</s>
<s>
To	O
transfer	O
a	O
datagram	O
,	O
the	O
sender	O
passes	O
it	O
to	O
AAL5	B-Protocol
along	O
with	O
the	O
VPI/VCI	O
identifying	O
the	O
circuit	O
.	O
</s>
<s>
AAL5	B-Protocol
generates	O
a	O
trailer	B-Device
,	O
divides	O
the	O
datagram	O
into	O
cells	O
,	O
and	O
transfers	O
the	O
cells	O
across	O
the	O
network	O
.	O
</s>
<s>
At	O
the	O
receiving	O
end	O
,	O
AAL5	B-Protocol
reassembles	O
the	O
cells	O
,	O
checks	O
the	O
CRC	O
to	O
verify	O
that	O
no	O
bits	O
were	O
lost	O
or	O
corrupted	O
,	O
extracts	O
the	O
datagram	O
,	O
and	O
passes	O
it	O
to	O
the	O
IP	O
layer	O
.	O
</s>
