Wednesday, 25 March 2009

Difference between SDU and PDU

This question keeps propping up in many discussions so here is an explanation for the difference between PDU and SDU.




Going back to the basics, a protocol stack consists of many different individual protocols. Protocols can be simply described as set of rules that allow communication between peer entities or they can also be described as set of rules that facilitate horizontal communication. Now these protocols are arranged in layers as can be seen in the figure above. In the transmitter side, a layer N receives data from layer N+1 and this data is called the SDU or Service Data Unit. This layer will modify the data and convert it into a PDU or a Protocol Data Unit. The peer entity in the receiver is only able to understand this PDU.

In simplest form, this modification by layer N of the layer N+1 SDU contains encapsulation. In encapsulation, the SDU is preserved as it is and an additional header is added by the layer N protocol. The modification can also perform concatenation (where more than one SDU is combined in a single PDU), segmentation (where a SDU can be split so that different parts of it end up in different PDU) and padding (where SDU is so small that filler bits are added in the end to complete the PDU).

In the receiver side, the peer entity receives the PDU from layer N-1 (its actually layer N-1 SDU) and convert it back into SDU(s) and passes it to layer N+1.


The figure above shows an example of RLC SDU and PDU. The SDU's are received from higher layer, which is from PDCP in case of LTE. These SDU's have to be converted to PDU's so they undergo segmentation and concatenation and suitable RLC headers are added to form the RLC PDU's.

First Figure Source: The TCP/IP Guide

Second Figure Source: 3G Evolution - HSPA and LTE for Mobile Broadband, Erik Dahlman et al.

14 comments:

Jing said...

The diagram and description have an ERROR: N-1 and N+1 should switch places.

When you say "higher layer", how come you show it as "N-1" layer.

Zahid Ghadialy said...

Alicia, thanks for pointing it out. I have changed the diagram and corrected the description.

Unknown said...

sir,i have understood the real concept of pdu n sdu in rlc protocol. but i want the coding in unix related to their functionalities, like- passing pdu's, segmentation concatenation, padding etc,, plz help me in coding. i want to do stub testing in protocol stack development of rlc in acknowledged mode.
thank u.

Zahid Ghadialy said...

Hi Aashima,I am afraid you will have to go through the specs for details on how to do this. I dont think there is any open source available that will show you how things are done.

Ps: I assume you are talking about 3G/LTE RLC.

Anonymous said...

Does it mean RLC pdu is MAC sdu..??

Zahid Ghadialy said...

Yes that's correct.

3G_beginner said...

why size of AMD pdu is <=126 and UMD pdu <= `25 for same length indicator 7?

3G_beginner said...

why size of AMD pdu is <=126 and UMD pdu <= 125 for same length indicator 7?

Abhishek said...

Well..zahid sahab....as per IEEE-802.16 standard...each N layer receives data from N-1 layer....So,please change it..bcz u cannot overcome the standards....

Anonymous said...

You have mentioned the flow of info from a higher layer to a lower layer.
What about information flow from lower layer to higher layer? Can we call the data received from a lower layer as a PDU too?(and Similarly the data being sent to the higher layer after stripping the PDU off the headers and delivering the payload)?

Shailendra Prasad said...

Sir, Can you give one example in table how RLC sdu is converted in RLC PDU with the header values LI,E and all. Suppose we have 1000 bits of RLC SDU and RLC PDU size is just 500 then what will be the flow, how it will be segmented and different sequence no with different LI,E and other values.Please explain in details in table for LTE only.

Shailendra Prasad said...

RRC SDU is PDCP SDU and PDCP PDU is RLC SDU and RLC PDU is MAC SDU....is it right?HOW?

surender said...

when doing rlc testing(am um and tm)modes, which type of bug we need to find out ?

Unknown said...

hey can some one point out to me the forms that the PDU goes through from the highest to the lowest level. please.