You’re in a mountain valley, the view is perfect, and you snap a photo of the peaks. You pick your friend’s name and press Send. One tap and it’s gone. Simple, right?
Not quite. In that instant your phone chops the photo into small pieces called IP packets (IP is the Internet Protocol). Then every packet travels down through five processing layers before it reaches the antenna. Each layer speaks its own language, its protocol. Stack the layers up, and you get a protocol stack.
I like to picture those layers as a crew of five workers inside your phone, running a tiny parcel company. My new video lecture follows one packet through their hands; this post is the written tour. Ready to meet the crew?
Rather watch the crew at work? Here is the video lecture:
Five workers, one stack
Here they are, from top to bottom: SDAP, PDCP, RLC, MAC and PHY. Don’t let the names scare you: I’ll unpack each one when we meet its worker. The bottom worker, PHY (short for physical layer), is Layer 1. He turns bits into radio waves. The four above him form Layer 2, as the 5G standard TS 38.300 lists them. Those four are today’s heroes.
How do they work together? Like a well-run parcel company. Each worker does one job, then hands the parcel to the colleague below.
But the crew in your phone is only half the company.
Every worker has a twin
Here is the key picture. Each worker has a twin on the other side of the radio link, inside the base station (the equipment behind your cell tower). Whatever a worker does to your packet in the phone, the twin undoes in the base station. One twin locks, the other unlocks. One cuts, the other glues.
Think of a parcel inside a parcel inside a parcel. In your phone, each worker wraps one more box around the packet and sticks a label on it, the header. In the base station, each twin opens its own box, and only its own, in reverse order. At the top, the original packet comes out exactly as it went in.
Jargon nugget: the input that a worker receives is called an SDU (Service Data Unit), and the output is called a PDU (Protocol Data Unit).
Now let’s follow one packet down the stairs. First stop: security.
PDCP: the security officer with three tricks
I’ll save the top worker, SDAP, for the end. Her talent shows only when two kinds of traffic meet. So our packet lands first with PDCP (Packet Data Convergence Protocol), and he has three tricks.
Trick one: shrink the label. At the front of every packet sits an IP header. It is the address label: who sends, who receives. From packet to packet that label hardly changes, so why ship it again and again? PDCP sends the full label a few times, then only the values that changed. We call this robust header compression (ROHC).
Trick two: lock it. Your packet is about to fly through open air, where anyone with the right receiver can catch it. So PDCP scrambles it with a secret key that only your phone and the base station know. Engineers call this ciphering. Picture a locked suitcase, and only the twin holds the key.
Trick three: seal it. A lock stops readers, but someone could still flip bits in the air. So PDCP can add a 4-byte check value, computed from the packet and a secret key. The twin has the same secret key, so he computes the check value again from the packet that arrived. If the value he computed doesn’t match the value he received, somebody tampered with the packet, and the twin throws it away. This is integrity protection, a tamper-evident seal on the suitcase.
Locked and sealed, the packet moves one step down.
RLC: the carpenter who cuts to fit
RLC (Radio Link Control) asks a practical question: how much of this packet can we send right now? You see, in 5G your phone doesn’t decide. The base station decides when your phone may send, and how much. Picture that allowance as an empty container, which the base station tosses over to your phone.
Is the container too small for our packet? Then RLC saws off a piece that fits and sends that piece now. The rest of the packet waits with RLC for the next container. On the other side, RLC’s twin glues the pieces back together.
But what if the container is bigger than our packet?
MAC: the packer at the loading dock
Then MAC (Medium Access Control) steps in, because filling the container is his job. He pulls several packets from RLC, one after another. Remember, the rest of your photo queues right behind our packet. RLC cuts only the last packet, and only if it doesn’t fit. Nothing else to send? Then MAC fills the unused space with padding bytes.
The packed container has an official name: the transport block. And who sets its size? The base station decides that too. (How? My post on link adaptation tells that story.) MAC hands the transport block down to PHY. PHY turns its bits into a radio signal, and off it flies. Or does it?
What if the air garbles the packet?
Air is not a cable. Noise and interference get in the way, and sometimes the base station cannot decode a transport block. What now?
The base station does not throw the noisy copy away. It asks for the block again, and MAC in your phone has kept a copy for exactly this moment. Then the base station combines the two noisy copies. It’s like laying two faint photocopies of the same page on top of each other: suddenly the letters are readable.
Repeating plus combining: that mix is why engineers call it Hybrid Automatic Repeat Request, or HARQ.
RLC’s retry is simpler than MAC’s: no noisy copies, no combining. He just asks again. That is plain Automatic Repeat Request, or ARQ.
And if RLC gives up too? Then TCP (Transmission Control Protocol) takes over, a protocol far above our stack that watches the whole journey. TCP is the customer of our parcel company. After delivery it checks the complete order, and asks again for anything missing.
See the pattern? The higher the worker, the slower the retry.
One worker is still waiting for her turn.
SDAP at last: who goes first?
Suppose you are on a voice call while the photo uploads. Now two streams of packets share your phone, and they are not equally patient. A voice packet can’t wait: 5G’s rulebook budgets just 100 milliseconds of delay for it (TS 23.501). The photo can. We call each stream a Quality-of-Service flow, or QoS flow.
So your phone builds a second path just for voice, with a second PDCP and a second RLC. Each path is called a radio bearer. This is where SDAP (Service Data Adaptation Protocol) comes in. Think of her as the check-in receptionist at an airport, who puts every bag on the right conveyor belt. Photo packets go on one belt, voice packets on the other.
At the end of the belts stands MAC, who loads bags from all the belts into one container. He reaches for the voice belt first, because it has the higher priority.
The 5G stack in one breath
- SDAP sorts packets onto radio bearers, by their QoS flow.
- PDCP protects: shrinks the label, then seals and locks the packet.
- RLC resizes: cuts packets to fit, and resends what went missing.
- MAC merges all bearers into one transport block, pads it, and retries fast with HARQ.
- PHY turns the transport block into radio waves.
- Each worker has a twin in the base station that undoes the work.
That’s the whole journey, from the Send button to the antenna. (Curious what PHY does next? My post on how 5G builds its signal picks up right there.)

Leave a Reply