Project: diagnose five faults from signalling traces
Five recordings, one broken thing in each: find the frame that proves it, name the root cause and its owner, and write the fault report an operations centre can act on
This is the last chapter of module 3. You use what the module and the course taught: the functions and what each does, the signalling between them, the quality figures, and who owns what at each licence tier. The input is five recordings in labs/telecoms/traces/, fault-1.pcapng to fault-5.pcapng. The output is five fault reports and one summary table.
What you are given
Each trace was recorded by the lab’s own scripts/make-traces.sh from a fresh core, with one thing broken. The lab is the nameless test network, code 999/70. Kolanut, Lumora, Agbo and Ojonugwa are the story laid over it: they give each fault a customer and an engineer so that you can answer the ownership question. The lab is not Lumora’s network, and the five faults are not incidents anyone had.
Three things about the traces to hold on to:
- Time. Every time is in seconds from the start of that capture, so frame times are only comparable inside one trace. The pauses (the phone waiting between attempts, for instance) are the phone’s timers in the lab, not a live network’s behaviour.
- One fault each, found by you. The order of difficulty is yours to find. Two of the five end in the same cause number. That is deliberate, and it is the most useful thing in the project.
- No answers here. The answers are in
labs/telecoms/faults/ANSWERS.md. This chapter never says which fault is which, and you read that file only after you have written all five reports.
Nothing in this project needs the live core. Everything works from the traces with Docker and the nicolaka/netshoot:v0.13 image that ladder.sh and kpi.sh use, on any machine, including one with no SCTP. The commands run from labs/telecoms.
Who would own what
The licence tiers come from the Nigerian Communications Commission (NCC) framework for virtual operators. A Tier 1 operator (Services Virtual Operator) has its own brand, sales and distribution, and may run an SMSC, but has no switching or intelligent network and no control of numberingas of 2026-11. A Tier 2 operator (Simple Facilities Virtual Operator) adds the right to own and issue its SIM and to own and operate its equipment register, home location register, authentication centre and home subscriber server, but has no core switching or interconnect and relies on the host’s number rangesas of 2026-11. No virtual operator owns spectrumas of 2026-11. The NCC consulted on draft revised rules for virtual operators in 2026, so check the current text before relying on a tier boundary.
The mapping from those words to the lab’s functions is this course’s reading, as in module 2. In a report, use it like this.
| Part of the lab | Tier 1 (launch year) | Tier 2 |
|---|---|---|
| The cell and everything radio | Lumora | Lumora |
| AMF, SMF, UPF, PCF, NRF, SCP, NSSF, BSF | Lumora | Lumora |
| UDM, UDR, AUSF and the subscriber records | Lumora | Kolanut |
| The SIM and its keys | Lumora | Kolanut |
| The settings on a phone, and the phone | The customer’s phone; Kolanut sends the settings | The same |
Write “host” for Lumora in your reports. Two things the table does not do for you. A fault can need action from more than one party: the owner of the function that is down, and the party who must tell the customer. And the owner of a fault is the owner of the fix, not of the function that first showed the symptom. A function that rejects a request correctly is not the one at fault.
The method
A diagnosis is a chain from a symptom to a frame. Follow the same six steps on every trace, in order, and write something down at each.
- Count first. Run
scripts/kpi.sh. It tells you how many registrations and data sessions were tried, how many were accepted, and the failure causes by name. A count of zero tries is a finding too: it tells you which procedure never started. - Read the first and last lines of the ladder. The default
ladder.shview prints one line per signalling message. The last line is the last thing the core did. The first line, and the gap before the next, tell you whether anything came before the phone. Write a one-line hypothesis now, before you go deeper. You will probably be wrong, and the written line shows you later where your reading went off. - Compare with a healthy trace.
traces/attach-and-browse.pcapngis the baseline. Put the two ladders side by side and find the first line that differs: the first message that is missing, the first one that is different, or the first that comes at a strange time. The fault is at or before that line, never after it. - Widen the view around that line. The default view hides responses, directory lookups and heartbeats.
--allshows them. Cut a window of a second or so around the first differing line:scripts/ladder.sh FILE --all | awk '$1 > T1 && $1 < T2'. In a function-based core a request can fail because a function it needed was never found, and that shows only in the lookups and the answers. - Open the packet. For the one or two messages the window points at, read the fields. The command is below. The cause on a reject, the identity a request carries, and the status of an answer are all fields you cannot see in the ladder.
- Say what you would see if you were right. Before you write the root cause, state what the trace would look like if the fault were fixed, and what other evidence in this trace would also have to hold. A root cause explains every message in the capture, including the quiet ones. If one message is left over, your cause is not the whole story.
The filters you will reuse, with the ladder script and with tshark:
| To find | Filter |
|---|---|
| A registration request | nas-5gs.mm.message_type == 0x41 |
| A registration reject | nas-5gs.mm.message_type == 0x44 |
| A data-session reject | nas-5gs.sm.message_type == 0xc3 |
| The cell’s link set-up with the core | ngap.procedureCode == 21 |
| Any user-plane control between SMF and UPF | pfcp |
| One time window | frame.time_relative > 2.0 && frame.time_relative < 2.1 |
Packet detail, as in earlier chapters. Put your filter after -Y:
docker run --rm -v "$PWD/traces:/t:ro" nicolaka/netshoot:v0.13 \
tshark -r /t/fault-1.pcapng -o nas-5gs.null_decipher:TRUE -d tcp.port==7777,http2 \
-Y 'nas-5gs.mm.message_type == 0x44' -V
Replace fault-1 and the filter as you go. The -o nas-5gs.null_decipher:TRUE option makes the lab’s unencrypted messages readable. The -d tcp.port==7777,http2 option decodes the functions’ requests to each other. Add | grep -i cause to cut a long dump to the lines you want.
Two habits that matter more than any command. Never trust a cause name as a diagnosis: a reject cause is how the procedure ended in the network’s words, and a core can phrase a failure of its own as if the phone were at fault. And never stop at the first message that looks wrong; check that it is the first that is wrong.
What a healthy trace looks like
Step 3 needs the baseline in your head. In attach-and-browse, a registration runs in this order, as the earlier chapters showed (module 1’s morning project and module 2’s core project): the cell’s Registration request to the AMF; the AMF asks the authentication function, which asks the subscriber-data function, which reads the database; Authentication request and response; Security mode command and complete; the AMF reads the subscriber’s data and asks the policy function; Registration accept in the InitialContextSetupRequest; then Registration complete with the data-session request; the session management function reads subscriber data, asks for policy, and talks to the user plane over PFCP (the user-plane control protocol); and the data-session accept goes down in the PDUSessionResourceSetup. The recording takes 601 ms from Registration request to accept (scripts/kpi.sh), and 312 ms more for the data session.
Before any phone message, a lab that has been up for a while shows only housekeeping: the functions refreshing their entries in the directory and the heartbeats between the SMF and the UPF. --all shows them. The cell’s link to the AMF is made earlier still, so a recording that starts after it, like the baseline, does not contain it; a recording that starts before it does. In a fault trace, what comes before the phone matters as much as what comes after.
The report template
One file, faults.md, with one section per trace and a table at the end. Use this skeleton. Every field is filled from the trace with a command you ran.
# Fault report: fault-N
**Symptom.** What the customer or the counters would say (one sentence, no function names).
**First evidence.** Time and message of the first line that departs from the healthy trace.
**Evidence.** Two to four items, each as: time, message, what it shows, and the command that found it.
**Ruled out.** At least one thing you suspected first and why it is not the cause (a time, a message).
**Root cause.** One sentence naming the component or setting, and why it produces every message in the trace.
**Fix.** The one action that restores service.
**Owner.** Who must act at Tier 1, who at Tier 2, who is the host. Who must tell the customer.
**Confidence.** High, medium or low, and the one thing that would change your mind.
**Message to Agbo.** At most forty words, no function names, saying what the trader is told.
Then the summary, one row per trace:
| Trace | Symptom | Cause number (if any) | First departure from healthy (time) | Root cause | Owner at Tier 1 | Owner at Tier 2 |
|---|---|---|---|---|---|---|
Two rules for a report. “Evidence” is something a colleague can reproduce in a minute from your words alone. “Root cause” is a sentence about the network, not about the message: not “the AMF rejected the registration” but what made it.
Hints, one trace at a time
The hints point at where to look. They never say what you will find. Take the first of each pair when you are stuck; take the second only when you have tried for fifteen minutes.
Trace 1.
- Where to look: put its data-session lines beside the data-session lines of the baseline, from the request to the accept, and find the first line that is missing.
- If still stuck: the session management function does the same lookups in both traces. What does it need to finish a session in the baseline, and what does
--filter 'pfcp'print here?
Trace 2.
- Where to look:
kpi.shhas nothing to count. That is not an empty file. Read the defaultladder.shview: how does its first line differ from the baseline’s first line, and what must have happened before a phone could send anything? - If still stuck: open that first exchange with
-Vand compare each value the cell sends with what the core is set to serve (core/amf.yaml). Do not take the wording of the cause at face value.
Trace 3.
- Where to look: authentication and security both succeed. Find the last request the AMF sends before it rejects, then read the window after it with
--all. - If still stuck: look at the answers to that request, from whom they come, and what status they carry.
Trace 4.
- Where to look:
kpi.shcounts three tries. Read the times of the three Registration requests, then compare how far each attempt gets and where it ends with the baseline. Notice that a registration request appears twice in each attempt: once at the start, and once inside the Security mode complete. - If still stuck: open the copy inside the Security mode complete with
-V, and compare what the phone asks for with what the core is set to serve (core/amf.yaml). Which field in the request has no match?
Trace 5.
- Where to look: two of your five traces share a cause number. Pair them, then compare how far each registration gets and how long after the request each reject comes. Do not assume the same cause number means the same fault.
- If still stuck: read the first ten seconds of this trace with
--all. A lab that has been up for a while shows only heartbeats and refreshes. What is unusual here, and which component sits in the path of all those messages?
Checking your work
Read labs/telecoms/faults/ANSWERS.md only after all five reports and the table are written. Mark each report out of six:
| Points | For |
|---|---|
| 2 | The evidence: times and messages that the file’s own evidence line would also cite |
| 2 | The root cause, in a sentence that explains the whole trace |
| 1 | The fix |
| 1 | The owner at Tier 1, Tier 2 and the host |
A report that has the right cause with weak evidence scores 3 at most, because a colleague cannot check it. Where you lost points, find the frame that would have told you, and add the step you skipped to the method above. That is how a runbook gets better.
Everything here runs from the traces. The first run of ladder.sh or kpi.sh pulls the netshoot image; after that each command takes a second or two. Times are seconds from the start of each capture. Do not open faults/ANSWERS.md until step 7.
1. Take a baseline. Count and list the healthy trace, so that you know what normal looks like in both views.
cd labs/telecoms
scripts/kpi.sh traces/attach-and-browse.pcapng
scripts/ladder.sh traces/attach-and-browse.pcapng | head -12
scripts/ladder.sh traces/attach-and-browse.pcapng | wc -lsignalling connections: 1 (a phone that goes idle and comes back gets a new one)
registrations: 1/1 = 100.0% accepted, 0 rejected
time to accept: median 601 ms, 95th percentile 601 ms, max 601 ms
data sessions: 1/1 = 100.0% accepted, 0 rejected
time to accept: median 312 ms, 95th percentile 312 ms, max 312 ms
deregistrations: 1The ladder begins at 8.058 s with gNB -> AMF ... InitialUEMessage, Registration request, then the AMF’s request to the AUSF, the AUSF’s to the UDM, and the UDM’s to the UDR. In all, 51 lines in the default view. Note them in a file as your checklist: the order is the one in “What a healthy trace looks like”. One quirk, from the lab’s README: the default view can miss a request whose compressed header it cannot decode, so if the baseline looks one line short in a place, --all has it.
2. Count all five. Run kpi.sh on each and fill the first columns of your summary table: tries, accepted, rejected and the cause number.
for i in 1 2 3 4 5; do echo "== fault-$i"; scripts/kpi.sh traces/fault-$i.pcapng; doneFive blocks, no two the same. Between them you find: a trace where one thing is counted as accepted and another is counted as refused, a trace with nothing at all to count, a trace with several tries of the same procedure, and two traces that end in the same cause number with the same count. Each failure line has the cause number and its name from 3GPP (5GMM causes are in TS 24.501, 5GSM causes too). The cause name is how the procedure ended, not a diagnosis; do not copy it into “root cause”.
3. First look, and a one-line hypothesis for each. Print the first and last lines of each default ladder and write a hypothesis in faults.md now, before you look further.
for i in 1 2 3 4 5; do echo "== fault-$i"; scripts/ladder.sh traces/fault-$i.pcapng | head -2; echo " ..."; scripts/ladder.sh traces/fault-$i.pcapng | tail -4; doneFor each trace you have the time of the first signalling message and the last thing the core did. Check them against the baseline’s first line (8.058 s there; the fault traces start at different times because each capture began at a different point in its recording). The hypotheses can be wrong. The point is to write them down: in step 7 you read them back.
4. Find the first departure from healthy, trace by trace. Order the five from the one you understand best to the one you understand least, and take them in that order. For each, compare its ladder with the baseline’s. The cut -c11- removes the time column (the first ten characters), so that only the content is compared. Replace the file name with the one you are on.
diff <(scripts/ladder.sh traces/attach-and-browse.pcapng | cut -c11-) \
<(scripts/ladder.sh traces/fault-1.pcapng | cut -c11-) | head -30The diff shows < lines that the baseline has and the fault trace lacks, and > lines the other way round. Names that differ only in the identity or the session number, for instance, are noise: read for message types. A < line is something that did not happen; a > line is something that happened instead or as well. Extra attempts show up as a long run of > lines: read past them to the first < line, which is the first thing that did not happen. Write the time of that line into the report’s First evidence field. A trace where the diff is nearly the whole baseline tells you the fault is early; one where only the tail differs tells you it is late.
5. Widen the view and open the packets. For the line you found, cut a window with --all and then read the packet.
scripts/ladder.sh traces/fault-1.pcapng --all | awk '$1 > 8.0 && $1 < 8.2'
docker run --rm -v "$PWD/traces:/t:ro" nicolaka/netshoot:v0.13 \
tshark -r /t/fault-1.pcapng -o nas-5gs.null_decipher:TRUE -d tcp.port==7777,http2 \
-Y 'nas-5gs.sm.message_type == 0xc3' -V | grep -i -E "cause|Message type"The first command prints the lines of the window with responses and lookups included, one per line, with the SCP in the middle of the function-to-function traffic (* in the default view marks a request that travelled through it). Change the numbers to the window your step 4 found, for each trace. The second shows the message type and the cause line for the reject you point it at. Use the filter that fits the trace: a registration reject is 0x44 under nas-5gs.mm.message_type, the cell’s link set-up is ngap.procedureCode == 21. For each trace write down two or three evidence items: time, message, what it shows, the command.
6. Compare the two traces that share a cause number. Pair them using step 2. Call the files A and B.
A=traces/fault-X.pcapng; B=traces/fault-Y.pcapng
diff <(scripts/ladder.sh $A | cut -c11-) <(scripts/ladder.sh $B | cut -c11-) | head -20
scripts/ladder.sh $A --filter 'nas-5gs.mm.message_type == 0x41 || nas-5gs.mm.message_type == 0x44'
scripts/ladder.sh $B --filter 'nas-5gs.mm.message_type == 0x41 || nas-5gs.mm.message_type == 0x44'Put real file numbers in A and B first. The diff shows that one trace’s core did more before the reject than the other’s, and the last two commands list each trace’s Registration request and its reject. Subtract the request’s time from the reject’s to get how long each took; compare with the baseline’s 601 ms to accept. Two traces with one cause number and different shapes have two different faults: write in each report how you know, in one sentence that uses those two times.
7. Write the five reports, then check. Fill the template for every trace and the summary table, with a command behind each item of evidence. Then open faults/ANSWERS.md, mark each report out of six with the table above, and write at the bottom of faults.md: which hypothesis from step 3 you got wrong, and which frame would have shown you.
sed -n '1,200p' faults/ANSWERS.mdThe file has one section per trace: what was broken, the symptom, the evidence and the fix. Compare evidence first, then the cause, then the fix. If your evidence is different from the file’s but real (a different frame that shows the same thing), that is fine; if your cause matches and your evidence is vague, that is the weak report. The file’s times are to the millisecond and will match yours because the traces are the same files.
Break it: make a sixth fault, and swap. The five traces break five different things. A live core lets you break a sixth. This needs the live core and a machine with SCTP, so skip it if yours has none; the question below still makes a good exercise on paper.
First read faults/ANSWERS.md and pick one function that is not the subject of any of the five. Do not pick the AMF: the lab’s cell does not reconnect to a restarted AMF (README, “Things that differ from a live network”). Before you change anything, write your prediction: the last line of the default ladder, the cause number if any, and the kpi.sh counts. Then start the lab (docker compose up -d, wait 30 s, provision the subscriber as in module 2’s project), stop your chosen function with docker compose stop NAME, record the phone starting with scripts/capture.sh start sixth, docker compose --profile phone up -d --no-deps ue, wait 20 s and scripts/capture.sh stop. Keep the --no-deps: without it Compose starts any stopped service the phone depends on (the cell, the AMF and the SCP), and the function you stopped may be running again before the phone registers. Run scripts/kpi.sh captures/sixth.pcapng and scripts/ladder.sh captures/sixth.pcapng --all.
Compare with your prediction. The recorded output depends on which function you chose, and this chapter has no recorded run of a sixth fault, so check what you see against your own prediction and not against a page. Then give the capture (not your notes) to a colleague and ask for a fault report in the same template. If their root cause is not yours, the evidence in the trace is thinner than you thought, and that is the finding.
All companies and people in these examples are fictional. Any resemblance to a real business or person is unintended.