Retrieve UE Context over Xn: RRC Resume, Message by Message

Reading a small XnAP-over-SCTP capture that shows the inter-gNB half of RRC Connection Resume: a UE waking from RRC_INACTIVE at a new cell, and the target gNB reaching over the Xn interface to pull the UE's suspended context from the gNB that still holds it. The trace was decoded and annotated with VisualEther, which turns a Wireshark PCAP into a sequence diagram.

💡 Read the walkthrough and the diagram side by side. Open the interactive diagram (or PDF) in a split-screen window so the captions stay in view as you read. In Edge, Chrome, or Firefox, right-click the link and pick your browser's split-screen option (Edge labels it "Open link in split screen window"). On macOS, prefer Chrome or Firefox — Safari has no in-browser split screen. Otherwise, open the diagram in a new tab and snap the two windows side by side.

Overview

This is a compact 5-frame capture of the Xn interface — the direct link between two 5G NG-RAN nodes — carrying the inter-gNB signaling behind RRC Connection Resume. When a UE that was parked in RRC_INACTIVE reappears in a different cell and requests to resume, the new gNB has no knowledge of the UE's state. It uses the identity in the resume request to find the anchor gNB — the one that suspended the UE and still holds its context — and fetches that context over Xn. That fetch is the Retrieve UE Context procedure, and this capture is all five of its messages plus the Xn bring-up that precedes them.

As with the EN-DC SgNB Addition capture, both gNBs here live on 127.0.0.1, distinguished only by SCTP port — a single-machine loopback capture rather than a trace of two nodes over a real Xn link. Several of its values are trivial (a 0x000000 I-RNTI, a 0x0001 MAC-I), so read it for the shape of the procedure — which identities and keys move between the nodes — rather than for realistic field values.

Every step is visible in the packets. In the interactive viewer or the HTML sequence diagram above, click any message to open its parameter details and the complete Wireshark field tree for that frame.

A primer on RRC_INACTIVE and Xn

5G adds a third RRC state between the familiar IDLE and CONNECTED: RRC_INACTIVE. A UE with no traffic can be suspended rather than released — the gNB keeps the UE's access-stratum context and hands the UE an I-RNTI, a token that identifies that stored context. When the UE has data again, it performs RRC Resume: a lightweight return to CONNECTED that reuses the saved context instead of setting everything up from scratch.

The wrinkle is mobility. The UE may resume at a cell served by a different gNB than the one that suspended it. Resolving that is the job of the Xn procedure in this trace.

PieceRole in one lineWhat you'll see in the trace
gNB-1New / target node — where the UE resumesInitiates on SCTP port 38430; sends Retrieve UE Context Request
gNB-2Old / anchor node — holds the suspended contextResponder on port 38422; returns the UE context
XnAPThe application protocol spoken over XnXn Setup, Retrieve UE Context Request / Response / Confirm
I-RNTIToken that names the stored contextCarried in the UEContextID
shortResumeMAC-IToken that authenticates the resumeRecomputed and checked by the anchor

Two ideas carry the whole flow:

The I-RNTI is a pointer; the shortResumeMAC-I is a signature. The UE's RRCResumeRequest (sent over the air to gNB-1, before this capture opens) carries both. The I-RNTI tells gNB-1 which node holds the context and which context it is; the shortResumeMAC-I is a token that the UE computes from its stored keys, so the anchor can prove the resume request is genuine before releasing anything.

Resuming forward-secures the keys. The context handed back includes a NextHopChainingCount (NCC) and a next-hop key (K_NG-RAN*). The target derives fresh AS keys for the resumed connection from these — vertical key derivation — which provides forward security: the new cell cannot read traffic that the UE exchanged before the resume.

The flow at a glance

The 5 frames fall into two phases. The interactive diagram shows every arrow.

  1. Xn interface bring-up (frames 1–2) — Xn Setup Request / Response, non-UE-associated, so the nodes know each other's served cells.
  2. Retrieve UE Context (frames 3–5) — Request, Response, and Confirm: gNB-1 fetches, authenticates, and takes over the UE's context.

But the capture is only the Xn leg of a larger procedure. RRC Resume begins over the air — the UE sends an RRCResumeRequest to the target gNB — and finishes over the air, when that gNB answers with RRCResume; the core-network path switch and the release of the context at the anchor still follow. This capture holds only the three Xn messages in the middle. Here is the whole flow, with the captured frames marked:

