Project

General

Profile

Open5GS-Traces » History » Version 39

jolly, 02/01/2024 04:07 PM

1 1 jolly
h1. Open5GS-Traces
2
3 23 jolly
{{>toc}}
4
5 8 jolly
h2. Setup of this example
6
7
* Ericsson RBS 6402 (eNodeB)
8
* Open5GS (4G network elements)
9
* OsmoHLR with OsmoDia2GSUP (HSS)
10
* OsmoMSC (SMS)
11
12 37 jolly
h2. Wireshark trace
13
14 39 jolly
15 17 jolly
16 8 jolly
h2. Idle
17 1 jolly
18
When all phones are Idle, one will see the following trace with Wireshark on the link between eNodeB (Ericsson RBS) and MME (Open5GS).
19 10 jolly
20 33 jolly
p{border: solid 1px #000; padding: 0.5em;}. {{thumbnail(wireshark_enb_idle.png, size=600)}}
21 8 jolly
22
The eNodeB (IP 10.0.15.117) is connected to MME (IP 10.0.15.1) via SCTP. Also the eNodeB syncs its clock to NTP server (IP 10.0.15.1).
23 19 jolly
24 9 jolly
The network 10.0.15.0/24 is the RAN network in this example.
25
26 17 jolly
27 9 jolly
h2. 4G Attachment
28
29 27 jolly
!enb_attach.png!
30 1 jolly
31 23 jolly
The phone is turned on and ready to attach to 4G network. The filter of Wireshark is set to "s1ap", so that only packages between eNodeB and MME are shown.
32 20 jolly
33 33 jolly
p{border: solid 1px #000; padding: 0.5em;}. {{thumbnail(wireshark_enb_attach.png, size=1000)}}
34 16 jolly
35 18 jolly
A 4G phone is attached to the network, using SIM cards that is registered in the HSS. The APN name used is "internet".
36 19 jolly
37 1 jolly
Lets go into detail:
38 12 jolly
39
h3. Attach request
40 1 jolly
41 33 jolly
p{border: solid 1px #000; padding: 0.5em;}. {{thumbnail(wireshark_enb_attach_attach_request.png, size=1000)}}
42 17 jolly
43 18 jolly
The UE sends an "Attach request". It is the message type of the "NAS-PDU" information element of the "initiatingMessage". The "NAS-PDU" message type is highlighted blue in the picture above.
44 19 jolly
45 17 jolly
Also within the "NAS-PDU" is the "EPS mobile identity". In this case the UE has the mobile country code "999" and the mobile network code "10". The IMSI is not shown. Because the UE was attached before, a TMSI is used. 
46 1 jolly
47
If the mobile station was not registered to the MME, the MME will request identity and authentication and send "Attach Request" again after enabling encryption
48
49
h3. "Identity request" and "Identity response"
50 24 jolly
51 33 jolly
p{border: solid 1px #000; padding: 0.5em;}. {{thumbnail(wireshark_enb_attach_identity_request.png, size=1000)}}
52 24 jolly
53 30 jolly
Because identity is not know, the MME requests IMSI, as . (The MME was restartet before this trace, so that the TMSI is unknown.)
54 1 jolly
55 34 jolly
The MME sends an "Identity request" to the UE. The "NAS-PDU" message type is highlighted blue in the picture above. The identity type requested is highlighted light blue in the picture above.
56
57 1 jolly
p{border: solid 1px #000; padding: 0.5em;}. {{thumbnail(wireshark_enb_attach_identity_response.png, size=1000)}}
58
59 35 jolly
The MME receives the response with IMSI. Again, the "NAS-PDU" message type is highlighted blue in the picture above. The mobile identity is highlighted light blue in the picture above. The IMSI is now known to the MME.
60 31 jolly
61 24 jolly
h3. "Authentication request" and "Authentication response"
62
63 33 jolly
p{border: solid 1px #000; padding: 0.5em;}. {{thumbnail(wireshark_enb_attach_authentication_request.png, size=1000)}}
64 1 jolly
65 35 jolly
The MME sends an "Authentication request" to the UE. The "NAS-PDU" message type is highlighted blue in the picture above.
66 1 jolly
67 35 jolly
A random value "RAND" and authentication parameters "AUTN" are used to request authentication from UE.
68
69 1 jolly
p{border: solid 1px #000; padding: 0.5em;}. {{thumbnail(wireshark_enb_attach_authentication_response.png, size=1000)}}
70 35 jolly
71
The UE sends an "Authentication response" to the UE. The "NAS-PDU" message type is highlighted blue in the picture above.
72
73
The result "RES" is returned to the MME. (Highlighted light blue in the picture above.)
74 28 jolly
75 24 jolly
The subsequent “Security mode command” and “Security mode complete” messages are not depicted. The latter message is sent after encryption between UE and eNodeB is enabled. The message also carries the Attach request again.
76
77
h3. "ESM information request" and "ESM information response"
78
79 33 jolly
p{border: solid 1px #000; padding: 0.5em;}. {{thumbnail(wireshark_enb_attach_ESM_infomation_request.png, size=1000)}}
80 1 jolly
81
The MME sends an "ESM information request" to the UE, to request APN name. The "NAS-PDU" message type is highlighted blue in the picture above.
82 16 jolly
 
83 33 jolly
p{border: solid 1px #000; padding: 0.5em;}. {{thumbnail(wireshark_enb_attach_ESM_infomation_response.png, size=1000)}}
84 19 jolly
85 1 jolly
The UE send an "ESM information response." The UE uses the APN name "internet". The "NAS-PDU" message type is highlighted blue in the picture above.
86 18 jolly
87
This is the default configuration in the example setup. It can be configured in the configuration file for OsmoHLR. (osmo-hlr.cfg)
88 14 jolly
89
90 24 jolly
h3. "Attach accept"
91 1 jolly
92 33 jolly
p{border: solid 1px #000; padding: 0.5em;}. {{thumbnail(wireshark_enb_attach_attach_accept.png, size=1000)}}
93 20 jolly
94 21 jolly
The MME sends an "Attach accept" to the UE. The "NAS-PDU" message type is highlighted blue in the picture above.
95 1 jolly
96 20 jolly
Also within the “NAS-PDU” is an “ESM message container” with an “EPS session management message” to activate the default EPS bearer context. (Highlighted light blue in the picture above.)
97
98 1 jolly
The subsequent “InitialContextSetupResponse” and “UECapabilityInfoIndication” messages are not depicted. The latter message contains capabilities of the UE.
99 20 jolly
100 1 jolly
h3. "Attach complete"
101 24 jolly
102 33 jolly
p{border: solid 1px #000; padding: 0.5em;}. {{thumbnail(wireshark_enb_attach_attach_complete.png, size=1000)}}
103 1 jolly
104 20 jolly
Finally the UE sends an "Attach complete". The "NAS-PDU" message type is highlighted blue in the picture above.
105
106 36 jolly
Also within the “NAS-PDU” is an “ESM message container” with an “Activate default EPS bearer context accept”. (Highlighted light blue in the picture above.)
107 20 jolly
108
h2. Packet transfer
109
110 33 jolly
p{border: solid 1px #000; padding: 0.5em;}. {{thumbnail(wireshark_enb_gtp_1.png, size=1000)}}
111 20 jolly
112 1 jolly
The "GPRS Tunneling Protocol" (GTP) is used to tunnel packet traffic of the user plane. between eNodeB and SGW.
113 20 jolly
114 33 jolly
p{border: solid 1px #000; padding: 0.5em;}. {{thumbnail(wireshark_enb_gtp_2.png, size=1000)}}
115 20 jolly
116 21 jolly
As depicted above, the GTP packet transmitted from the eNodeB (IP 10.0.15.117) to the SGW (IP 10.0.15.3).
117 20 jolly
118 1 jolly
The carried packet is transmitted from the UE (IP 10.0.6.2) to the destination in the Internet (IP 104.26.15.42)
119 20 jolly
120 1 jolly
121 23 jolly
h2. 4G Detachment
122
123 26 jolly
!enb_detach.png!
124 1 jolly
125 20 jolly
The 4G phone is turned off or the airplane mode is turned on. The phone detaches from network.
126 10 jolly
127 33 jolly
p{border: solid 1px #000; padding: 0.5em;}. {{thumbnail(wireshark_enb_detach.png, size=1000)}}
128 14 jolly
129 1 jolly
Lets go into detail:
130 14 jolly
131 26 jolly
132 25 jolly
h3. "Detach Request"
133 1 jolly
134 33 jolly
p{border: solid 1px #000; padding: 0.5em;}. {{thumbnail(wireshark_enb_detach_detach_request.png, size=1000)}}
135 21 jolly
136
Similar to the "Attach request", described above, the UE sends an "Detach request". It is the message type of the "NAS-PDU" information element of the "initiatingMessage". The "NAS-PDU" message type is highlighted blue in the picture above.
137
138
Also within the "NAS-PDU" is the "EPS mobile identity". This is also similar to the "Attach request".
139 1 jolly
140
The subsequent “UEContextReleaseCommand” message (sent from EMM) and “UEContextREleaseComplete” messages (sent from UE) are not depicted.
141 26 jolly
142
143
h2. Attachment inside EPC
144
145
!epc_attach.png!
146
147
After authentication is done and after receiving ESM information (e.g. APN), a session is created between network elements inside the Envolved Packet Code (EPC).
148
149 28 jolly
{{thumbnail(wireshark_epc_attach.png, size=1000)}}
150 26 jolly
151
h3. MME -> SGWc
152
153
As depicted in the Wireshark picture above, the MME sends "Create Session Request" towards the control plane of the SGW. The GPRS tunneling protocol (GTP) is used. The request is depicted at frame number 254, the response at frame number 266.
154
155
h3. SGWc -> SGWu
156
157
After receiving the "Create Session Request" from the MME, the control plane of the SGW sends a "PFCP Session Establishment Request" to the user plane of the SGW. The packet forwarding control protocol (PFCP) is used. The request is depicted at frame number 255, the response at frame number 257.
158
159
h3. SGWc -> PGWc
160
161
The control plane of the SGW also sends a "Create Session Request" to the control plane of the PGW. The GPRS tunneling protocol (GTP) is used here again. The request is depicted at frame number 258, the response at frame number 263.
162
163
h3. PGWc -> PCRF
164
165
The control plane of the PGW sends a "Credit-Control Request" to the PCRF. The Diameter protocol is used. The request is depicted at frame number 259, the answer at frame number 260.
166
167
h3. PGWc -> PGWu
168
169
After receiving the "Credit-Control Answer" from the PCRF, the control plane of the PGW sends a "PFCP Session Establishment Request" to the user plane of the PGW. The packet forwarding control protocol (PFCP) is used here again. The request is depicted at frame number 261, the response at frame number 262.
170
171
h3. SGWc -> SGWu
172
173
After receiving the "Create Session Response" from the control plane of the PGW, the control plane of the SGW sends a "PFCP Session Modification Request" to the user plane of the SGW. The packet forwarding control protocol (PFCP) is used here again. The request is depicted at frame number 264, the response at frame number 265.
Add picture from clipboard (Maximum size: 48.8 MB)