>
Home5G NRPDCP โ€” Packet Data ConvergencePDCP Overview
๐Ÿ›ก๏ธ PDCP โ€” Packet Data ConvergenceBeginner

PDCP Overview & Functions in 5G NR

Sequence numbering, the PDCP header, and the full set of PDCP functions.

📚 3GPP-basedTS 38.323

PDCP sits at the very top of the radio protocol stack โ€” one entity per radio bearer โ€” and turns a raw stream of IP or signalling packets into numbered, secured, compact PDUs that survive handovers, reordering and duplicate delivery without loss and without confusing the layers above it. If RLC and MAC worry about squeezing bits across the air, PDCP worries about the integrity, order, confidentiality and continuity of what rides on top (TS 38.323).

Introduction

The Packet Data Convergence Protocol (PDCP), specified in TS 38.323, is the highest sublayer of the NR Layer-2 stack. It exists once per radio bearer — one PDCP entity for every SRB (signalling radio bearer) and every DRB (data radio bearer) — and it is the last piece of L2 the data touches on the way down and the first it touches on the way up.

A PDCP entity comes into being the moment RRC establishes a bearer (RRCSetup creates SRB1; later RRCReconfiguration adds SRB2 and DRBs), and it lives for as long as that bearer exists. It is reconfigured at every security activation, key change and handover, so it is central not only to steady-state data flow but to mobility and re-establishment as well.

It matters because the air interface is hostile in ways the higher layers must never see: RLC can deliver PDUs out of order after retransmissions, radio can drop or duplicate packets, and the link is public and forgeable. PDCP hides all of that — presenting the layers above with an in-order, duplicate-free, confidential, tamper-evident and (for AM DRBs) lossless-across-handover pipe.

Why PDCP is needed

💡

In plain words: think of PDCP as the mailroom of a large office. Every outgoing letter gets a sequence number stamped on it, is sealed in a tamper-evident envelope (integrity), locked so only the recipient can read it (ciphering), and shrunk to save postage (header compression). At the far end another mailroom un-seals, un-locks, throws away duplicate copies, and re-orders the pile so the reader always sees letters in the order they were written — even if the courier delivered them jumbled or the office moved buildings mid-delivery (handover).

Concretely, PDCP earns its place by solving four problems the layers below cannot. First, ordering: RLC AM retransmissions and multi-leg delivery mean PDUs can arrive out of sequence, so PDCP numbers everything and reorders. Second, security: the radio link is open, so PDCP ciphers payloads and adds an integrity tag. Third, efficiency: small-packet traffic is header-heavy, so PDCP compresses IP/Ethernet headers. Fourth, continuity: at handover the radio path changes, and PDCP is the only layer positioned to retransmit exactly the un-confirmed data so a TCP session survives the move. No single lower layer can do all four, which is why they converge in one sublayer — hence the name.

What PDCP Is and Where It Lives

The Packet Data Convergence Protocol is the highest sublayer of the Layer-2 stack in NR. On the user plane the chain is SDAPPDCPRLCMACPHY; on the control plane it is RRC/NASPDCPRLCMACPHY. PDCP receives service data units (PDCP SDUs) from the upper layer and delivers protocol data units (PDCP PDUs) to the RLC layer below, reversing the whole process on the receive side.

What

A per-bearer sublayer that assigns a sequence number, optionally compresses the header, then integrity-protects and ciphers each packet before handing it down โ€” and undoes all of that, plus reordering and duplicate removal, on receive.

Why

The air interface reorders, drops and duplicates packets, and the radio link is public. PDCP restores in-order, duplicate-free, confidential and tamper-evident delivery so the higher layers see a clean, lossless pipe โ€” even across a handover.

How

Exactly one PDCP entity per radio bearer, each with its own state: a transmit-side counter, a receive-side reordering window, its own security keys, its own compression context and its own timers.

