2G to 5G: what each generation changed
Each generation fixed the last one's bottleneck and left the old network running underneath. Switching one off is the hard part
An operator has 4G on every site and switches off 3G. A customer's phone is a 4G handset that supports VoLTE, but the operator has not provisioned VoLTE for that customer's SIM. What happens when the customer makes a voice call?
A mobile network is not replaced when a new generation arrives. The new network is built beside the old one, shares its sites and, for years, its subscribers. Each generation answered one bottleneck of the last. If you know the bottleneck, you can predict what the operator had to buy and what stayed behind.
This chapter walks the five generations in order, then lines the 4G core up against the 5G core function by function. In the lab you read the real function names and the real signalling in the course’s 5G core and match each to the 4G interface it replaced.
2G: GSM made voice digital, and gave the world the SIM
First-generation networks were analogue and national: a phone worked on one operator’s network and was heard by anyone with a scanner. GSM (Global System for Mobile Communications, a European standard whose first commercial networks started in 1991) fixed three things at once: digital voice, the SIM card with authentication, and a standard that let a phone work abroad.
The design problem was voice, so the core is circuit-switched. A call reserves a fixed channel from one end to the other for as long as it lasts. The parts, which you will meet again in later modules:
- BTS and BSC. The base transceiver station is the mast’s radio. The base station controller manages many BTSs, hands calls between them and allocates radio channels.
- MSC and VLR. The mobile switching centre sets up and routes calls. The visitor location register holds a temporary copy of the records of phones currently in its area.
- HLR and AuC. The home location register is the permanent subscriber database: who you are, what you may use, which MSC you are under. The authentication centre holds each SIM’s secret key and makes the challenges that prove a SIM is genuine.
- SMSC. The short message service centre stores and forwards text messages.
Data in 2G was an afterthought: a circuit-switched data call at 9.6 kbit/s, billed by the minute. Texting worked because it used the signalling channels that were already there.
GPRS and EDGE: packet data bolted on
By the late 1990s people wanted email and the web. Holding a circuit open for a page that you read for a minute wastes a channel the operator could sell to a caller. GPRS (General Packet Radio Service, often called 2.5G) shares radio timeslots between users, sending data in packets only when there is something to send.
The operator did not replace the core. It added two nodes beside it. The SGSN (serving GPRS support node) does for packet data what the MSC does for voice: it tracks where the phone is and manages its session. The GGSN (gateway GPRS support node) is the exit to the internet and gives the phone its IP address. The HLR gained packet subscription data. The BSC gained a packet control unit. Voice kept using the MSC.
GPRS’s theoretical maximum is 171.2 kbit/s (eight timeslots at 21.4 kbit/s with the least protective coding scheme); real rates are a fraction of that. EDGE raised the modulation on the same radio and the same core, for a theoretical 473.6 kbit/s (eight slots at 59.2 kbit/s). These numbers are the standards’ design peaks under ideal radio conditions, not what a customer measured at the back of a market stall.
3G: WCDMA and more data, with the circuit core still there
3G (UMTS, in 3GPP Release 99 and later) changed the radio. Every user transmits over the same wide 5 MHz carrier, separated by codes, rather than in timeslots. The radio network got new names: the NodeB is the base station and the RNC (radio network controller) replaced the BSC. The core did not change shape. The MSC still carried voice over an Iu-CS interface and the SGSN and GGSN still carried data over Iu-PS.
Rates climbed in steps within the 3G family. Release 99 typically topped out at 384 kbit/s per user. HSDPA (high-speed downlink packet access, Release 5) raised the headline theoretical peak to 14.4 Mbit/s. HSPA+ with MIMO or two carriers reached a theoretical 42 Mbit/s in later releases. Many people’s mobile broadband for a decade was 3G, and in many markets it still is.
What the operator had to buy: new radio equipment at every site, a new radio controller layer, new spectrum (UMTS was first deployed in new bands), and a new licence fee in many countries. The circuit core stayed.
4G: all IP, and voice becomes data
3G’s data had to cross a hierarchy built for circuits, through several nodes on the way, and voice and data lived in different cores. LTE (Long Term Evolution) and its core, the EPC (Evolved Packet Core), in Release 8 (frozen in 2008), made the whole network IP.
- The base station became the eNodeB, with the radio controller’s logic folded into it. There is no RNC.
- The MME (mobility management entity) handles registration, authentication and paging, over the S1-MME interface to the radio.
- The SGW (serving gateway) anchors the user’s tunnel while the phone moves between cells.
- The PGW (packet data network gateway) is the exit to the internet. It gives the phone its IP address and enforces policy.
- The HSS (home subscriber server) replaced the HLR and AuC; the MME reaches it over Diameter on the S6a interface.
- The PCRF (policy and charging rules function) decides the speed and priority of a session and talks to the PGW over Diameter on Gx.
LTE’s design peak in Release 8 is 300 Mbit/s downlink on a 20 MHz carrier with four antennas on each side, a figure no phone in a crowded cell sees. The real change is structural. There is no circuit-switched core, so there is no circuit-switched voice. A voice call on 4G is VoLTE: a SIP call over the IP session, handled by an IMS (IP Multimedia Subsystem). A phone without an IMS registration uses circuit-switched fallback: it leaves 4G, camps on 2G or 3G for the call, and returns. That is the mechanism behind the Predict question and behind every 2G and 3G switch-off plan: you cannot turn the old layers off until voice works on 4G for every handset in use.
What the operator had to buy: a new core (the EPC), an IMS if it wanted voice, a policy system, and, for the first time, a core that was IP routers and servers more than telephone switches.
5G: a core made of services
The 4G core’s pieces are boxes joined by fixed point-to-point interfaces, each with its own protocol: S1-AP to the radio, GTPv2 between the SGW and PGW, Diameter to the HSS and PCRF. Adding a feature meant a new interface. The 5G core, in Release 15 (the first 5G release; the non-standalone version was approved in December 2017 and standalone in June 2018), replaces that with a service-based architecture. Each function is a service that registers itself in a directory, the NRF, and calls others over HTTP/2 with JSON, through a proxy, the SCP. You saw this in the first chapter of the course; here you use it to find the 4G functions inside it.
There are two ways to run 5G radio. Non-standalone (NSA) puts a 5G carrier beside a 4G one and still uses the EPC for the core, so the first 5G phones sold for the speed and not for any new core. Standalone (SA) pairs the 5G radio with the 5G core. Only standalone carries the features 5G was designed for: network slicing (separate logical networks with their own policy, on shared equipment) and low-latency services. The lab is standalone.
The design targets for 5G in the ITU’s IMT-2020 vision (Recommendation ITU-R M.2083) include a 20 Gbit/s peak rate, a 100 Mbit/s user-experienced rate, radio latency as low as 1 ms for the most demanding uses and a million connected devices per square kilometre. They are targets for a fully built-out network. A real site delivers some of them in some places, depending on spectrum and equipment.
The two cores side by side
| Job | 4G (EPC) | 5G (core) |
|---|---|---|
| Radio | eNodeB | gNB |
| Radio to core signalling | S1-AP (S1-MME) | NGAP (N2) |
| Registration, authentication, paging, mobility | MME | AMF |
| Session setup and the phone’s IP address | MME and PGW control part | SMF |
| Carrying the user’s packets | SGW and PGW user plane | UPF |
| Subscriber data and keys | HSS | UDM and UDR |
| Checking the authentication response | in the HSS and MME | AUSF |
| Policy (speed, priority) | PCRF | PCF |
| Which policy function serves a session | a Diameter routing agent | BSF |
| Finding the other functions | configuration | NRF |
| Function-to-function proxy | none | SCP |
| Network slice choice | none | NSSF |
| Voice | IMS (VoLTE) or fallback to 2G or 3G | IMS (VoNR) or fallback to 4G |
Two of those rows are not a one-to-one swap. The MME’s two jobs became two functions, which is the point of the service-based design: the AMF can scale with the number of phones attached and the SMF with the number of sessions. And the split of the user plane from the control plane, which in 4G arrived late (CUPS, in Release 14), is native in 5G. The UPF takes its instructions from the SMF over the N4 interface, which uses PFCP (the Packet Forwarding Control Protocol), the same protocol CUPS gave to the 4G gateways.
Switching old generations off
The oldest layer stays longest. A 2G phone costs very little, a 2G module costs less, and a feature phone on 2G is for hundreds of millions of people the only handset they can pay for. 2G also carries a thing that 4G cannot supply on the same terms: USSD (unstructured supplementary service data), the session-based *123# menus that a feature phone uses for balance checks and mobile money. USSD rides on the signalling of the voice core, so it works on any handset and needs no data plan or app.
An operator weighing a switch-off asks four questions in this order. How much traffic and revenue remain on the layer? Which handsets cannot fall forward (no 4G radio, or no VoLTE)? Which non-phone devices depend on it, such as payment terminals, trackers, meters and alarms? And what spectrum does the switch-off free, and what does re-using it for 4G or 5G earn? The last answer drives the plan. The first three set its date.
Whether a given country is switching 2G or 3G off, and when, changes; check the current plans of the regulator and operators for the market you work in. The GSMA’s Mobile Economy report for the region gives the current share of connections by technology.
The lab’s core and its ancestors
The gradiant/open5gs:2.7.2 image the lab uses carries the whole Open5GS suite, 4G and 5G. The lab’s compose.yaml starts only the 5G functions. That lets you list both generations from one directory and sort them into the table above.
Work from labs/telecoms. Nothing here needs the core to run; it is all files and traces, so it works on a machine with no SCTP.
1. List what the image carries.
docker run --rm --entrypoint ls gradiant/open5gs:2.7.2 /opt/open5gs/binSeventeen programs, one per network function:
open5gs-amfd
open5gs-ausfd
open5gs-bsfd
open5gs-hssd
open5gs-mmed
open5gs-nrfd
open5gs-nssfd
open5gs-pcfd
open5gs-pcrfd
open5gs-scpd
open5gs-seppd
open5gs-sgwcd
open5gs-sgwud
open5gs-smfd
open5gs-udmd
open5gs-udrd
open5gs-upfdThe d is for daemon. Notice what is not there: no pgw program, no sgsn, no msc. Open5GS runs the 4G PGW’s control and user parts as smfd and upfd, the same programs as in 5G.
2. Sort them. Copy this table into a file generations.md and put each program in a column (some go in two):
| Program | 4G role | 5G role |
|---|---|---|
mmed |
||
hssd |
||
sgwcd, sgwud |
||
pcrfd |
||
amfd, smfd, upfd |
||
ausfd, udmd, udrd, pcfd |
||
nrfd, scpd, nssfd, bsfd, seppd |
Use the table in this chapter. Expected: mmed, hssd, sgwcd, sgwud, pcrfd are 4G only. amfd, ausfd, udmd, udrd, pcfd, nrfd, scpd, nssfd, bsfd are 5G only. smfd and upfd are both: PGW-C and PGW-U in 4G, SMF and UPF in 5G. seppd is the security edge proxy that protects 5G traffic between two operators when roaming; it is 5G only, and the lab does not use it.
3. See which of them the lab runs.
docker compose config --services | sort | tr '\n' ' 'amf ausf bsf gnb internet mongo nrf nssf pcf scp smf udm udr upf. Fourteen services: eleven are the 5G functions above, plus the cell (gnb), the database (mongo) and the web server standing in for the internet. Every 4G-only program is missing. With the phone, docker compose --profile phone config --services adds ue.4. Read the 5G signalling and name the 4G interface. The registration and session set-up in the reference trace is a set of function-to-function requests. Count them by service:
scripts/ladder.sh traces/attach-and-browse.pcapng | grep -o '/n[a-z]*-[a-z-]*/v[0-9]' | sort | uniq -c | sort -rn 8 /nudr-dr/v1
6 /nudm-sdm/v2
3 /nsmf-pdusession/v1
2 /nudm-ueau/v1
2 /npcf-smpolicycontrol/v1
2 /npcf-am-policy-control/v1
2 /nbsf-management/v1
2 /nausf-auth/v1
1 /nudm-uecm/v1
1 /namf-comm/v129 requests for one registration, one data session and a deregistration. The ladder also shows 14 NGAP messages between the cell and the AMF and 6 PFCP session messages between the SMF and the UPF (three requests, each with a response; the raw trace also holds PFCP heartbeats, which the ladder hides). The counts are the same on every machine because you are reading a recorded file.
For each service, write the 4G interface that did the same job:
| 5G service | What it does in the trace | 4G equivalent |
|---|---|---|
nudm-ueau |
Fetches an authentication vector for the SUCI | S6a, Authentication-Information-Request to the HSS (Diameter) |
nudm-sdm |
The AMF reads the subscription (access and mobility data, SMF selection data, session data) | S6a, the subscriber data returned in Update-Location-Answer |
nudm-uecm |
The SMF removes its registration as the phone’s serving SMF when the session ends (a DELETE at the end of the trace) | Part of S6a registration; the 4G PGW had no registration of its own |
nudr-dr |
The UDM and PCF read the database | None across the network: inside the HSS or the PCRF, the database was not an interface. This is the 5G split of function from data |
npcf-smpolicycontrol |
The SMF asks for the session’s policy | Gx (Diameter) between PGW and PCRF |
npcf-am-policy-control |
The AMF asks for access policy | No equivalent in the 4G core |
nsmf-pdusession |
The AMF asks the SMF to create or release a session | S11 (GTPv2-C) between the MME and SGW |
namf-comm |
The SMF hands the AMF the messages for the phone and the cell | Inside the MME, or S11 |
nausf-auth |
The AMF asks the AUSF to run and check the authentication | None: the MME and HSS did it between them |
nbsf-management |
The PCF records which policy function owns the session | None in the EPC; Diameter routing agents did a similar job |
The N4 messages (PFCP Session Establishment, Modification, Deletion) correspond to the Sxa and Sxb interfaces of a 4G core with control and user plane separated. NGAP corresponds to S1-AP. The NAS messages, Registration request and the rest, correspond to the 4G EMM messages (Attach request and the rest).
5. Find what has no 4G equivalent. Print the first lines of the ladder:
scripts/ladder.sh traces/attach-and-browse.pcapng | head -4 | cut -c1-170 8.058 gNB -> AMF NGAP/NAS-5GS InitialUEMessage, Registration request
8.073 AMF -> AUSF* HTTP2 POST /nausf-auth/v1/ue-authentications
8.108 AUSF -> UDM* HTTP2 POST /nudm-ueau/v1/suci-0-999-70-0000-0-0-0000000001/security-information/generate-auth-data
8.135 UDM -> UDR* HTTP2 GET /nudr-dr/v1/subscription-data/imsi-999700000000001/authentication-data/authentication-subscriptionLook at line three. The identifier suci-0-999-70-0000-0-0-0000000001 is the phone’s concealed identity (SUCI): type 0 (an IMSI), mobile country code 999, network code 70, routing indicator 0000, protection scheme 0 (the null scheme, so the IMSI digits 0000000001 are readable), home network key id 0. In 4G a phone with no temporary identity sent its IMSI in the clear in the Attach request, and anyone listening could read it; in 5G a live SIM encrypts it with the home network’s public key. The lab uses scheme 0, one of the five differences listed in the lab’s README. The * after AUSF, UDM and UDR is the second thing 4G did not have: the request was sent through the SCP, not straight to the function. Run scripts/ladder.sh traces/attach-and-browse.pcapng --all | head -30 to see each request twice, once to the SCP and once from it.
Lumora Mobile has 4G on every site and 3G on most. A fifth of its sites need a costly repair of their 3G equipment this year. Chukwuma proposes switching 3G off in the cities and keeping 2G for voice and USSD everywhere. Dimeji points out that 11 per cent of voice calls on a recent weekday used circuit-switched fallback because the customer's SIM had no VoLTE profile, and that an unknown number of payment terminals and trackers use 3G modules. What does Lumora do first?
- DOC 3GPP specification TS 23.501: System architecture for the 5G System
The definition of every 5G core function in the table, with the service names (Namf, Nsmf, Nudm) you read in the trace. Read clause 4.2 (the architecture) and the list of network functions; skip the detailed procedures. Read: clause 4.2, clause 6.
- DOC 3GPP Releases
3GPP's list of releases. Use it to see where Release 99, 8 and 15 sit and to check the release dates quoted in this chapter.
- DOC Recommendation ITU-R M.2083: IMT Vision, framework and overall objectives of the future development of IMT for 2020 and beyond
The ITU's vision for 5G (IMT-2020) and its key capabilities. Read the capabilities section and notice that these are targets for the system, not a user's guarantee.
- DOC The Mobile Economy Sub-Saharan Africa 2024 GSMA
The industry body's regional report; check for a newer edition. Look for its figures on connections by technology to see the share of 2G, 3G, 4G and 5G where you work; skip the economic sections.
- POST Ending 3G service sparks fears of an alarmaggedon Axios, 2022
A news account of the AT&T switch-off in the Why: who was affected and who asked for a delay. A press report, not a regulator's finding, so use it for the story and go to the regulator's notices for rules.
- DOC Open5GS documentation
The open-source core the lab runs. The project builds both the 4G (EPC) and 5G functions, which is this chapter's table as running software. Start with the quickstart.
All companies and people in these examples are fictional. Any resemblance to a real business or person is unintended.