sequenceDiagram accTitle: RRC Connection Resume end to end across Uu, Xn and NG accDescr: Before the capture, the anchor gNB-2 suspended the UE to RRC_INACTIVE and issued an I-RNTI. The UE resumes at target gNB-1 by sending an RRCResumeRequest over the air carrying the I-RNTI and shortResumeMAC-I. gNB-1 fetches the suspended context from gNB-2 over Xn with the Retrieve UE Context Request, Response, and Confirm — the three messages in this capture. gNB-1 then sends RRCResume to the UE; the UE replies with RRCResumeComplete, gNB-1 switches the NG-U path toward the 5G core with a Path Switch Request and Acknowledge, and finally tells gNB-2 to release the UE context over Xn. participant U as UE participant G1 as gNB-1 (target) participant G2 as gNB-2 (anchor) participant C as 5GC (AMF / UPF) Note over U,G2: UE suspended to RRC_INACTIVE by gNB-2, I-RNTI issued (before capture) U->>G1: RRCResumeRequest (I-RNTI, shortResumeMAC-I) — Uu Note over G1,G2: Retrieve UE Context over Xn — frames 3–5, this capture G1->>G2: Retrieve UE Context Request (I-RNTI, shortResumeMAC-I) G2->>G1: Retrieve UE Context Response (NCC, K_NG-RAN*, PDU session) G1->>G2: Retrieve UE Context Confirm (Old + New UE XnAP ID) G1->>U: RRCResume — Uu U->>G1: RRCResumeComplete — Uu G1->>C: Path Switch Request — NG C->>G1: Path Switch Request Acknowledge — NG G1->>G2: UE Context Release — Xn Note over U,C: UE back in RRC_CONNECTED at gNB-1, data path switched to the core
RRC Connection Resume end to end — where the Xn Retrieve UE Context exchange fits. Before the capture, the anchor gNB-2 suspended the UE to RRC_INACTIVE and issued an I-RNTI. The UE resumes at the target gNB-1 with an RRCResumeRequest over the air (Uu); gNB-1 fetches the stored context from gNB-2 over Xn — the three messages in this capture (frames 3–5) — then completes the resume to the UE over the air and switches the data path toward the 5G core (NG). Only the Xn Retrieve UE Context exchange is in the capture; the Uu and NG messages are shown for context.

The procedure advances the UE's RRC state machine — from suspended, back to connected — with the Xn exchange doing the work under the hood:

stateDiagram-v2 accTitle: RRC state journey across an inter-gNB resume accDescr: The UE moves from RRC_CONNECTED to RRC_INACTIVE when suspended, then back to RRC_CONNECTED when it resumes at a new cell, with the target gNB retrieving the UE context over Xn to complete the resume. [*] --> RRC_CONNECTED RRC_CONNECTED --> RRC_INACTIVE: suspend (I-RNTI issued) RRC_INACTIVE --> RRC_CONNECTED: resume at new cell note right of RRC_INACTIVE: Context held at anchor gNB-2 note right of RRC_CONNECTED: Target gNB-1 fetches context over Xn
The UE's RRC state journey. The UE was suspended to RRC_INACTIVE (before the capture) and resumes at a new cell; the Xn Retrieve UE Context exchange (frames 3–5) fetches the stored context so the target gNB can complete the resume to RRC_CONNECTED.

Now the same story, frame by frame.

Phase 1 — Bringing up the Xn interface (frames 1–2)

sequenceDiagram accTitle: Phase 1 — Xn Setup accDescr: gNB-1 sends an Xn Setup Request advertising its served-cell configuration, and gNB-2 answers with an Xn Setup Response carrying its own, bringing the Xn interface up before any UE-associated signaling. participant G1 as gNB-1 (:38430) participant G2 as gNB-2 (:38422) G1->>G2: Xn Setup Request (served-cell config) G2->>G1: Xn Setup Response (served-cell config) Note over G1,G2: Xn interface up — UE-associated signaling can follow

Frame 1 — Xn Setup Request (non-UE-associated). gNB-1 opens the Xn association by advertising its served-cell configuration, so the peer knows what it is talking to before any UE signaling:

AttributeValue
PLMN260402
gNB ID1
NR-PCI1
TAC11
Slice (S-NSSAI)SST 10 / SD 0x203040