Because there is one entity per bearer, everything PDCP owns is scoped per bearer: the sequence number space, the COUNT value, the security keys, the ROHC/EHC contexts and the reordering window are all private to a single SRB or DRB. This is exactly why security inputs must include a bearer identity โ€” two bearers can otherwise reuse the same COUNT under the same key, which would be catastrophic for the cipher.

🎯

One entity per bearer: every SRB and every DRB gets its own PDCP entity. That per-bearer scoping is the reason the ciphering algorithm takes BEARER as an explicit input alongside COUNT, key and DIRECTION.

A single PDCP entity is not always bound to a single RLC entity. For a split bearer or a duplicated bearer the entity sits above two or more RLC legs at once and steers PDUs across them. That one-to-many relationship makes PDCP the natural home for duplication, split-bearer routing and lossless handover.

The PDCP Function Set

PDCP performs a fixed, well-defined set of jobs. Each is independently configurable per bearer, but relative to one another they always execute in the same order. The table below is the master list; the sections that follow drill into each one.

FunctionWhat it doesKey parameters / notes
Sequence numberingAssigns a PDCP SN to every SDU so the receiver can reorder and detect loss/duplication.SN is 12-bit or 18-bit (pdcp-SN-SizeUL/pdcp-SN-SizeDL).
Header (D/C + SN)Prepends the PDCP header carrying the data/control indicator and the SN.Data PDU: D/C bit + SN. Control PDU (status report, ROHC/EHC feedback) has its own format.
Header compressionShrinks IP/UDP/RTP or Ethernet headers on user-plane DRBs.ROHC (RFC 5795) and NR's EHC (Ethernet Header Compression); context per entity.
Integrity protectionAdds a MAC-I tag so tampering is detectable, and verifies it on receive.Mandatory for SRBs; optional per DRB (integrityProtection).
CipheringEncrypts payload (and, for control-plane, the MAC-I) for confidentiality.Uses COUNT, KEY, BEARER, DIRECTION โ€” see security page.
Reordering & in-order deliveryBuffers out-of-order PDUs and delivers SDUs upward in order.Reordering window + t-Reordering; state vars RX_NEXT/RX_DELIV/RX_REORD.
Duplicate detectionDiscards a second copy of an already-received COUNT.Window-based; underpins both duplication and re-establishment.
PDCP duplicationSends the same PDU on two+ RLC legs for reliability/diversity.Activated/deactivated by MAC CE; receiver removes copies.
Routing (split bearer)Steers PDUs to one RLC leg or another based on a data-volume threshold.ul-DataSplitThreshold, primaryPath.
SDU discardDrops SDUs that have waited too long in the transmit buffer.discardTimer per DRB.
Re-establishment & data recoveryRebuilds state and retransmits un-acked SDUs at handover / key change.Triggered by RRC; behaviour differs SRB vs DRB and by RLC mode.

Sequence Number, Header Format, and COUNT

The sequence number is the spine of everything PDCP does. It is a short, wrapping counter carried in the header; but the security and reordering logic needs a value that never repeats within the life of a key. That larger value is COUNT.

The PDCP Data PDU header begins with a D/C bit (1 = Data PDU, 0 = Control PDU) followed by reserved bits and then the SN field. With a 12-bit SN the header is two octets; with an 18-bit SN it spans three octets. The SN size is configured independently per bearer and per direction via pdcp-SN-SizeUL and pdcp-SN-SizeDL (enumerated len12bits / len18bits). A PDCP Control PDU does not carry an SN at all โ€” instead a PDU Type field selects among a PDCP Status Report (used after re-establishment to tell the peer which SDUs are still missing), ROHC feedback, or EHC feedback.

Because the transmitted SN is only 12 or 18 bits, it wraps quickly โ€” a high-throughput DRB can exhaust a 12-bit space many times per second. So both ends maintain a Hyper Frame Number (HFN) that increments each time the SN rolls past its maximum. The concatenation of the two is COUNT:

COUNT = HFN (most-significant bits) ‖ SN (least-significant bits)  →  a fixed 32-bit monotonic counter

