AAL 3/4AAL-SAP
AAL-SDUSSCS
SSCS-PDU
SSCS-PDU Payload SSCS-PDUTrailer
SSCS-PDUHeader
CPCS-SDU
CPCS-PDU Payload CPCS-PDUTrailer
CPCS-PDUHeader
CPCS
CPCS-PDU
SAR-PDU Payload SAR-PDUTrailer
SAR-PDUHeader
ATM-SAP
SAR-PDU
SAR
AAL 3/4
Non-Assured Mode(Unreliable)
Assured Mode(ARQ Protocols)
- Go_Back_N- Selective Repeat Request
Message ModeEntire AAL-PDU needed
Stream ModeSmall AAL-PDUs allowed
a) MESSAGE MODE
• AAL-SDU is passed across the AAL interface in exactly one AAL-SDU. • This service provides transport of fixed size of variable length AAL-SDUs.
• 1:1 mapping, i.e., one SSCS-PDU consists of one AAL-SDU. SSCS accepts a block of information from a user and creates a SSCS-PDU.
• This includes a Header & Trailer with protocol information and padding to make the PDU an integral multiple of 32 bits.
• SAR accepts the SSCS-PDU from SSCS and segments it into N 44-octet SAR-PDUs (this last segment may contain some unused portion).
AAL-SDU
H H . . .
AAL Interface
SSCS-PDU
SAR-PDUs
H
Data
SSCS-PDU Header (4 octets)
SSCS-PDU Trailer (4 octets)
Padding octets ( 0-3 octets )
SAR-PDU Header
SAR-PDU Trailer
Unused
Message Mode
H
Message mode is used for “framed data transfer”, e.g., high level protocols and applications would fit into this category, e.g., LAPD or Frame Relay would be in message mode.
• Advantage: Detects errored SSCS-PDUs and discards them.
• Disadvantage: Requires large buffer capacity.
b) Streaming Mode
• The AAL service data unit is passed across the AAL interface in one or more AAL interface data units (AAL IDUs).
• The transfer of these AAL-IDUs across the AAL interface may occur separately in time and this service provides the transport of the variable length AAL-SDUs.
• It provides transport of variable length AAL-SDU.
• The AAL-SDU may be small as 1 octet and is always delivered as 1 unit because only this unit will be recognized by the application.
AAL SDUs
AAL Interface
SSCS-PDU
SAR-PDUs
H HH
H
Streaming mode Data
SSCS-PDU
SSCS-PDU
Header(4 octets)
Trailer(4 octets)
Padding octets(0-3)
SAR-PDU Header
SAR-PDU Trailer
Unused
• Streaming mode is used for low speed continuous data with low delay requirements which may be as small as 1 octet.
• 1 block is transferred per cell. Data are presented to AAL in fixed size slots.
• Advantage: Transfer delay of a message is low.
A single SDU is passed to the AAL layer and transmitted in multiple SSCS-PDUs (pipelined or streamed mode).
AAL 3/4 Details
0-65535 Bytes
SAR-PDUPayload
LI CRC
Cell Payload
AAL-SAP
Higher layer
CPCS
SAR
ATM Layer
CPI Btag BASize CPCS-PDU Payload0-65535 Bytes
PAD AL
ST
LengthEtag Length
SN MID SAR-PDUPayload
LI CRCST SN MID …
Cell Header
ATM-SAP
H T
48 octets
TH H T
…….
53 octets
44 44
CPI: Common Part Indicator(1 Octet)
Btag: Beginning Tag (1 octet)
BA Size: Buffer Size
Allocation (2 octets)
Length: Length of CPCS-PDU
Payload (2 octets)
AL: Alignment (1 octet)
Etag: End Tag (1 octet)
PAD: Padding (0-3 octets)
ST: Segment Type (2 bits)
SN: Sequence Number (4 bits)
MID: Multiplexing
Identification (10 bits)
LI: Length Indicator (6 bits)
CRC: Cyclic Redundancy
Check Code (10 bits)
The SAR sublayer is depicted in the Figure. The SAR sublayer accepts variable length CS-PDUs from the convergence sublayer and generates SAR-PDUs with a payload of 44 octets, each containing a segment of the CS-PDU.
ST (Segment Type)The ST identifies a SAR-PDU as containing a beginning of message (BOM), a continuation of message (COM), an end of message (EOM), or a single segment message (SSM). All BOMs and COMs contain exactly 44 octets where EOM and SSM may have variable lengths.
ST ST Field
BOM
COM
EOM
SSM
10
00
01
11
Segment Type Value
AAL 3/4 Segmentation
User DataUser Data
CPCS-H CPCS-PDU Payload CPCS-TCPCS-H CPCS-PDU Payload CPCS-T
SAR-H SAR-PDU Payload SAR-T SAR-H SAR-PDU Payload SAR-T
ATM-H ATM Cell Payload ATM-H ATM Cell Payload
SAR-H SAR-PDU Payload SAR-T SAR-H SAR-PDU Payload SAR-T
SAR-H SAR-PDU Payload SAR-T SAR-H SAR-PDU Payload SAR-T
BOM
COM
EOM
ATMCell
CPCSPDU
SARPDU
SARPDU
SARPDU
SN (Sequence Number)
• The SN allows the sequence of SAR-PDUs to be numbered modulo 16.
• SN is incremented by 1 relative to the SN of the previous SAR-PDU belonging to the same AAL connection (numbering modulo 16).
• These two fields enable the segments of the CS-PDU to be reassembled in the correct sequence and minimize the effect of errors on the reassembly process (counts for lost or misinserted cells, buffer overflows, and underflows & bit errors).
MID (Multiplexing Identification)* The MID is used to identify a CPCS connection on a single ATM-layer connection.
• This allows for more than one CPCS connection for a single ATM-layer connection.
• The SAR sublayer, therefore, provides the means for the transfer of multiple, variable-length CS-PDUs concurrently, over a single ATM layer connection between AAL entities.
• Different AAL connections on a single ATM layer connection where AAL connections must have identical QoS requirements.
• Multiplexiing/Demultiplexing is performed on an end-to-end basis. AAL 3/4 multiplex different streams of AAL/SDUs across a single Virtual Connection.
• For CO, each logical connection between AAL users is assigned a unique MID value.
• Thus, the cell traffic from up to 210 different AAL connections can be multiplexed and interleaved over a single ATM connection.
• For CL service, MID field can be used to communicate a unique identifier associated with each CL user and again traffic from multiple AAL users can be multiplexed.
• From a single host to forward along the same VC and be separated at the destination.
• All sessions having the same QoS MID finds which cell belongs to which session. MID desirable Carriers charge for each connection set up and for each second for an open connection.
• If a pair of hosts have several sessions open simultaneously giving each one its own VC expensive.• If 1 VC can handle the job (enough BW use)
VC1VP
VC2
3 sessionsMultiplexedonto VC2
AAL 3/4 Multiplexing ExampleA data communication terminal has 2 inputs with a 98-octet packets arriving simultaneously destined for a single ATM output port using the AAL 3/4 protocol.
Two parallel instances of the CPCS sublayer encapsulate the packets the packets with a header and trailer.
These are passed to 2 parallel SAR processes that request the CPCS-PDU or two different MIDs resulting in a BOM, COM, and EOM segment for each input packet.
Since all these occurs in parallel, the ATM cells are interleaved on output.
Header
PAD
TrailerC
PCS
Payl
oad
Header
PAD
Trailer
CPC
S Pa
yloa
d
Time
Header
Trailer
SAR-SDU
Header
Trailer
SAR-SDU
Header
Trailer
SAR-SDU
Header
Trailer
Header
Trailer
Header
Trailer
SAR-SDU
SAR-SDU
SAR-SDU
Header
Payload
5
48
Header
Payload
5
48
Header
Payload
5
48
Header
Payload
5
48
Header
Payload
5
48
Header
Payload
5
48
octets
octets
98
98
2
44
2
2
44
2
2
44
2
4
octets octets
4
4
4
26
26
CPCS-PDUs SAR-PDUs ATM CellsInput Packets
2
44
2
2
44
2
2
44
2
octets
LI (Length Indicator)
• The LI contains the number of octets (binary coded)
from the CS-PDU which are included in the
SAR-PDU payload.
• Maximum value is 44. It aids in the detection
of reassembly errors such as loss or gain of cells.
CRC ( Cyclic Redundancy Check )• The CRC is a 10-bit sequence used to detect bit errors across
the whole SAR-PDU.
• This includes the CS-PDU segment and hence the user data.
• Remainder of the division (modulo 2) by the generator polynomial
of the product of x10 and the content of the SAR-PDU, including
the SAR-PDU header, SAR-PDU payload and LI field of SAR-PDU.
• The polynomial is G(x) = x10+x9+x5+x4+x+1.
• Result of CRC calculation is placed with the LSB right justified in
the CRC-field (CRC-10 to detect errors).
CPI ( Common Part Indicator )
* The CPI is used to interpret subsequent fields for the CPCS
functions in the Header/Trailer.
* CPI of 0 indicates that the BAsize field contains an estimate
of incoming CPCS-PDU and LI exact size.
BTag ( Beginning Tag )
• Sender inserts same value in BTag and ETag for a given
CPCS-PDU and changes the value for each successive CPCS-PDU.
• Receiver checks the values for each successive CPCS-PDU.
• It also checks the value of BTag in the CPCS-Header with the
value of ETag in trailer.
• BTag and ETag are set to the same value to help error detection.
BASize ( Buffer Allocation Size )
• The BAsize indicates the receiver the maximum
buffering requirements to receive the CPCS-PDU.
• BAsize is binary encoded as number of counting units.
Size of counting units is identified by the CPI field.
• BAsize field estimates the incoming CPCS-PDU size in bytes.
Length field contains the exact size of CPCS-PDU in bytes.
• In Message Mode, BAsize value is encoded equal to the
CPCS-PDU payload length.
• In Streaming Mode, BAsize value is encoded equal to or greater
than the CPCS-PDU length.
PAD
• Between end of CPCS-PDU payload and 32-bit
aligned CPCS-PDU trailer, there will be 0-3
unused octets for padding makes the CPCS-PDU
an integral multiple of 32 bits to make end system
processing more effificient.
• These are used as filler octets and do not convey
any information.
• It may be set to zero and its value is ignored at
the receiving end.
AL (Alignment )• The AL is used to achieve 32-bit alignment in the CPCS-PDU trailer.
• AL field complements the CPCS-PDU trailer to 32 bits.
• This unused octet is strictly used as a filler octet and does not
convey any information, i.e., it simply makes the trailer a
full of 32 bits to simplify the receiver design.
• AL field should be set to 0.
ETag ( End Tag )
The ETag is used to associate the CPCS-PDU trailer with the
CPCS-PDU header the transmitter will insert the same value
into the BTag and ETag fields.
Reassembly Process* Normally, BOM-COMs-EOM..etc.
* The first BOM causes the AAL to note the MID and SN fields,
and then look for following COMs which contain the same MID
and have correctly incremented the SN fields.
* Payload is extracted from each SAR-PDU to from the CPCS-PDU.
* Finally, when EOM arrives, in sequence and matching MID value,
then the CPCS-PDU is complete.
* Final error checking Matching ETag & BTag and ensuring
the Length field matches that the received data.
Remark:
• If a BOM occurs with the MID of a current CPCS-PDU
being reassembled, COM & EOM SAR-PDU’s arriving with
a MID value not corresponding to a current CPCS-PDU are ignored.
• Those arriving with an out-of-sequence, SN field indicates an
error occurred so reassembly aborted.
Example 1Suppose a sequence of SAR-PDU is transmitted through AAL 3/4.
1. Suppose BOM SAR-PDU is lost on the way. What happens at the receiving end?
•CS-PDU will be discarded.
BOM COM COM EOMDiscard
Detect
Btag missingLength will also can do it !
2. One of the COM SAR-PDU is lost. What happens at the receiving end?
•CS-PDU will be discarded. (same as above: violation of sequence number)
•Note: SAR layer cannot detect the problem with CS. Since it has LI field (that complete data is not received), ETAG and BTAG fields.
BOM COM COM EOMCOM
Discard
SN ViolatedBuf CS SAR will not detect the problemSN will be missingLength will also detect.
3. Special Case: Suppose COM & successive EOM & BOM are lost assuming SN is matched. What happens at the receiving end?
• 2 PDUs get concatenated into the same CS-PDU
• On the CPCS layer, Btag and Etag will be different for 2 PDUs (Error occurred). Hence, everything will be discarded.
EOMBOM COM COM EOM BOM COM COM COM BOM COM COMEOM
Concatenated
Btag & Etag will be different! Discard !!
4. 16 consecutive COM SAR-PDUs are lost. What happens at the receiving end?
• When EOM SAR-PDU is received, the CS-PDU will be discarded because it is shorter than BAsize indication (Buffer Allocation size) field.
• SAR does not recognize that SAR_PDUs were lost because it uses mod 16 SN, and hence after 16 data units, the SN is repeated. However, when EOM is delivered to the CPCS, the CPCS will check the length field in the trailer of CPCS-PDU that it has assembled and will detect the assembled data is shorter than the length field. CPCS will discard it.
BOM COM COM EOMCOM
16
SN modulo 16
BA size will detect it! SAR will not compare it!
5. Multiple 16 consecutive COM SAR-PDUs are lost. What happens at the receiving end?
• Any sequence of lost COM SAR-PDU that is multiple of 16 result same as before because mod 16 SN.
Example 2
1. EOM-SAR-PDU of the first block sequence is lost.
• The partial CS-PDU of the first block will be discarded when another BOM SAR-PDU is received.
(SAR will send an ABORT signal to CPCS to terminate the Re-assembly)
So that the CPCS can release the re-assembly buffer.
2. EOM-SAR-PDU of the first block & BOM-SAR-PDU of the second block are both lost
i) Sequence numbers or
ii) E-Tag of the CPCS trailer of the second block or
iii) Length field of the second message will catch the errors.
SN of 2 subsequent messages are randomly related (AAL is free to pick any # between 0 and 15 range for initial SN of the first SAR-PDU of a message).
Suppose first message ends with a sequence like …, 6, 7 and the next message starts with 6, 7 …, if EOM (SN=6) of first message is lost BOM (SN=7) of second message is lost, sequence will appear correctly, …,6 ,7… So in this case if SN does not help in the SAR, the E-Tag will help.
If they agree, then the length field in the CPCS-PDU of second message will catch it.
AAL 5• The new AAL was introduced in the study process of CCITT at the end of 1991.
• Its description was published in the 1994 CCITT recommendations.
• Designed for the same class of service as AAL 3/4, it has the advantage of being simpler and requiring less overhead.
• Unlike AAL 3/4, it allows all 48 octets of the cell information field to be used for the transport of CS-PDU segments, the only SAR protocol information being provided by a bit in the ATM cell header, as explained below.
AAL 5
•This means that there is neither multiplexing nor error control at the SAR sublayer.
•However, there is a CRC field (CRC-32) in the CS sublayer.
•There are also similarities with AAL 3/4.
•The two modes of service defined,
message and streaming mode
are the same as in AAL3/4.
The Convergence Sublayer of AAL 5 has been subdivided into a CPCS part and a SSCS part.
• CPCS:
--supports streaming mode and message mode
• SSCS: uses the same SSCS as AAL 3/4 and provides
assured or non-assured data delivery.
• The protocol control information field of the SAR sublayer uses the ATM-layer-user-to-ATM-layer-user parameter (AAU) contained in the ATM header to indicate that a SAR-PDU contains the end of a CS-PDU.
* When the bit is set to 1, it indicates the end of the CPCS-PDU; when the bit is set to 0 it indicates the continuation or the beginning of a CS-PDU.
* This is necessary to enable the SAR to copy with reassembly of the CS-PDU in the presence of errors.
* If no indication of the end of the CS-PDU was provided, the loss of a cell, and hence the loss of a segment of the CS-PDU, would mean that all subsequent reassembly operation would be incorrect.
* By indicating the end of the CS_PDU, the loss of a single cell would limit the error to one CS-PDU, unless the lost cell contained the end indication in which case the error would be restricted to 2 CS-PDUs.
ATM CELL STRUCTURE
• Octets are sent in increasing order 1,2,3 …• Within an octet the bits are sent in decreasing order 8,7,6,5,4 ...
1
2
3
4
5
:
:
53
8 7 6 5 4 3 2 1
1
2
3
4
5
:
:
53
8 7 6 5 4 3 2 1
8 7 6 5 4 3 2 112345:::
53
PAYLOAD(48 octets)
HEADER(5 octets)
Octet
User Network Interface (UNI)Cell Structure
Network Network Interface (NNI)Cell Structure
GFC
VCI
VPI VPI
VPIVPI VCI
VCI
VCI
VCI
VCI PT PT PRPR
HEC HEC
PAYLOAD(48 octets)
PAYLOAD(48 octets)
GFC : Generic Flow ControlVPI : Virtual Path IdentifierVCI : Virtual Channel IdentifierPT : Payload TypePR : PriorityHEC : Header Error Control
PAYLOAD TYPE (PT)
First Bit 0 User Information
First Bit 1 Network Management or Maintenance Function
Second Bit Whether CONGESTION has been experienced or not.
Third Bit known as AAU (ATM-User-to-ATM-User) used in AAL5 to convey information between end users.
Remark:• Lack of LI field No way for SAR to distinguish between CPCS-PDU octets and filler in the lost SAR-PDU. There exists no way for SAR entity to find the CPCS-PDU trailer in the last SAR-PDU.
•To avoid these situations - CPCS-PDU payload be added out so that the last bit of the CPCS trailer occurs as the last bit of the final SAR-PDU.
•No Sequence Number Receiver must assure that all SAR-PDUs arrive in proper order for reassembly. CRC should guarantee that.
• Lack of MID: It is not possible to interleave cells from different CPCS-PDUs. (Each successive SAR-PDU carries a portion of the current CPCS-PDU or the first block of the next CPCS-PDU).
• 32-bit CRC for AAL 5
G(x)=x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1
Probability of undetected cell misordering is 2-32.
AAL 5
PAD: Padding (0 to 47 octets); Length: Length of CPCS-SDU (2 octets)CPCS-UU: CPCS user-to-user indication (1 octet)CRC: Cycle Redundancy Check (4 octets)CPI: Common Part Indicator (1 octet)
PADCPCS-PDU
TrailerCPCS-PDU Payload
CPCS-UU CPI Length CRC
CPCS-PDU
8 Octets
SAR PDU Format for AAL5
PT (Payload Type): The PT belongs to the ATM header and it conveys the value of the ATM-layer-user-to-ATM-layer-user indication.
Cell Header
PT
SAR-PDU (48 Octets)
SAR-PDU Payload
AAL 5 Example
* Two 98-byte packets arrive simultaneously.
* Two parallel instances of this CPCS sublayer.
* Add a trailer to each packet.
* Note that the entire packet does not have to
be received before it can begin the SAR
function as in AAL 3/4 to insert the correct
buffer allocation size.
* The packets are segmented by 2 parallel SAR processes.
* Here these cells are destined for the same VPI/VCI and
hence only one can be sent at a time
Input Packets
CPCS-PDUs
SAR-PDUs
ATM Cells
CP
CS
Pay
load
48
5
Time
octets
octets
octets
PAD
SAR-SDU
SAR-SDU
SAR-SDU
HeaderPayload
SAR-SDU
SAR-SDU
SAR-SDU
48
48
48
48
48
Trailer
PAD
Trailer
CP
CS
Pay
load
388
38
8
98
98
octets
HeaderPayload
HeaderPayload
HeaderPayload
HeaderPayload
HeaderPayload
48
5
48
5
48
5
48
5
48
5
48
Example1. Single bit error in 1 of the SAR-PDUs occurs.
CS-PDU will be discarded when lost SAR-PDU is received due to CRC failing. In trailer (CRC - checking CS layer AAU=1 after getting EOM-SAR
2. Suppose one of the cells with AAU=0 is lost.
Find SAR-PDU (AAU=1) will cause the CPCS check the LENGTH FIELD of the CPCS-PDU trailer. Trailer is always in the last cell (AAU=1), and CRC will ALSO be checked.
3. One of the cells AAU=1 is lost?
Error either by CRC or by mismatch of the length field in CPCS-PDU trailer OF THE NEXT ARRIVING CELL with AAU=1.
When trailer for next message (the one that is lost with AAU=1 cell) is received. This will result in a loss of both corrupted and the next message.
REMARK:
The LEN field of CS-PDU is limited to 2 bytes. So a max. of 64K bytes can be sent before the end of message error can be triggered off. If the total size of both CS-PDUs is greater than 64K, receiver will detect the error.
Sources of Cell Losses
a) Errors on the transmission media
b) Discarding cells for congestion control
c) Processing errors in switching nodes and end-points
Effect of Cell Loss on Reassembly
Cell Loss
AAL 3/4 may pass partially reassembled CPCS-PDUs to the user along
with an error indicator.
AAL 5 Can only pass up an error indicator
AAL 3/4 Reassembly
• Receiver SAR/CPCS rejects all COM & EOM cells passed to it. BOM is required. If BOM lost, the entire CPCS-PDU is discarded.
• Incorrect SN progression between SAR-PDU reveals the loss of a COM.
• If a multiple of 16 consecutive cells is lost, then the SN wraps around, but the loss of data is detected by the CPCS-PDU being undersized.
• To detect EOM loss, two methods exist:
METHOD 1:
If the BOM of the next CPCS-PDU on the same MID arrives before the EOM for the current CPCS-PDU, then the partially reassembled CPCS-PDU must be released by the SAR/CPCS.
Entire partially reassembled CPCS-PDU received to that point is considered valid & passed to the AAL user along with an error indication.
This is only the case when EOM is lost or where a cell burst knocks out some COMs followed by the EOM.
A cell loss burst that knocks out the EOM & the following BOM & slips past the SN checks, will be detected when B-tag & E-tag fields fail to match.
REMARK:
The length indicator may fail to pick up this error, if the cell burst loses as many cells as are added by concatenating the 2 CPCS-PDU fragments.
In this case only the first 44 bytes of the first CPCS-PDU may be legitimately retrieved.
For the second one ---> bad luck ....
METHOD 2:
Attach a timer to each CPCS-PDU under reconstruction & signal an error
when it is not reassembled within a certain time frame.
AAL 5
Encapsulation & Seq-Checking DO NOT EXIST as in AAL 3/4.
Reassembly Errors
are detected only when CPCS-PDU trailer arrives. Impossible to know how much has been received already is correct. Single-bit errors in SAR-PDU are not picked up until the CPCS-PDU CRC is calculated ---> if
incorrect the entire CPCS-PDU is discarded.
Lost of cells with AAU=0, detected by an incorrect CRC when the trailer arrives. If CRC fails to flag the error, the length field mismatch ensures the CPCS-PDU is discarded.
Loss of Cells with AAU=1 detected in 3 ways
• SAR-PDU of the following CPCS-PDU may be appended to the first, resulting in a CRC error (or length mismatch).
• AAL may enforce second CPCS-PDU can flag an error and cause the assembled data to be discarded.
• A timer attached to CPCS-PDU reassembly. If it expires, assembled is discarded.