Frame 2 — Xn Setup Response. gNB-2 accepts and returns its own served-cell info. Because this is a loopback lab capture, its advertised gNB ID (1), NR-PCI (1), and PLMN (260402) mirror gNB-1's exactly — expected for a symmetric pairing on one host, not a real deployment where the two cells would be distinct. With this exchange, the Xn interface is up; everything from frame 3 on is UE-associated signaling over it.

Phase 2 — Retrieving the UE context (frames 3–5)

sequenceDiagram accTitle: Phase 2 — Retrieve UE Context accDescr: gNB-1 sends a Retrieve UE Context Request carrying the I-RNTI and shortResumeMAC-I; gNB-2 authenticates it and returns the full UE context including the security context and PDU session; gNB-1 confirms, binding both UE XnAP IDs. participant G1 as gNB-1 (:38430) participant G2 as gNB-2 (:38422) G1->>G2: Retrieve UE Context Request (I-RNTI, shortResumeMAC-I) G2->>G1: Retrieve UE Context Response (context: NCC + K_NG-RAN*, PDU session) G1->>G2: Retrieve UE Context Confirm (Old + New UE XnAP ID) Note over G1,G2: Context taken over — resume can complete over the air

Frame 3 — Retrieve UE Context Request. A UE has sent an RRCResumeRequest to gNB-1 (the new / target node). Using the I-RNTI from that request, gNB-1 locates the anchor node — gNB-2, which still holds the suspended context — and asks for it. The key contents:

Here is that request as its fully decoded packet — click any layer to drill in (xnap is open to the message; expand UEContextIDrRCResume for the I-RNTI, and the MAC-I IE for the shortResumeMAC-I discussed above):

