blob: 3788389b56ee1cad4e2dac5037072158673059b3 [file] [log] [blame]
Harald Welteb682cd62016-02-29 15:09:55 +01001== Network Service (NS)
2
3=== List of Messages
4
5The following tables list the NS messages used by OsmoPCU, grouped by their
6level of compliance with 3GPP TS 08.16.
7
8==== Messages Compliant With TS 08.16
9
Max4e2a1e32016-03-02 18:30:33 +010010The NS protocol is implemented inside libosmocore so none of the messages below are sent by OsmoPCU explicitly.
11Instead corresponding functions from libosmocore are called which send and receive messages as necessary. See <<ns_init>> for details
12on establishing NS connection.
13
Harald Welteb682cd62016-02-29 15:09:55 +010014.Messages compliant with TS 08.16
15[options="header",cols="10%,10%,20%,35%,5%,20%"]
16|===
17| TS 08.16 § | type code (hex) | This document § | Message | <-/-> | Received/Sent by OsmoPCU
Max4e2a1e32016-03-02 18:30:33 +010018| 9.2.10 | 0x00 | <<ns_unit_data>> | NS-UNITDATA | <-/-> | Received/Sent
19| 9.2.5 | 0x02 | <<ns_reset>> | NS-RESET | <-/-> | Received/Sent
20| 9.2.6 | 0x03 | <<ns_reset_ack>> | NS-RESET-ACK | <-/-> | Received/Sent
21| 9.2.3 | 0x04 | <<ns_block>> | NS-BLOCK | <-/-> | Received/Sent
22| 9.2.4 | 0x05 | <<ns_block_ack>> | NS-BLOCK-ACK | <-/-> | Received/Sent
23| 9.2.8 | 0x06 | <<ns_unblock>> | NS-UNBLOCK | <-/-> | Received/Sent
24| 9.2.9 | 0x07 | <<ns_unblock_ack>> | NS-UNBLOCK-ACK | <-/-> | Received/Sent
25| 9.2.7 | 0x08 | <<ns_status>> | NS-STATUS | <-/-> | Received/Sent
26| 9.2.1 | 0x0a | <<ns_alive>> | NS-ALIVE | <-/-> | Received/Sent
27| 9.2.2 | 0x0b | <<ns_alive_ack>> | NS-ALIVE-ACK | <-/-> | Received/Sent
Harald Welteb682cd62016-02-29 15:09:55 +010028|===
29
30==== Messages Specific to OsmoPCU
31
32There are no OsmoPCU specific NS messages.
33
34==== Messages Not Implemented by OsmoPCU
35
Max4e2a1e32016-03-02 18:30:33 +010036All the NS protocol messages from 3GPP TS 08.16 are implemented in OsmoPCU.
Harald Welteb682cd62016-02-29 15:09:55 +010037
38=== Details on Compliant NS Messages
39
Max4e2a1e32016-03-02 18:30:33 +010040[[ns_unit_data]]
41==== NS-UNITDATA
42
43This PDU transfers one NS SDU (specified in 3GPP TS 08.18) between OsmoPCU and SGSN. Upon receiving it OsmoPCU passes it to BSSGP
44implementaton to handle. It is also sent by BSSGP as necessary - see <<bssgp>> for details.
45It contains BVCI (<<ie_bvci>>) and NS SDU (<<ie_nssdu>>) IEs.
46
47[[ns_reset]]
48==== NS-RESET
49
50This message is send by OsmoPCU in order to initiate reset procedure described in 3GPP TS 08.16 § 7.3. The expected reply is
51NS-RESET-ACK (<<ns_reset_ack>>) message. If no expected reply is received in 3 seconds than the sending is retried up to 3 times.
52When this message is received it is replied with NS-RESET-ACK (<<ns_reset_ack>>).
53It might be ignored under conditions described in 3GPP TS 08.16 § 7.3.1.
54The message conforms to 3GPP TS 08.16 § 9.2.5 specification.
55It contains Cause (<<ie_cause>>), NSVCI (<<ie_nsvci>>) and NSEI (<<ie_nsei>>) IEs.
56
57[[ns_reset_ack]]
58==== NS-RESET-ACK
59
60This message is sent as a response to proper NS-RESET (<<ns_reset>>) message initiating reset procedure.
61The message conforms to 3GPP TS 08.16 § 9.2.6 specification.
62It contains NSVCI (<<ie_nsvci>>) and NSEI (<<ie_nsei>>) IEs.
63
64[[ns_block]]
65==== NS-BLOCK
66
67Upon receiving this message corresponding NS-VC is marked as blocked by OsmoPCU and NS-BLOCK-ACK (<<ns_block_ack>>) reply is
68transmitted.
69When this message is sent by OsmoPCU corresponding NS-BLOCK-ACK (<<ns_block_ack>>) reply is expected before NS-VC is actually marked
70as blocked.
71This behavior follows the blocking procedure described in 3GPP TS 08.16 § 7.2.
72The message conforms to 3GPP TS 08.16 § 9.2.3 specification.
73It contains Cause (<<ie_cause>>) and NSVCI (<<ie_nsvci>>) IEs.
74
75[[ns_block_ack]]
76==== NS-BLOCK-ACK
77
78This message is sent by OsmoPCU automatically upon reception of correct NS-BLOCK (<<ns_block>>) message.
79It is expected as a reply for NS-BLOCK (<<ns_block>>) message sent by OsmoPCU.
80The message conforms to 3GPP TS 08.16 § 9.2.4 specification.
81It contains NSVCI (<<ie_nsvci>>) IE.
82
83[[ns_unblock]]
84==== NS-UNBLOCK
85
86Upon receiving this message corresponding NS-VC is unblocked by OsmoPCU and NS-UNBLOCK-ACK (<<ns_unblock_ack>>) reply is sent.
87When this message is sent by OsmoPCU corresponding NS-UNBLOCK-ACK (<<ns_unblock_ack>>) reply is expected before NS-VC is actually
88marked as unblocked.
89This behavior follows the blocking procedure described in 3GPP TS 08.16 § 7.2.
90The message conforms to 3GPP TS 08.16 § 9.2.8 specification.
91
92[[ns_unblock_ack]]
93==== NS-UNBLOCK-ACK
94
95Receiving this message notifies OsmoPCU that NS-VC unblocking request is confirmed and thus NS-VC is marked as unblocked.
96This message is also sent as a reply to NS-UNBLOCK (<<ns_unblock>>) message.
97The message conforms to 3GPP TS 08.16 § 9.2.9 specification.
98
99[[ns_status]]
100==== NS-STATUS
101
102This message is sent to inform other party about error conditions as a response to various unexpected PDUs or PDUs with
103unexpected/missing data. If this message is received for unknown NS-VC it is ignored in accordance with 3GPP TS
10408.16 § 7.5.1, otherwise the error cause is logged if present in NS-STATUS.
105The message conforms to 3GPP TS 08.16 § 9.2.7 specification.
106It contains Cause (<<ie_cause>>) and might (depending on actual error) contain NSVCI (<<ie_nsvci>>), NS PDU (<<ie_nspdu>>) and BVCI (<<ie_bvci>>) IEs.
107
108[[ns_alive]]
109==== NS-ALIVE
110
111This message is sent periodically to test connectivity according to 3GPP TS 08.16 § 4.5.3. The expected response is
112NS-ALIVE-ACK (<<ns_alive_ack>>). If no such response arrives within given amount of time (3 seconds) than another
113NS-ALIVE message is sent and failed test attempt is recorded.
114After 10 failed attempts NS connection is considered dead and OsmoPCU tries to reconnect.
115The message conforms to 3GPP TS 08.16 § 9.2.1 specification.
116
117[[ns_alive_ack]]
118==== NS-ALIVE-ACK
119
120This message is sent automatically in reply to NS-ALIVE (<<ns_alive>>) message.
121The message conforms to 3GPP TS 08.16 § 9.2.2 specification.
Harald Welteb682cd62016-02-29 15:09:55 +0100122
123=== Information Elements Overview
124
125All of the IEs handled by OsmoPCU are listed below, with limitations and
126additions to TS 08.16 specified in more detail.
127
128==== IEs Conforming to TS 08.16
129
Max4e2a1e32016-03-02 18:30:33 +0100130The following Information Elements are accepted by OsmoPCU.
Harald Welteb682cd62016-02-29 15:09:55 +0100131
132.IEs conforming to TS 08.16
133[options="header",cols="5%,10%,40%,5%,40%"]
134|===
135| tag (hex) | TS 08.16 § | IE name | <-/-> | Received/Sent by OsmoPCU
Max4e2a1e32016-03-02 18:30:33 +0100136| 0x00 | 10.3.2 | Cause | <-/-> | Received/Sent
137| 0x01 | 10.3.5 | NSVCI | <-/-> | Received/Sent
138| 0x02 | 10.3.3 | NS PDU | <-/-> | Received/Sent
139| 0x03 | 10.3.1 | BVCI | <-/-> | Received/Sent
140| 0x04 | 10.3.6 | NSEI | <-/-> | Received/Sent
Harald Welteb682cd62016-02-29 15:09:55 +0100141|===
142
143==== IEs Not Conforming to TS 08.16
144
Max4e2a1e32016-03-02 18:30:33 +0100145All IEs defined in TS 08.16 § 10.3 are supported by OsmoPCU.
Harald Welteb682cd62016-02-29 15:09:55 +0100146
147==== Additional Attributes and Parameters
148
149There are no OsmoPCU specific additional Attributes and Parameters.
150
151=== Details on IEs
152
Max4e2a1e32016-03-02 18:30:33 +0100153[[ie_cause]]
154==== Cause
Harald Welteb682cd62016-02-29 15:09:55 +0100155
Max4e2a1e32016-03-02 18:30:33 +0100156This IE contains reason for a procedure or error as described in TS 08.16 § 10.3.2.
157
158[[ie_nsvci]]
159==== NSVCI
160
161This IE represents NSVCI identity described in <<ident>> and TS 08.16 § 10.3.5.
162
163[[ie_nspdu]]
164==== NS PDU
165
166This IE contains PDU (possibly truncated) which cause error described in NS-STATUS message (<<ns_status>>) as described in TS 08.16 § 10.3.3.
167
168[[ie_nssdu]]
169==== NS SDU
170
171This IE contains BSSGP data - see <<bssgp>> for details.
172
173[[ie_bvci]]
174==== BVCI
175
176This IE represents BSSGP identity described in <<ident>> and TS 08.16 § 10.3.1.
177
178[[ie_nsei]]
179==== NSEI
180
181This IE represents NSEI identity described in <<ident>> and TS 08.16 § 10.3.6.
182
183[[ns_init]]
Harald Welteb682cd62016-02-29 15:09:55 +0100184=== Gb NS Initialization / PCU bring-up
185
Max4e2a1e32016-03-02 18:30:33 +0100186OsmoPCU create NS listening socket using UDP port given by OsmoBTS via PCU socket. OsmoBTS in turn receive it from BSC.
187After that OsmoPCU tried to connect to remote NS ip:port over UDP using parameters received from BTS.
188Following successful connection the reset procedure is initiated as described in <<ns_reset>>.