blob: 8224e16dab04ad24ad56f1cf6d79c25d9e208416 [file] [log] [blame]
Harald Welteb682cd62016-02-29 15:09:55 +01001== Network Service (NS)
2
3=== List of Messages
4
Harald Welteb6453652020-12-12 20:03:10 +01005The following tables list the NS messages used by osmo-pcu and osmo-gbproxy, grouped by their level of
6compliance with 3GPP TS 48.016.
Harald Welteb682cd62016-02-29 15:09:55 +01007
Harald Welte89384312020-12-01 08:57:34 +01008==== Messages Compliant With 3GPP TS 48.016
Harald Welteb682cd62016-02-29 15:09:55 +01009
Harald Welteea2147a2020-12-01 08:58:56 +010010The NS protocol is implemented inside libosmogb so none of the messages below are sent by OsmoPCU explicitly.
11Instead corresponding functions from libosmogb are called which send and receive messages as necessary. See <<ns_init>> for details
Max4e2a1e32016-03-02 18:30:33 +010012on establishing NS connection.
13
Harald Welte89384312020-12-01 08:57:34 +010014.Messages compliant with 3GPP TS 48.016
Harald Welteb682cd62016-02-29 15:09:55 +010015[options="header",cols="10%,10%,20%,35%,5%,20%"]
16|===
Harald Welte89384312020-12-01 08:57:34 +010017| TS 48.016 § | type code (hex) | This document § | Message | <-/-> | Received/Sent by OsmoPCU
Max4e2a1e32016-03-02 18:30:33 +010018| 9.2.1 | 0x0a | <<ns_alive>> | NS-ALIVE | <-/-> | Received/Sent
19| 9.2.2 | 0x0b | <<ns_alive_ack>> | NS-ALIVE-ACK | <-/-> | Received/Sent
Harald Welteb6453652020-12-12 20:03:10 +010020| 9.2.3 | 0x04 | <<ns_block>> | NS-BLOCK | <-/-> | Received/Sent
21| 9.2.4 | 0x05 | <<ns_block_ack>> | NS-BLOCK-ACK | <-/-> | Received/Sent
22| 9.2.5 | 0x02 | <<ns_reset>> | NS-RESET | <-/-> | Received/Sent
23| 9.2.6 | 0x03 | <<ns_reset_ack>> | NS-RESET-ACK | <-/-> | Received/Sent
24| 9.2.7 | 0x08 | <<ns_status>> | NS-STATUS | <-/-> | Received/Sent
25| 9.2.8 | 0x06 | <<ns_unblock>> | NS-UNBLOCK | <-/-> | Received/Sent
26| 9.2.9 | 0x07 | <<ns_unblock_ack>> | NS-UNBLOCK-ACK | <-/-> | Received/Sent
27| 9.2.10 | 0x00 | <<ns_unit_data>> | NS-UNITDATA | <-/-> | Received/Sent
28| 9.3.1 | 0x0c | <<sns_ack>> | SNS-ACK | <-/-> | Received/Sent
29| 9.3.2 | 0x0d | <<sns_add>> | SNS-ADD | <-/-> | Received/Sent
30| 9.3.3 | 0x0e | <<sns_changeweight>> | SNS-CHANGEWEIGHT | <-/-> | Received/Sent
31| 9.3.4 | 0x0f | <<sns_config>> | SNS-CONFIG | <-/-> | Received/Sent
32| 9.3.5 | 0x10 | <<sns_config_ack>> | SNS-CONFIG | <-/-> | Received/Sent
33| 9.3.6 | 0x11 | <<sns_delete>> | SNS-DELETE | <-/-> | Received/Sent
34| 9.3.7 | 0x12 | <<sns_size>> | SNS-SIZE | <-/-> | Received/Sent
35| 9.3.8 | 0x13 | <<sns_size_ack>> | SNS-SIZE-ACK | <-/-> | Received/Sent
Harald Welteb682cd62016-02-29 15:09:55 +010036|===
37
38==== Messages Specific to OsmoPCU
39
40There are no OsmoPCU specific NS messages.
41
42==== Messages Not Implemented by OsmoPCU
43
Harald Welte89384312020-12-01 08:57:34 +010044All the NS protocol messages from 3GPP TS 48.016 are implemented in OsmoPCU.
Harald Welteb682cd62016-02-29 15:09:55 +010045
46=== Details on Compliant NS Messages
47
Max4e2a1e32016-03-02 18:30:33 +010048[[ns_unit_data]]
49==== NS-UNITDATA
50
Harald Welte32b58e62016-03-10 12:45:22 +070051This PDU transfers one NS SDU (specified in 3GPP TS 08.18) between
52OsmoPCU and SGSN. Upon receiving it OsmoPCU passes it to BSSGP
53implementation to handle. It is also sent by BSSGP as necessary - see
54<<bssgp>> for details.
55
Max4e2a1e32016-03-02 18:30:33 +010056It contains BVCI (<<ie_bvci>>) and NS SDU (<<ie_nssdu>>) IEs.
57
58[[ns_reset]]
59==== NS-RESET
60
Harald Welte32b58e62016-03-10 12:45:22 +070061This message is send by OsmoPCU in order to initiate reset procedure
Harald Welte89384312020-12-01 08:57:34 +010062described in 3GPP TS 48.016 § 7.3. The expected reply is NS-RESET-ACK
Harald Welte32b58e62016-03-10 12:45:22 +070063(<<ns_reset_ack>>) message. If no expected reply is received in 3
64seconds than the sending is retried up to 3 times. When this message
65is received it is replied with NS-RESET-ACK (<<ns_reset_ack>>).
Harald Welte89384312020-12-01 08:57:34 +010066It might be ignored under conditions described in 3GPP TS 48.016 § 7.3.1.
Harald Welte32b58e62016-03-10 12:45:22 +070067
Harald Welte89384312020-12-01 08:57:34 +010068The message conforms to 3GPP TS 48.016 § 9.2.5 specification.
Harald Welte32b58e62016-03-10 12:45:22 +070069
Max4e2a1e32016-03-02 18:30:33 +010070It contains Cause (<<ie_cause>>), NSVCI (<<ie_nsvci>>) and NSEI (<<ie_nsei>>) IEs.
71
72[[ns_reset_ack]]
73==== NS-RESET-ACK
74
Harald Welte32b58e62016-03-10 12:45:22 +070075This message is sent as a response to proper NS-RESET (<<ns_reset>>)
76message initiating reset procedure.
77
Harald Welte89384312020-12-01 08:57:34 +010078The message conforms to 3GPP TS 48.016 § 9.2.6 specification.
Harald Welte32b58e62016-03-10 12:45:22 +070079
Max4e2a1e32016-03-02 18:30:33 +010080It contains NSVCI (<<ie_nsvci>>) and NSEI (<<ie_nsei>>) IEs.
81
82[[ns_block]]
83==== NS-BLOCK
84
Harald Welte32b58e62016-03-10 12:45:22 +070085Upon receiving this message corresponding NS-VC is marked as blocked
86by OsmoPCU and NS-BLOCK-ACK (<<ns_block_ack>>) reply is transmitted.
87When this message is sent by OsmoPCU corresponding NS-BLOCK-ACK
88(<<ns_block_ack>>) reply is expected before NS-VC is actually marked
89as blocked. This behavior follows the blocking procedure described in
Harald Welte89384312020-12-01 08:57:34 +0100903GPP TS 48.016 § 7.2.
Harald Welte32b58e62016-03-10 12:45:22 +070091
Harald Welte89384312020-12-01 08:57:34 +010092The message conforms to 3GPP TS 48.016 § 9.2.3 specification.
Harald Welte32b58e62016-03-10 12:45:22 +070093
Max4e2a1e32016-03-02 18:30:33 +010094It contains Cause (<<ie_cause>>) and NSVCI (<<ie_nsvci>>) IEs.
95
96[[ns_block_ack]]
97==== NS-BLOCK-ACK
98
Harald Welte32b58e62016-03-10 12:45:22 +070099This message is sent by OsmoPCU automatically upon reception of
100correct NS-BLOCK (<<ns_block>>) message. It is expected as a reply
101for NS-BLOCK (<<ns_block>>) message sent by OsmoPCU.
102
Harald Welte89384312020-12-01 08:57:34 +0100103The message conforms to 3GPP TS 48.016 § 9.2.4 specification.
Harald Welte32b58e62016-03-10 12:45:22 +0700104
Max4e2a1e32016-03-02 18:30:33 +0100105It contains NSVCI (<<ie_nsvci>>) IE.
106
107[[ns_unblock]]
108==== NS-UNBLOCK
109
Harald Welte32b58e62016-03-10 12:45:22 +0700110Upon receiving this message corresponding NS-VC is unblocked by
111OsmoPCU and NS-UNBLOCK-ACK (<<ns_unblock_ack>>) reply is sent. When
112this message is sent by OsmoPCU corresponding NS-UNBLOCK-ACK
113(<<ns_unblock_ack>>) reply is expected before NS-VC is actually marked
114as unblocked. This behavior follows the blocking procedure described
Harald Welte89384312020-12-01 08:57:34 +0100115in 3GPP TS 48.016 § 7.2.
Harald Welte32b58e62016-03-10 12:45:22 +0700116
Harald Welte89384312020-12-01 08:57:34 +0100117The message conforms to 3GPP TS 48.016 § 9.2.8 specification.
Max4e2a1e32016-03-02 18:30:33 +0100118
119[[ns_unblock_ack]]
120==== NS-UNBLOCK-ACK
121
Harald Welte32b58e62016-03-10 12:45:22 +0700122Receiving this message notifies OsmoPCU that NS-VC unblocking request
123is confirmed and thus NS-VC is marked as unblocked. This message is
124also sent as a reply to NS-UNBLOCK (<<ns_unblock>>) message.
125
Harald Welte89384312020-12-01 08:57:34 +0100126The message conforms to 3GPP TS 48.016 § 9.2.9 specification.
Max4e2a1e32016-03-02 18:30:33 +0100127
128[[ns_status]]
129==== NS-STATUS
130
Harald Welte32b58e62016-03-10 12:45:22 +0700131This message is sent to inform other party about error conditions as a
132response to various unexpected PDUs or PDUs with unexpected/missing
133data. If this message is received for unknown NS-VC it is ignored in
Harald Welte89384312020-12-01 08:57:34 +0100134accordance with 3GPP TS 48.016 § 7.5.1, otherwise the error cause is
Harald Welte32b58e62016-03-10 12:45:22 +0700135logged if present in NS-STATUS.
136
Harald Welte89384312020-12-01 08:57:34 +0100137The message conforms to 3GPP TS 48.016 § 9.2.7 specification.
Harald Welte32b58e62016-03-10 12:45:22 +0700138
139It contains Cause (<<ie_cause>>) and might (depending on actual error)
140contain NSVCI (<<ie_nsvci>>), NS PDU (<<ie_nspdu>>) and BVCI
141(<<ie_bvci>>) IEs.
Max4e2a1e32016-03-02 18:30:33 +0100142
143[[ns_alive]]
144==== NS-ALIVE
145
Harald Welte32b58e62016-03-10 12:45:22 +0700146This message is sent periodically to test connectivity according to
Harald Welte89384312020-12-01 08:57:34 +01001473GPP TS 48.016 § 4.5.3. The expected response is NS-ALIVE-ACK
Harald Welte32b58e62016-03-10 12:45:22 +0700148(<<ns_alive_ack>>). If no such response arrives within given amount of
149time (3 seconds) than another NS-ALIVE message is sent and failed test
150attempt is recorded. After 10 failed attempts NS connection is
151considered dead and OsmoPCU tries to reconnect.
152
Harald Welte89384312020-12-01 08:57:34 +0100153The message conforms to 3GPP TS 48.016 § 9.2.1 specification.
Max4e2a1e32016-03-02 18:30:33 +0100154
155[[ns_alive_ack]]
156==== NS-ALIVE-ACK
157
Harald Welte32b58e62016-03-10 12:45:22 +0700158This message is sent automatically in reply to NS-ALIVE (<<ns_alive>>)
159message.
160
Harald Welte89384312020-12-01 08:57:34 +0100161The message conforms to 3GPP TS 48.016 § 9.2.2 specification.
Harald Welteb682cd62016-02-29 15:09:55 +0100162
Harald Welteb6453652020-12-12 20:03:10 +0100163[[sns_ack]]
164==== SNS-ACK
165
166[[sns_add]]
167==== SNS-ADD
168
169[[sns_changeweight]]
170==== SNS-CHANGEWEIGHT
171
172[[sns_config]]
173==== SNS-CONFIG
174
175[[sns_config_ack]]
176==== SNS-CONFIG-ACK
177
178[[sns_delete]]
179==== SNS-DELETE
180
181[[ssn_size]]
182==== SNS-SIZE
183
184[[sns_size_ack]]
185==== SNS-SIZE-ACK
186
187
Harald Welteb682cd62016-02-29 15:09:55 +0100188=== Information Elements Overview
189
190All of the IEs handled by OsmoPCU are listed below, with limitations and
Harald Welte89384312020-12-01 08:57:34 +0100191additions to 3GPP TS 48.016 specified in more detail.
Harald Welteb682cd62016-02-29 15:09:55 +0100192
Harald Welte89384312020-12-01 08:57:34 +0100193==== IEs Conforming to 3GPP TS 48.016
Harald Welteb682cd62016-02-29 15:09:55 +0100194
Max4e2a1e32016-03-02 18:30:33 +0100195The following Information Elements are accepted by OsmoPCU.
Harald Welteb682cd62016-02-29 15:09:55 +0100196
Harald Welte89384312020-12-01 08:57:34 +0100197.IEs conforming to 3GPP TS 48.016
Harald Welteb682cd62016-02-29 15:09:55 +0100198[options="header",cols="5%,10%,40%,5%,40%"]
199|===
Harald Welte89384312020-12-01 08:57:34 +0100200| tag (hex) | TS 48.016 § | IE name | <-/-> | Received/Sent by OsmoPCU
Harald Welteb6453652020-12-12 20:03:10 +0100201| 0x03 | 10.3.1 | BVCI | <-/-> | Received/Sent
202| 0x00 | 10.3.2 | Cause | <-/-> | Received/Sent
203| - | 10.3.2a | End Flag | <-/-> | Received/Sent
204| 0x0b | 10.3.2b | IP Address | <-/-> | Received/Sent
205| 0x05 | 10.3.2c | List of IP4 Elements | <-/-> | Received/Sent
206| 0x06 | 10.3.2d | List of IP6 Elements | <-/-> | Received/Sent
207| 0x07 | 10.3.2e | Maximum Number of NS-VCs | <-/-> | Received/Sent
208| 0x08 | 10.3.2f | Number of IP4 Endpoints | <-/-> | Received/Sent
209| 0x09 | 10.3.2g | Number of IP6 Endpoints | <-/-> | Received/Sent
210| 0x02 | 10.3.3 | NS PDU | <-/-> | Received/Sent
211| 0x01 | 10.3.5 | NSVCI | <-/-> | Received/Sent
212| 0x04 | 10.3.6 | NSEI | <-/-> | Received/Sent
213| - | 10.3.7 | PDU Type | <-/-> | Received/Sent
214| 0x0a | 10.3.7a | Reset Flag | <-/-> | Received/Sent
215| - | 10.3.8 | Spare Octet | <-/-> | Received/Sent
216| - | 10.3.10 | Transaction ID | <-/-> | Received/Sent
Harald Welteb682cd62016-02-29 15:09:55 +0100217|===
218
Harald Welte89384312020-12-01 08:57:34 +0100219==== IEs Not Conforming to 3GPP TS 48.016
Harald Welteb682cd62016-02-29 15:09:55 +0100220
Harald Welteb6453652020-12-12 20:03:10 +0100221.IEs conforming to 3GPP TS 48.016
222[options="header",cols="5%,10%,40%,5%,40%"]
223|===
224| tag (hex) | TS 48.016 § | IE name | <-/-> | Notice
225| - | 10.3.9 | NS-SDU Control Bits | <-/-> | Not implemented yet
226|===
227
228All other IEs defined in 3GPP TS 48.016 § 10.3 are supported by OsmoPCU.
Harald Welteb682cd62016-02-29 15:09:55 +0100229
230==== Additional Attributes and Parameters
231
232There are no OsmoPCU specific additional Attributes and Parameters.
233
234=== Details on IEs
235
Max4e2a1e32016-03-02 18:30:33 +0100236[[ie_cause]]
237==== Cause
Harald Welteb682cd62016-02-29 15:09:55 +0100238
Harald Welte89384312020-12-01 08:57:34 +0100239This IE contains reason for a procedure or error as described in 3GPP TS 48.016 § 10.3.2.
Max4e2a1e32016-03-02 18:30:33 +0100240
241[[ie_nsvci]]
242==== NSVCI
243
Harald Welte89384312020-12-01 08:57:34 +0100244This IE represents NSVCI identity described in <<ident>> and 3GPP TS 48.016 § 10.3.5.
Max4e2a1e32016-03-02 18:30:33 +0100245
246[[ie_nspdu]]
247==== NS PDU
248
Harald Welte32b58e62016-03-10 12:45:22 +0700249This IE contains PDU (possibly truncated) which cause error described
Harald Welte89384312020-12-01 08:57:34 +0100250in NS-STATUS message (<<ns_status>>) as described in 3GPP TS 48.016 §
Harald Welte32b58e62016-03-10 12:45:22 +070025110.3.3.
Max4e2a1e32016-03-02 18:30:33 +0100252
253[[ie_nssdu]]
254==== NS SDU
255
256This IE contains BSSGP data - see <<bssgp>> for details.
257
258[[ie_bvci]]
259==== BVCI
260
Harald Welte89384312020-12-01 08:57:34 +0100261This IE represents BSSGP identity described in <<ident>> and 3GPP TS 48.016
Harald Welte32b58e62016-03-10 12:45:22 +0700262§ 10.3.1.
Max4e2a1e32016-03-02 18:30:33 +0100263
264[[ie_nsei]]
265==== NSEI
266
Harald Welte89384312020-12-01 08:57:34 +0100267This IE represents NSEI identity described in <<ident>> and 3GPP TS 48.016 §
Harald Welte32b58e62016-03-10 12:45:22 +070026810.3.6.
Max4e2a1e32016-03-02 18:30:33 +0100269
270[[ns_init]]
Harald Welteb682cd62016-02-29 15:09:55 +0100271=== Gb NS Initialization / PCU bring-up
272
Harald Welte6fb29632016-03-10 12:53:06 +0700273OsmoPCU binds and connects an UDP socket for NS using port numbers and IP
274information given by OsmoBTS via the PCU socket. OsmoBTS in turn
275receives this information from the BSC vi A-bis OML.
276
277Following successful initialization of the UDP socket, the reset
Harald Welte32b58e62016-03-10 12:45:22 +0700278procedure is initiated as described in <<ns_reset>>.