🔎 [00003] Frame 3 RetrieveUEContextRequest 2024-10-13T23:03:59.654296Z 📡 gNB-1 (:38430) 📡 gNB-2 (:38422)
frame : Frame 3: Packet, 106 bytes on wire (848 bits), 106 bytes captured (848 bits)
Encapsulation type : Ethernet (1)
Arrival Time : Oct 13, 2024 16:03:59.654296000 Pacific Daylight Time
UTC Arrival Time : Oct 13, 2024 23:03:59.654296000 UTC
Epoch Arrival Time : 1728860639.654296000
Time shift for this packet : 0.000000000 seconds
Time delta from previous captured frame : 6.971000 milliseconds
Time delta from previous displayed frame : 6.971000 milliseconds
Time since reference or first frame : 15.518000 milliseconds
Frame Number : 3
Frame Length : 106 bytes (848 bits)
Capture Length : 106 bytes (848 bits)
Frame is marked : False
Frame is ignored : False
Protocols in frame : eth:ethertype:ip:sctp:xnap
Character encoding : ASCII (0)
eth : Ethernet II, Src: 00:00:00:00:00:00, Dst: 00:00:00:00:00:00
Destination : 00:00:00:00:00:00
Destination (resolved) : 00:00:00:00:00:00
Destination OUI : 00:00:00 (Officially Xerox, but 0:0:0:0:0:0 is more common)
Destination OUI (resolved) : Officially Xerox, but 0:0:0:0:0:0 is more common
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit : Individual address (unicast)
Address : 00:00:00:00:00:00
Address (resolved) : 00:00:00:00:00:00
Address OUI : 00:00:00 (Officially Xerox, but 0:0:0:0:0:0 is more common)
Address OUI (resolved) : Officially Xerox, but 0:0:0:0:0:0 is more common
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit : Individual address (unicast)
Source : 00:00:00:00:00:00
Source (resolved) : 00:00:00:00:00:00
Source OUI : 00:00:00 (Officially Xerox, but 0:0:0:0:0:0 is more common)
Source OUI (resolved) : Officially Xerox, but 0:0:0:0:0:0 is more common
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit : Individual address (unicast)
Address : 00:00:00:00:00:00
Address (resolved) : 00:00:00:00:00:00
Address OUI : 00:00:00 (Officially Xerox, but 0:0:0:0:0:0 is more common)
Address OUI (resolved) : Officially Xerox, but 0:0:0:0:0:0 is more common
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit : Individual address (unicast)
Type : IPv4 (0x0800)
Stream index : 0
ip : Internet Protocol Version 4, Src: 127.0.0.1, Dst: 127.0.0.1
0100 .... = Version : 4
.... 0101 = Header Length : 20 bytes (5)
Differentiated Services Field : 0x02 (DSCP: CS0, ECN: ECT(0))
0000 00.. = Differentiated Services Codepoint : Default (0)
.... ..10 = Explicit Congestion Notification : ECN-Capable Transport codepoint '10' (2)
Total Length : 92
Identification : 0x0003 (3)
010. .... = Flags : 0x2, Don't fragment
0... .... = Reserved bit : Not set
.1.. .... = Don't fragment : Set
..0. .... = More fragments : Not set
...0 0000 0000 0000 = Fragment Offset : 0
Time to Live : 64
Protocol : SCTP (132)
Header Checksum : 0x3c17 [validation disabled]
Header checksum status : Unverified
Source Address : 127.0.0.1
Source or Destination Address : 127.0.0.1
Source Host : 127.0.0.1
Source or Destination Host : 127.0.0.1
Destination Address : 127.0.0.1
Source or Destination Address : 127.0.0.1
Destination Host : 127.0.0.1
Source or Destination Host : 127.0.0.1
Stream index : 0
sctp : Stream Control Transmission Protocol, Src Port: 38430 (38430), Dst Port: 38422 (38422)
Source port : 38430
Destination port : 38422
Verification tag : 0xd61447ef
Association index : disabled (enable in preferences)
Port : 38430
Port : 38422
Checksum : 0x00000000 [unverified]
Checksum Status : Unverified
DATA chunk (ordered, complete segment, TSN : 1, SID: 0, SSN: 1, PPID: 61, payload length: 44 bytes)
Chunk type : DATA (0)
0... .... = Bit : Stop processing of the packet
.0.. .... = Bit : Do not report
Chunk flags : 0x03
.... 0... = I-Bit : Possibly delay SACK
.... .0.. = U-Bit : Ordered delivery
.... ..1. = B-Bit : First segment
.... ...1 = E-Bit : Last segment
Chunk length : 60
Transmission sequence number (relative) : 1
Transmission sequence number (absolute) : 1811961531
Stream identifier : 0x0000
Stream sequence number : 1
Payload protocol identifier : XnAP (61)
xnap : NG-RAN Xn Application Protocol (XnAP)
0... .... Extension Bit : False
XnAP-PDU : initiatingMessage (0)
initiatingMessage
procedureCode : id-retrieveUEContext (3)
criticality : reject (0)
value
RetrieveUEContextRequest
0... .... Extension Bit : False
protocolIEs : 4 items
Item 0 : id-newNG-RANnodeUEXnAPID
ProtocolIE-Field
id : id-newNG-RANnodeUEXnAPID (27)
criticality : reject (0)
value
NG-RANnodeUEXnAPID : 1
Item 1 : id-UEContextID
ProtocolIE-Field
id : id-UEContextID (82)
criticality : reject (0)
value
UEContextID : rRCResume (0)
rRCResume
..0. .... Extension Bit : False
...0 .... Optional Field Bit : False (iE-Extension is NOT present)
i-rnti : i-RNTI-short (1)
i-RNTI-short : 000000 [bit length 24, 0000 0000 0000 0000 0000 0000 decimal value 0]
allocated-c-rnti : 0001 [bit length 16, 0000 0000 0000 0001 decimal value 1]
accessPCI : nr (0)
..0. .... Extension Present Bit : False
nr : 0
Item 2 : id-MAC-I
ProtocolIE-Field
id : id-MAC-I (21)
criticality : reject (0)
value
MAC-I : 0001 [bit length 16, 0000 0000 0000 0001 decimal value 1]
Item 3 : id-new-NG-RAN-Cell-Identity
ProtocolIE-Field
id : id-new-NG-RAN-Cell-Identity (26)
criticality : reject (0)
value
NG-RAN-Cell-Identity : e-utra (1)
0000 0000 0000 0000 0001 0000 0001 .... = e-utra : 0x0000101
Rendered from a Wireshark PCAP by VisualEther.

Frame 4 — Retrieve UE Context Response. gNB-2 authenticates the request and returns the full UE context. It echoes the new node's UE XnAP ID (1) and allocates its own Old NG-RAN node UE XnAP ID = 2, so the two ends are now cross-referenced by a pair of identifiers.

The security context is the important payload here — carried inside the message rather than on the arrow: NCC = 2 plus the 32-byte K_NG-RAN* next-hop key. With these, the target derives fresh AS keys (K_gNB*) for the resumed connection — vertical key derivation, giving forward security so the new cell cannot read prior traffic.

