Hello, everyone!
Today, I will write about encapsulation and decapsulation in the PON system. This is the last article about access network evolution and application.
Encapsulation and decapsulation are the processes that are performed on data that enters the PON system. In Figures 1 and 2, we see the encapsulation and decapsulation processes in the PON system. There are 3 steps for upstream and 4 steps for downstream.
Upstream
Step 1. A PC is connected to the ONU device, which generates Ethernet frames. These Ethernet frames enter the ONU.

Figure 1. Upstream
Step 2. In an ONU device, the Ethernet frames are encapsulated in PON frames (the GEM frame header is added to the Ethernet frame).
GEM (GPON Encapsulation mode) header has 5 bytes, it has four fields:
PLI – this field has 12 bits, and indicates the payload size.
Port ID – this field is used to recognize GEM port IDs. It has 12 bits.
PTI – it has 3 bits, and indicates payload type,
HEC – it is an abbreviation from Header Error Control, it has 13 bits.
After encapsulation, the ONU converts the signals - electrical signals into optical signals.
Step 3. The OLT receives the optical signal, converts it into an electrical signal. Then, the OLT does the decapsulation and gets the Ethernet frame.
Downstream
Step 1. Two or more PCs send Ethernet frames because they want to communicate. After that, OLT receives these Ethernet frames.

Figure 2. Downstream
Step 2. OLT received two or more Ethernet frames. OLT adds different GEM frame headers on these Ethernet frames. It is the downstream frame. Then, OLT converts electrical signals into optical signals.
Step 3. ONU receives the downstream frame. ONU has a PON ID filter, and it filters and extracts his GEM frame.
Step 4. The last step is the decapsulation process. ONU restores Ethernet frames, adds a preamble, and sends it to PC.
This is the end of this topic. I hope you have learned something new.
Thank you.