For a 12-bit SN the HFN is 20 bits (20 + 12 = 32); for an 18-bit SN the HFN is 14 bits (14 + 18 = 32). COUNT is what the ciphering and integrity algorithms actually consume, and it is also what the receiver uses to place a PDU into its reordering window. Keeping HFN synchronised on both sides is therefore critical: an HFN desync silently breaks deciphering (the keystream no longer matches) and integrity (the MAC-I mismatches), with no explicit error until packets simply fail. This is precisely why a handover carries the transmit and receive COUNT status in the SN Status Transfer message between gNBs.

The SN size also fixes the size of the reordering and duplicate-detection window, which is half the SN space (2[SN-size]−1). Choosing a larger SN buys a larger window โ€” the receiver can tolerate a bigger reordering spread and a longer in-flight backlog before ambiguity sets in.

SN sizeSN valuesHFN bitsWindow size (2SN−1)Typical use
12-bit0 … 4095202048SRBs, low/medium-rate DRBs
18-bit0 … 26214314131072High-throughput DRBs (eMBB)
🔐

Why a bigger SN? An 18-bit SN gives a far larger window and a much slower HFN wrap โ€” essential for gigabit DRBs where a 12-bit SN would roll over constantly and a modest reordering delay could exceed the window. SRBs, which carry only sparse signalling, always use the 12-bit SN.

Header Compression, Ciphering and Integrity

Header compression: ROHC and EHC

On user-plane DRBs the protocol headers riding above PDCP are wildly redundant. A VoIP packet may carry 40 bytes of IPv6/UDP/RTP header in front of perhaps 20 bytes of voice โ€” most of those header fields (addresses, ports, version) never change flow to flow. Compressing them is pure efficiency, and PDCP is the layer that does it, once per bearer, before anything is ciphered.

What

Two schemes: classic ROHC (RObust Header Compression, RFC 5795 and its profiles) for IP/UDP/RTP/TCP, and NR's newer EHC (Ethernet Header Compression) for the Ethernet headers of TSN and other L2 traffic.

Why

Header overhead can dwarf the payload for voice, gaming and industrial flows. Squeezing 40+ bytes down to a few dramatically raises spectral efficiency and cuts latency on small-packet traffic.

How

Compressor and decompressor build a shared context of the static fields; after that only the changing bits (and a context ID) travel. Feedback PDUs keep the two contexts in step.

ROHC operates as a state machine that migrates from sending full headers to sending tiny compressed ones as confidence in the shared context grows, and it is robust to loss โ€” it can recover the context after packets are dropped. EHC is conceptually similar but simpler and NR-specific: it maps a full Ethernet header to a short context identifier once the flow is known, and is configured by ehc-DL/ehc-UL. Both are strictly user-plane; SRBs are never header-compressed. Crucially, compression must happen before ciphering, because ciphertext is effectively random and cannot be compressed โ€” reverse the order and you gain nothing. For the full ROHC profile set, state machine and feedback modes, follow the dedicated ROHC Header Compression page.

💡

Context is per entity: the ROHC/EHC context is state held inside one PDCP entity. At re-establishment the context is reset (unless the bearer is configured to preserve it via drb-ContinueROHC), which is why the first packets after a handover may temporarily send full headers again.

Ciphering and integrity protection

PDCP is also where the radio link is made confidential and tamper-evident. Two independent operations act on each packet: integrity protection, which appends a 32-bit MAC-I (Message Authentication Code for Integrity) so the receiver can detect any alteration, and ciphering, which encrypts the data so it cannot be read in transit.

Both algorithms take the same core inputs โ€” the security KEY (KRRCenc/KRRCint for SRBs, KUPenc/KUPint for DRBs), the 32-bit COUNT, the 5-bit BEARER identity and the 1-bit DIRECTION (0 = uplink, 1 = downlink). Because COUNT never repeats within a key's lifetime and BEARER distinguishes bearers, the keystream is unique for every octet ever sent. The order is deliberate: on transmit integrity is computed first (so the MAC-I protects real plaintext) then ciphering is applied to data plus MAC-I; on receive the entity deciphers first, then verifies.