Also handed over: UE-AMBR 256 Mbps (downlink and uplink) and one PDU-session resource to set up:

PDU SessionTypeSliceQoS flow5QI
5IPv4SST 10 / SD 0x203040QFI 19

5QI 9 is a standardized non-GBR flow — the default best-effort bearer (e.g. TCP-based or buffered video traffic).

And the response as its full decoded packet — the key message of the capture. Expand securityInformation for the NCC and the key-NG-RAN-Star, and PDUSessionResourcesToBeSetup-Item for the PDU session and its QoS flow:

[00004] Frame 4 RetrieveUEContextResponse 2024-10-13T23:03:59.674628Z 📡 gNB-2 (:38422) 📡 gNB-1 (:38430)
frame : Frame 4: Packet, 366 bytes on wire (2928 bits), 366 bytes captured (2928 bits)
Encapsulation type : Ethernet (1)
Arrival Time : Oct 13, 2024 16:03:59.674628000 Pacific Daylight Time
UTC Arrival Time : Oct 13, 2024 23:03:59.674628000 UTC
Epoch Arrival Time : 1728860639.674628000
Time shift for this packet : 0.000000000 seconds
Time delta from previous captured frame : 20.332000 milliseconds
Time delta from previous displayed frame : 20.332000 milliseconds
Time since reference or first frame : 35.850000 milliseconds
Frame Number : 4
Frame Length : 366 bytes (2928 bits)
Capture Length : 366 bytes (2928 bits)
Frame is marked : False
Frame is ignored : False
Protocols in frame : eth:ethertype:ip:sctp:xnap
Character encoding : ASCII (0)
eth : Ethernet II, Src: 00:00:00:00:00:00, Dst: 00:00:00:00:00:00
Destination : 00:00:00:00:00:00
Destination (resolved) : 00:00:00:00:00:00
Destination OUI : 00:00:00 (Officially Xerox, but 0:0:0:0:0:0 is more common)
Destination OUI (resolved) : Officially Xerox, but 0:0:0:0:0:0 is more common
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit : Individual address (unicast)
Address : 00:00:00:00:00:00
Address (resolved) : 00:00:00:00:00:00
Address OUI : 00:00:00 (Officially Xerox, but 0:0:0:0:0:0 is more common)
Address OUI (resolved) : Officially Xerox, but 0:0:0:0:0:0 is more common
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit : Individual address (unicast)
Source : 00:00:00:00:00:00
Source (resolved) : 00:00:00:00:00:00
Source OUI : 00:00:00 (Officially Xerox, but 0:0:0:0:0:0 is more common)
Source OUI (resolved) : Officially Xerox, but 0:0:0:0:0:0 is more common
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit : Individual address (unicast)
Address : 00:00:00:00:00:00
Address (resolved) : 00:00:00:00:00:00
Address OUI : 00:00:00 (Officially Xerox, but 0:0:0:0:0:0 is more common)
Address OUI (resolved) : Officially Xerox, but 0:0:0:0:0:0 is more common
.... ..0. .... .... .... .... = LG bit : Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit : Individual address (unicast)
Type : IPv4 (0x0800)
Stream index : 0
ip : Internet Protocol Version 4, Src: 127.0.0.1, Dst: 127.0.0.1
0100 .... = Version : 4
.... 0101 = Header Length : 20 bytes (5)
Differentiated Services Field : 0x02 (DSCP: CS0, ECN: ECT(0))
0000 00.. = Differentiated Services Codepoint : Default (0)
.... ..10 = Explicit Congestion Notification : ECN-Capable Transport codepoint '10' (2)
Total Length : 352
Identification : 0x0000 (0)
010. .... = Flags : 0x2, Don't fragment
0... .... = Reserved bit : Not set
.1.. .... = Don't fragment : Set
..0. .... = More fragments : Not set
...0 0000 0000 0000 = Fragment Offset : 0
Time to Live : 64
Protocol : SCTP (132)
Header Checksum : 0x3b16 [validation disabled]
Header checksum status : Unverified
Source Address : 127.0.0.1
Source or Destination Address : 127.0.0.1
Source Host : 127.0.0.1
Source or Destination Host : 127.0.0.1
Destination Address : 127.0.0.1
Source or Destination Address : 127.0.0.1
Destination Host : 127.0.0.1
Source or Destination Host : 127.0.0.1
Stream index : 0
sctp : Stream Control Transmission Protocol, Src Port: 38422 (38422), Dst Port: 38430 (38430)
Source port : 38422
Destination port : 38430
Verification tag : 0xd794128a
Association index : disabled (enable in preferences)
Port : 38422
Port : 38430
Checksum : 0x00000000 [unverified]
Checksum Status : Unverified
SACK chunk (Cumulative TSN : 1811961531, a_rwnd: 106496, gaps: 0, duplicate TSNs: 0)
Chunk type : SACK (3)
0... .... = Bit : Stop processing of the packet
.0.. .... = Bit : Do not report
Chunk flags : 0x00
.... ...0 = Nonce sum : 0
Chunk length : 16
Cumulative TSN ACK (relative) : 1
Cumulative TSN ACK (absolute) : 1811961531
Advertised receiver window credit (a_rwnd) : 106496
Number of gap acknowledgement blocks : 0
Number of duplicated TSNs : 0
DATA chunk (ordered, complete segment, TSN : 1, SID: 0, SSN: 1, PPID: 61, payload length: 288 bytes)
Chunk type : DATA (0)
0... .... = Bit : Stop processing of the packet
.0.. .... = Bit : Do not report
Chunk flags : 0x03
.... 0... = I-Bit : Possibly delay SACK
.... .0.. = U-Bit : Ordered delivery
.... ..1. = B-Bit : First segment
.... ...1 = E-Bit : Last segment
Chunk length : 304
Transmission sequence number (relative) : 1
Transmission sequence number (absolute) : 1548005004
Stream identifier : 0x0000
Stream sequence number : 1
Payload protocol identifier : XnAP (61)
xnap : NG-RAN Xn Application Protocol (XnAP)
0... .... Extension Bit : False
XnAP-PDU : successfulOutcome (1)
successfulOutcome
procedureCode : id-retrieveUEContext (3)
criticality : reject (0)
value
RetrieveUEContextResponse
0... .... Extension Bit : False
protocolIEs : 4 items
Item 0 : id-newNG-RANnodeUEXnAPID
ProtocolIE-Field
id : id-newNG-RANnodeUEXnAPID (27)
criticality : ignore (1)
value
NG-RANnodeUEXnAPID : 1
Item 1 : id-oldNG-RANnodeUEXnAPID
ProtocolIE-Field
id : id-oldNG-RANnodeUEXnAPID (29)
criticality : ignore (1)
value
NG-RANnodeUEXnAPID : 2
Item 2 : id-GUAMI
ProtocolIE-Field
id : id-GUAMI (15)
criticality : reject (0)
value
GUAMI
0... .... Extension Bit : False
.0.. .... Optional Field Bit : False (iE-Extensions is NOT present)
plmn-ID : 260402
Mobile Country Code (MCC) : Cameroon (624)
Mobile Network Code (MNC) : Unknown (020)
amf-region-id : 01 [bit length 8, 0000 0001 decimal value 1]
amf-set-id : 0040 [bit length 10, 6 LSB pad bits, 0000 0000 01.. .... decimal value 1]
amf-pointer : 04 [bit length 6, 2 LSB pad bits, 0000 01.. decimal value 1]
Item 3 : id-UEContextInfoRetrUECtxtResp
ProtocolIE-Field
id : id-UEContextInfoRetrUECtxtResp (84)
criticality : reject (0)
value
UEContextInfoRetrUECtxtResp
0... .... Extension Bit : False
.0.. .... Optional Field Bit : False (mobilityRestrictionList is NOT present)
..0. .... Optional Field Bit : False (indexToRatFrequencySelectionPriority is NOT present)
...0 .... Optional Field Bit : False (iE-Extension is NOT present)
ng-c-UE-signalling-ref : 1
signalling-TNL-at-source : endpointIPAddress (0)
.0.. .... Extension Present Bit : False
endpointIPAddress : 0a0b0c18 [bit length 32, 0000 1010 0000 1011 0000 1100 0001 1000 decimal value 168496152]
TransportLayerAddress (IPv4) : 10.11.12.24
ueSecurityCapabilities
0... .... Extension Bit : False
.0.. .... Optional Field Bit : False (iE-Extension is NOT present)
..0. .... Extension Present Bit : False
nr-EncyptionAlgorithms : 0000 [bit length 16, 0000 0000 0000 0000 decimal value 0]
0... .... = spare_bit0 : False
.0.. .... = nea1-128 : False
..0. .... = nea2-128 : False
...0 .... = nea3-128 : False
...0 .... Extension Present Bit : False
nr-IntegrityProtectionAlgorithms : 0000 [bit length 16, 0000 0000 0000 0000 decimal value 0]
0... .... = spare_bit0 : False
.0.. .... = nia1-128 : False
..0. .... = nia2-128 : False
...0 .... = nia3-128 : False
.... 0... Extension Present Bit : False
e-utra-EncyptionAlgorithms : 0000 [bit length 16, 0000 0000 0000 0000 decimal value 0]
0... .... = spare_bit0 : False
.0.. .... = eea1-128 : False
..0. .... = eea2-128 : False
...0 .... = eea3-128 : False
.... .0.. Extension Present Bit : False
e-utra-IntegrityProtectionAlgorithms : 0000 [bit length 16, 0000 0000 0000 0000 decimal value 0]
0... .... = spare_bit0 : False
.0.. .... = eia1-128 : False
..0. .... = eia2-128 : False
...0 .... = eia3-128 : False
securityInformation
.... ..0. Extension Bit : False
.... ...0 Optional Field Bit : False (iE-Extensions is NOT present)
key-NG-RAN-Star : 0001020304050607080910111213141516171819202122232425262728293031 [bit length 256]
ncc : 2
ue-AMBR
...0 .... Extension Bit : False
.... 0... Optional Field Bit : False (iE-Extension is NOT present)
.... .0.. Extension Present Bit : False
dl-UE-AMBR : 256000000bits/s
0... .... Extension Present Bit : False
ul-UE-AMBR : 256000000bits/s
pduSessionResourcesToBeSetup-List : 1 item
Item 0
PDUSessionResourcesToBeSetup-Item
0... .... Extension Bit : False
.1.. .... Optional Field Bit : True (pduSessionAMBR is present)
..0. .... Optional Field Bit : False (source-DL-NG-U-TNL-Information is NOT present)
...0 .... Optional Field Bit : False (securityIndication is NOT present)
.... 0... Optional Field Bit : False (pduSessionNetworkInstance is NOT present)
.... .0.. Optional Field Bit : False (dataforwardinginfofromSource is NOT present)
.... ..0. Optional Field Bit : False (iE-Extensions is NOT present)
pduSessionId : 5
s-NSSAI
0... .... Extension Bit : False
.1.. .... Optional Field Bit : True (sd is present)
..0. .... Optional Field Bit : False (iE-Extensions is NOT present)
sst : 10
sd : 203040
pduSessionAMBR
0... .... Extension Bit : False
.0.. .... Optional Field Bit : False (iE-Extensions is NOT present)
..0. .... Extension Present Bit : False
downlink-session-AMBR : 256000000bits/s
0... .... Extension Present Bit : False
uplink-session-AMBR : 256000000bits/s
uL-NG-U-TNLatUPF : gtpTunnel (0)
gtpTunnel
.0.. .... Extension Bit : False
..0. .... Optional Field Bit : False (iE-Extensions is NOT present)
...0 .... Extension Present Bit : False
tnl-address : 0a0b0c17 [bit length 32, 0000 1010 0000 1011 0000 1100 0001 0111 decimal value 168496151]
TransportLayerAddress (IPv4) : 10.11.12.23
gtp-teid : 00000001
0... .... Extension Present Bit : False
pduSessionType : ipv4 (0)
qosFlowsToBeSetup-List : 1 item
Item 0
QoSFlowsToBeSetup-Item
..0. .... Extension Bit : False
...0 .... Optional Field Bit : False (e-RAB-ID is NOT present)
.... 0... Optional Field Bit : False (iE-Extension is NOT present)
.... .0.. Extension Present Bit : False
qfi : 1
qosFlowLevelQoSParameters
.... 0... Extension Bit : False
.... .0.. Optional Field Bit : False (gBRQoSFlowInfo is NOT present)
.... ..0. Optional Field Bit : False (reflectiveQoS is NOT present)
.... ...0 Optional Field Bit : False (additionalQoSflowInfo is NOT present)
0... .... Optional Field Bit : False (iE-Extensions is NOT present)
qos-characteristics : non-dynamic (0)
non-dynamic
...0 .... Extension Bit : False
.... 0... Optional Field Bit : False (priorityLevelQoS is NOT present)
.... .0.. Optional Field Bit : False (averagingWindow is NOT present)
.... ..0. Optional Field Bit : False (maximumDataBurstVolume is NOT present)
.... ...0 Optional Field Bit : False (iE-Extension is NOT present)
0... .... Extension Present Bit : False
fiveQI : 9
allocationAndRetentionPrio
0... .... Extension Bit : False
.0.. .... Optional Field Bit : False (iE-Extensions is NOT present)
..0. .... Extension Present Bit : False
priorityLevel : 2
.... ...0 Extension Present Bit : False
pre-emption-capability : shall-not-trigger-preemption (0)
.0.. .... Extension Present Bit : False
pre-emption-vulnerability : not-preemptable (0)
rrc-Context […] : 0a100ca0120000000000bf06ec400095e8020005915a2082900879f104181a043cf8c08901cf80400802208c624445a8092ad6c09feca02e09feca020fa8dac178f9450762f3e82129d2aad215972aa10c3ece0004400350d0242f0895e258000020589204100010000101814518
NR Radio Resource Control (RRC) protocol
NR Radio Resource Control (RRC) protocol
HandoverPreparationInformation
criticalExtensions : c1 (0)
c1 : handoverPreparationInformation (0)
handoverPreparationInformation
...0 .... Optional Field Bit : False (sourceConfig is NOT present)
.... 1... Optional Field Bit : True (rrm-Config is present)
.... .0.. Optional Field Bit : False (as-Context is NOT present)
.... ..1. Optional Field Bit : True (nonCriticalExtension is present)
ue-CapabilityRAT-List : 0 items
rrm-Config
...1 .... Extension Bit : True
.... 0... Optional Field Bit : False (ue-InactiveTime is NOT present)
.... .0.. Optional Field Bit : False (candidateCellInfoList is NOT present)
.... ..0. Small Number Bit : False
Number of Sequence Extensions : 1
.... .1.. Extension Present Bit : True (extension addition group is present)
.... ..0. Extension Present Bit : False (<unknown type> is NOT present)
.... ...0 Optional Field Bit : False (candidateCellInfoListSN-EUTRA is NOT present)
Possible encoding error full length not decoded. Open type length 80, decoded 1
Expert Info (Warning/Malformed) : Possible encoding error full length not decoded. Open type length 80, decoded 1
Possible encoding error full length not decoded. Open type length 80, decoded 1
Message : Possible encoding error full length not decoded. Open type length 80, decoded 1
Severity level : Warning
Group : Malformed
Malformed Packet
nonCriticalExtension
Rendered from a Wireshark PCAP by VisualEther.

