How Packet Screening Stops IP Address Spoofing in 4G Networks
End to End Explainer
- From AKA to P-GW: How 4G Packet Screening Works End to End.
- TEID, Radio Bearer and Source IP: How a 4G Network Catches Spoofed Packets.
When a UE attaches to the network, it is first authenticated through AKA, which proves its identity using the secret key in its SIM. Only after this does the network establish an IP-CAN session and assign the UE an IPv4 address and/or IPv6 prefix. The P-GW records this assignment against the session and against the GTP tunnel endpoint identifiers (TEIDs) agreed between the network nodes for that session. From then on, the UE sends its packets over its own radio bearer, which is protected by ciphering and tied to its authenticated context. The base station, without examining the UE’s IP address, forwards each packet into the GTP tunnel mapped to that bearer, so the tunnel is chosen by the network and can never be chosen by the UE. When the packet reaches the P-GW, the TEID of the tunnel tells the gateway which session the packet truly belongs to, and therefore which address or prefix was assigned to that UE. The P-GW then compares this expected address with the source address inside the packet, which is the one field the UE itself filled in. If the two match, the packet is forwarded; if they differ, it is discarded.
Consider a simple example. UE A is authenticated and assigned the address 10.1.1.5, and the P-GW records that this address belongs to the session whose uplink tunnel carries TEID 0x1234. Suppose UE A now sends a packet whose source address is 10.1.1.9, an address belonging to another subscriber, UE B. The packet travels over UE A’s own radio bearer, and the base station places it in UE A’s tunnel, TEID 0x1234. At the P-GW, the TEID reveals that the packet came from UE A’s session, for which the assigned address is 10.1.1.5. The source address in the packet, 10.1.1.9, does not match, so the P-GW discards it. UE B’s address is bound to UE B’s own tunnel, so UE A has no way to send traffic under it. In this way, packet screening ensures that each UE uses exactly the address it was assigned, and that no UE can send traffic under another subscriber’s address.