The rules differ by bearer type. For an SRB, integrity protection and ciphering are mandatory once security is activated โ€” signalling must never be forgeable. For a DRB, ciphering is normally applied and integrity protection is optional, negotiated per bearer (user-plane integrity, or UP IP, was newly introduced in NR and is especially relevant for low-rate industrial traffic). A failed integrity check on an SRB PDU causes PDCP to discard the PDU and report the failure to RRC. The algorithms themselves (NEA0/NEA1/NEA2/NEA3 for ciphering, NIA1/NIA2/NIA3 for integrity) and key derivation are covered on the Ciphering & Integrity Protection page.

🎯

MAC-I vs MAC (layer): the MAC-I here is a cryptographic authentication tag added by PDCP, nothing to do with the MAC layer below RLC. On integrity failure the tag mismatches and the PDU is dropped before it can do harm.

Transmit and Receive Processing Chains

Now assemble the pieces into the two step lists that TS 38.323 defines. On transmit, a PDCP entity that receives an SDU from above associates it with the next COUNT, performs header compression (if configured), performs integrity protection (if configured), then ciphering, then prepends the PDCP header, and submits the resulting PDU to the lower layer (choosing an RLC leg for split/duplicated bearers). On receive the entity runs the mirror image: it reads the header to recover the SN and reconstruct COUNT, deciphers, verifies integrity, decompresses the header, and only then applies duplicate detection, reordering and in-order delivery.

Getting the order right is the whole game: compress before you cipher (ciphertext will not compress), compute integrity before you cipher (so the tag covers real data), and add the header last so the SN travels in the clear for the receiver to read.

Transmit   (SDU from upper layer → PDU to RLC) AssociateCOUNT / SN Headercompress Integrity(add MAC-I) Cipher Add PDCPheader D/C+SN Route toRLC leg Receive   (PDU from RLC → SDU to upper layer) Read headerrebuild COUNT Decipher Verify MAC-I(else discard) Headerdecompress Duplicatedetection Reorder &deliver in order Receive is the exact reverse of transmit. Integrity is computed before ciphering; the header is added last. SDU discard (discardTimer) can drop a buffered SDU at any point before it is acknowledged.
Figure 1. PDCP transmit processing chain and its mirror-image receive chain.
💡

Order intuition: compress → integrity → cipher → header on the way down; header → decipher → verify → decompress → reorder on the way up. The SN is assigned first and read first, because everything downstream keys off COUNT.

Reordering, Duplicate Detection, Duplication and Discard

RLC below PDCP may deliver PDUs out of order โ€” especially in acknowledged mode after retransmissions โ€” so PDCP maintains a reordering window keyed on COUNT. Three state variables drive it: RX_NEXT (the next expected COUNT), RX_DELIV (the first COUNT not yet delivered upward) and RX_REORD (the COUNT that triggers the timer). When a gap appears, PDCP starts t-Reordering; if the missing PDU arrives before the timer expires, delivery resumes in order, and if the timer expires first, PDCP gives up on the gap, delivers everything it can up to the next hole, and advances its state. This is what yields in-order, duplicate-free delivery to the upper layer.

Duplicate detection falls straight out of the window: any PDU whose COUNT has already been received or delivered is silently discarded. That single mechanism removes both accidental duplicates and the deliberate duplicates created by PDCP duplication.

PDCP duplication is a reliability tool for URLLC. The transmitter submits the same PDCP PDU to two (or up to four) associated RLC entities on different cells or carriers, so a copy still arrives even if one leg fades โ€” trading spectrum for latency-free redundancy that never waits for an RLC retransmission. Duplication is turned on and off dynamically by a MAC Control Element, and the receiving PDCP simply drops the redundant copies by COUNT. It complements RLC ARQ rather than replacing it. The full activation logic and leg mapping live on the PDCP Duplication page.