Frame 5 — Retrieve UE Context Confirm. gNB-1 closes the loop, quoting both identifiers — Old UE XnAP ID = 2 and New UE XnAP ID = 1. The context has been taken over; both XnAP IDs are bound to the UE-associated Xn connection, and the RRC Resume preparation on the Xn interface is complete. From here, gNB-1 sends the RRCResume to the UE over the air and, if needed, path-switches the PDU session toward the core.

Retrieve UE Context vs Handover Preparation

Retrieve UE Context has a close cousin on Xn — Handover Preparation. Both procedures move a UE's context between gNBs, but they answer different questions:

The tell is the trigger and the direction of the pull. A context that moves because a UE arrived and asked to resume — carrying an I-RNTI and a resume MAC — is Retrieve UE Context, whatever the file is named.

Takeaways

  1. RRC_INACTIVE trades state for speed. Suspending a UE preserves its context and hands out an I-RNTI, so resuming is far cheaper than a fresh setup — even when the UE resumes in a different cell.
  2. The Xn fetch resolves mobility. When the UE resumes at a new gNB, that gNB uses the I-RNTI to find the anchor and pulls the context over Xn with Retrieve UE Context.
  3. The resume is authenticated before anything moves. The shortResumeMAC-I allows the anchor to verify that the request is genuine before releasing the UE's context.
  4. Resuming forward-secures the keys. The NCC and K_NG-RAN* in the response drive vertical key derivation, so the new cell derives fresh AS keys and cannot read pre-resume traffic.

Try it on your own capture

Every arrow in this walkthrough was decoded and captioned by VisualEther from a raw Wireshark PCAP — no manual diagramming. Point it at your own 5G, LTE, or IMS trace and read it the same way.