| Applicable versions | NetSim Standard | Netsim Pro |
| Applicable Releases | v13 |
In this article, we explain what happens to an IP packet as it flows through the 5G stack. This includes the addition of overheads, segmentation, aggregation etc. NetSim implements the various layers per the 3GPP standard and hence replicates the behavior of a real stack.
Given below is an example 5G network model created in NetSim. Traffic flows server to the core to gNB to UE. CBR gen rate > gNB-UE link capacity which is the bottleneck link. Hence its DL full buffer at the gNB

We use the following simulation parameters
Simulation Parameters | Values |
Tx Power (dBm) | 40 dBm |
CA Type (TDD) | Single Band (n78) |
DL:UL Ratio | 4:1 |
Channel Bandwidth (MHz) | 40 |
Tx*Rx Antenna Count | 1*1 |
Pathloss Model | 3GPP |
LOS Probability | 1 |
Outdoor Scenario | Urban Macro |
Shadow fading | Off |
Beamforming | Off |
Mobility | No Mobility |
gNB – UE Distance (m) | 1500 |
MCS Selection | Ideal Shannon Theorem |
Application Type | UDP |
Traffic | Full Buffer |
Now let us see what happens to the packet at each layer/function in the 5G stack.
The PHY parameters are
| Parameter | Value |
PRB Count | 216 |
Overheads | 14% |
Symbols per slot | 14 |
Subcarriers per PRB | 12 |
Num of Res Elements Min (156, 14*12) | 156 |
Modulation for MCS 17 is 64 QAM. Bits per symbol | 6 |
Code rate for MCS 17 is 772/1024 | 0.75 |
Bits per PRB 6*772*(1-0.14)/1024 | 604.04 |
TB size = Bits per PRB * Number of PRBs | 130,240 (after applying ciel/floor functions) |
3GPP PHY standard calculations for BG selection and CB size determination

Packet flow through the PHY (no error case)

Per the MAC TB size and per the PHY implementation details provided in the depictions above.

In summary:
Useful Resources
1. NetSim 5G library overview: https://www.tetcos.com/5g.html
2. NetSim (v13.3) 5G library documentation: https://www.tetcos.com/help/v13.3/Technology-Libraries/5G-NR.html