SDU discard protects the transmit buffer from stale data. When an SDU arrives from the upper layer, PDCP starts its discardTimer; if the timer expires before the SDU has been confirmed delivered by the lower layer, PDCP discards the SDU (and its PDU if already built). This keeps time-sensitive traffic from piling up during congestion โ€” a voice frame that is already too old to play is better dropped than sent. When a discarded SDU has already been handed to RLC, PDCP does not reuse its SN, so a controlled gap appears in the sequence; the receiver's reordering logic and t-Reordering handle it gracefully.

🎯

Duplication vs retransmission: duplication sends copies proactively across legs for diversity and meets a hard latency budget; RLC ARQ retransmits reactively after a NACK. URLLC bearers often use both.

Split-Bearer Routing, Re-establishment and Data Recovery

Because a PDCP entity can straddle multiple RLC legs, it also owns the decision of which leg to use. For a split bearer the transmitter compares the pending uplink data volume against ul-DataSplitThreshold: below the threshold it sends only on the configured primaryPath, and above it may use both legs to spread the load. This keeps small flows on one path (avoiding needless reordering) while letting bursts exploit the full aggregate capacity of dual connectivity.

The most delicate PDCP job is preserving continuity when the radio path changes. Two closely related procedures do this:

  • PDCP re-establishment โ€” triggered by RRC (for example at handover or a key change). The entity resets header-compression state, applies the new security keys, and re-processes its buffered SDUs. For DRBs in RLC AM the transmitter re-transmits, in ascending COUNT order, every SDU not yet confirmed delivered, so nothing is lost; the receiver similarly re-processes what it holds and can issue a PDCP Status Report to tell the peer exactly which SDUs are still missing, avoiding wasteful re-sends.
  • PDCP data recovery โ€” a lighter procedure (e.g. on RLC re-establishment during dual-connectivity reconfiguration) in which the transmitter retransmits un-acknowledged SDUs without a full reset of security or compression state.

The behaviour differs sharply by bearer type and RLC mode. SRBs (always RLC AM) simply discard stored PDUs and rely on higher-layer recovery; DRBs in AM perform the lossless retransmission described above; DRBs in UM reset their state and do not retransmit, because unacknowledged-mode traffic is loss-tolerant by design. The following table summarises how each PDCP function is configured differently for signalling versus data bearers.

FunctionSRB (signalling)DRB (data)
SN size12-bit only12-bit or 18-bit
Header compressionNeverROHC and/or EHC, optional
Integrity protectionMandatory (when security active)Optional (UP IP, per bearer)
CipheringMandatory (when security active)Applied (unless NEA0)
discardTimerNot applicableConfigured per bearer
DuplicationSupported (reliability of signalling)Supported (URLLC)
Reordering (t-Reordering)YesYes
Re-establishment retransmitDiscard stored PDUsAM: retransmit un-acked; UM: reset
Status reportNoAM DRB (if configured)
📘

Lossless handover in one sentence: for an AM DRB, PDCP re-establishment plus the SN Status Transfer between gNBs lets the target retransmit exactly the SDUs the source never confirmed โ€” so a moving UE keeps its TCP session alive with no gap.

⚠ Common pitfalls / gotchas

  • HFN desynchronisation. If the two ends drift on HFN, deciphering and integrity silently fail with no explicit error — packets just stop passing. The cure is faithful SN Status Transfer at handover and correctly sized reordering windows.
  • Reordering window vs t-Reordering. Setting t-Reordering shorter than the worst-case RLC AM recovery time makes PDCP declare loss and deliver with holes; too long and it stalls the upper layer behind one missing PDU.
  • Confusing MAC-I with the MAC layer. The integrity tag is a PDCP cryptographic field, unrelated to the MAC sublayer's control elements — a classic terminology trap in logs.
  • Undersized SN on a fast DRB. A 12-bit SN on a gigabit bearer wraps constantly; if reordering delay approaches the 2048-PDU window, COUNTs alias. Use the 18-bit SN for high-throughput DRBs.
  • Assuming DRB integrity is on. UP integrity is optional and often disabled to save processing; do not assume a DRB PDU is tamper-protected unless integrityProtection was configured.
🔀

LTE ↔ NR: LTE PDCP (TS 36.323) used a 7-, 12-, 15- or 18-bit SN depending on bearer type, whereas NR simplified this to just 12 or 18 bits. NR made user-plane integrity protection (UP IP) possible on DRBs — LTE integrity-protected only SRBs. NR added EHC (Ethernet Header Compression) and native PDCP duplication as a first-class dual-connectivity/CA reliability tool, and it always delivers in order on the receive side, whereas LTE PDCP relied more on RLC for ordering. ROHC, ciphering, the COUNT = HFN+SN construction and lossless-handover retransmission carry over conceptually from LTE.

Summary

PDCP is the top of the NR L2 stack, one entity per SRB/DRB, and it converges four jobs the lower layers cannot do alone: sequence numbering, security, header compression and continuity. On transmit it associates a COUNT, compresses the header, computes integrity, ciphers, adds the D/C+SN header and routes to an RLC leg; on receive it reverses that order and then applies duplicate detection, reordering and in-order delivery.

The SN (12 or 18 bits) plus a HFN form the 32-bit COUNT that feeds ciphering, integrity and the reordering window — which is why keeping HFN synchronised, and transferring SN status at handover, is essential. SRBs always cipher and integrity-protect with a 12-bit SN and no compression; DRBs can use 18-bit SN, ROHC/EHC and optional UP integrity. And because one PDCP entity can sit above several RLC legs, it is the natural home for split-bearer routing, PDCP duplication and the lossless-handover retransmission that keeps a moving UE's sessions alive.

Quick Q&A

Q&A Quick Q&A

Q. What is COUNT and why not just use the SN?

A. COUNT = HFN + SN, always 32 bits. The transmitted SN is only 12 or 18 bits and wraps quickly; ciphering and integrity need a value that is unique for the life of the key, so the HFN extends the SN into a monotonic 32-bit counter. Both ends must keep HFN synchronised, which is why handover transfers the COUNT status.

Q&A Quick Q&A

Q. In what order does PDCP apply its transmit operations, and why?

A. Associate COUNT/SN → header compression → integrity (add MAC-I) → ciphering → add PDCP header → route to RLC. Compress before ciphering (ciphertext will not compress), integrity before ciphering (the tag must cover plaintext), and add the header last so the SN stays readable.

Q&A Quick Q&A

Q. How do SRB and DRB PDCP behaviour differ on security and compression?

A. SRBs use 12-bit SN, never do header compression, and have mandatory integrity and ciphering once security is active. DRBs can use 12- or 18-bit SN, may apply ROHC/EHC, always cipher (unless NEA0), and have optional per-bearer integrity (UP IP).

Q&A Quick Q&A

Q. What does t-Reordering do, and what happens when it expires?

A. It bounds how long PDCP waits for a missing PDU to fill a gap in the reordering window. If the gap fills first, in-order delivery resumes; if the timer expires, PDCP delivers everything up to the next gap, advances RX_DELIV, and stops waiting for the lost PDU.

Q&A Quick Q&A

Q. What is the difference between PDCP duplication and split-bearer routing?

A. Duplication sends the same PDU on multiple RLC legs for reliability (MAC-CE controlled, copies dropped by COUNT). Split-bearer routing sends different PDUs across legs to balance load, steered by ul-DataSplitThreshold against the configured primaryPath.

Q&A Quick Q&A

Q. How does an AM DRB achieve lossless handover?

A. PDCP re-establishment retransmits, in ascending COUNT order, every SDU not yet acknowledged; the SN Status Transfer tells the target which COUNTs to expect, and a PDCP Status Report lets the receiver signal what is still missing โ€” so no user data is lost across the move.

Where PDCP connects next

You now have the whole PDCP function set. Drill into the parts that make it secure and efficient, and see how they map onto the bearers and reliability features PDCP serves.