Project

General

Profile

OsmoHNBGW » History » Version 5

laforge, 05/11/2018 11:25 AM
packages / manuals / sources / testsuite

1 4 laforge
{{>toc}}
2
3 1 laforge
h1. OsmoHNBGW
4
5 4 laforge
We have implemented 3GPP Iuh support in the Osmocom stack, mostly carried out by employees of sysmocom GmbH[1], with highly appreciated (yet undisclosed) external backing.
6 1 laforge
7
Iu support in Osmocom will allow using a femto-cell aka hNodeB as BTS, thus enabling UMTS voice (IuCS) and data (IuPS) connectivity using FOSS software from the core network right up to the femto-cell's ethernet jack.
8
9
Here is an ASCII art overview of our current aim:
10
<pre>
11
        +------------+           +--------+          +----------+
12 2 neels
 UE <-->| hNodeB     |<--Iuh---->| HNB-GW |<--IuCS-->| OsmoMSC  |
13 1 laforge
 UE <-->| femto cell |     ...-->|        |    ...-->|          |
14
        |            |           |        |          +----------+
15
        +------------+<--GTP-U   |        |
16
                              \  |        |          +------+           +------+
17
                              |  |        |<--IuPS-->| SGSN |<--GTP-C-->| GGSN |
18
                              |  +--------+    ...-->|      |   GTP-U-->|      |
19
                              |                      +------+  /        +------+
20
                              \_______________________________/
21
22
23
                      Iuh                         IuCS/IuPS
24
25
NAS                   +----+----+                 +----+----+
26
Non-Access Stratum    | CC | MM |                 | CC | MM |
27
- - - - - - - - - - - +----+----+-------+         +----+----+
28
                      | RANAP   |       |    H    | RANAP   |
29
Access Stratum        +---------+ HNBAP |    N    +---------+ - - SCCP USER SAP
30
                      | RUA     |       |    B    | SUA     |  \
31
                      +---------+-------+    -    +---------+  |
32
                      |        SCTP     |    G    | SCTP    |  } SIGTRAN
33
                      +-----------------+    W    +---------+  |
34
                      |        IP       |         | IP      |  /
35
                      +-----------------+         +---------+
36
</pre>
37
38
UE (User Endpoint) == MS (Mobile Subscriber) == mobile device
39
(Source: ​http://git.osmocom.org/osmo-iuh/tree/doc/protocols_around_hnbgw.txt )
40
41 3 laforge
{{include(cellular-infrastructure:MacroBinaryPackages)}}
42
43 1 laforge
44
h2. 3G in a Nutshell
45
46
Let me illustrate some details of the Iu interfaces. The following is basically Harald's 3G talk at the 32c3[2], but with the sheer abundance of complexity it can't hurt to read it in prose.
47
48
h3. HNB-GW
49
50 2 neels
The HNB-GW, i.e. the HomeNodeB Gateway, merely reads the CN-DomainIndicator from the RUA layer, which says whether the frame is for voice or data comms (IuCS or IuPS). It then sends the actual RANAP payload either to the OsmoMSC or the OsmoSGSN. The HNB-GW is implemented in osmo-iuh/src/hnbgw.c, compiling as osmo-hnbgw, and is (mostly?) complete.
51 1 laforge
52
An interesting factoid is that for an hNodeB, the GTP-Control handshaking goes via the HNB-GW, while the packet user data actually goes directly to/from the hNodeB and the GGSN.
53
54
h3. HNBAP
55
56
HNBAP is merely the protocol employed to register an hNodeB with the HomeNodeB Gateway. After HNBAP is done, the hNodeB sends RANAP-over-RUA, which the HNB-GW happily passes on to the proper consumers.
57
58
h3. SIGTRAN
59
60
Typically, the IuCS and IuPS interfaces would talk this layering of protocols:
61
<pre>
62
  CC/MM
63
  RANAP
64
  SCCP  <--- note
65
  M3UA  <--- note
66
  SCTP
67
  IP
68
</pre>
69
70
We do have SCCP support in Osmocom, but so far only for "connectionless" messages (like your standard UDP datagrams). Iu now adds the need for establishing and tearing down connections (like TCP).
71
72
However, since SUA does the same as SCCP-over-M3UA and is simpler to implement, our HNB-GW talks SUA towards IuCS and IuPS:
73
<pre>
74
  CC/MM
75
  RANAP
76
  SUA   <--- note
77
  SCTP
78
  IP
79
</pre>
80
81
To support third-party MSC and SGSN components, we would either add SCCP-over-M3UA capability, or simply use an external signalling gateway that supports both M3UA and SUA (should be possible e.g. with osmo_ss7[3]).
82
83
Various SIGTRAN implementations:
84
<pre>
85
                IuCS/IuPS
86
                  usual
87
                   |     simplest
88
                   |       |
89
                   v       v
90
  +------+------+------+-----+
91
  | SCCP | SCCP |      |     |
92
  +------+------+ SCCP |     |
93
  | MTP3 | MTP3 |      |     |
94
  +------+------+------+ SUA |
95
  | MTP2 |      |      |     |
96
  +------+ M2UA | M3UA |     |
97
  | M2PA |      |      |     |
98
  +------+------+------+-----+
99
  |           SCTP           |
100
  +--------------------------+
101
  |            IP            |
102
  +--------------------------+
103
</pre>
104
105
h3. ASN1 Convolutions
106
107
RANAP, RUA and HNBAP, which make up the Iuh interface, are ASN1 encoded. Fair enough, but their ASN1 encoding uses APER, and heavily employs Information Object Classes (which basically means it wraps ASN1 encoded binary data in ASN1 IEs, with several levels of depth). In consequence, the libre asn1c compiler as-is unfortunately is not capable of generating de-/encoders for UMTS. The proprietary ffasn1c is capable of that, and we could publish the ffasn1c generated code without licensing problems, but we'd highly prefer to empower the FOSS community with the ability to modify and fix the ASN1 de-/encoders independently of proprietary software.
108
109
The great news is that Eurecom[4] has worked on supporting both APER and the nested ASN1 structures ("Information Object Classes") in asn1c, and we are able to use their solutions in a FOSS way. With some fixes added, we have both their APER support and their pythonic solution for nested ASN1 available in Osmocom's libasn1c and asn1c git repositories (5).
110
111
Another problem with the Iuh ASN1 is that various type names are identical across RANAP, RUA and HNBAP, while their encodings differ. This causes type name collisions in the code generated by asn1c, hence we have added prefixing support to our version of asn1c. This simply means that each RANAP-related type name or function begins with "ranap_", and RUA names begin with "rua_", thus avoiding any and all name collisions between those protocols. See osmo-iuh/include/osmocom/ranap/ and ../rua/.
112
113
It could be more beautiful, but the bottom line is that we now have fully free/libre support for Iuh ASN1 encodings. Cheers!
114
115
h2. Conclusion
116
117
Osmocom is on a clear trajectory towards full 3G support, empowering remote communities and small to medium businesses worldwide. Work is ongoing, but the really hard problems have already been solved. Stay tuned!
118
119 5 laforge
{{include(cellular-infrastructure:MacroBinaryPackages)}}
120
121
h2. Manuals
122
123
No HNB-GW user manual yet, sorry. See #2588, #2589
124
125
h2. Source code
126
127
The source code is available from @git.osmocom.org@ (module @osmo-iuh@).
128
129
Public read-only access is available via
130
<pre>
131
git clone git://git.osmocom.org/osmo-iuh.git
132
</pre>
133
134
You can browse it via cgit:  https://git.osmocom.org/osmo-iuh
135
136
Contributions are welcome via [[cellular-infrastructure:Gerrit]].
137
138
h2. Test Suite
139
140
We not yet have an automatic test suite (e.g. as part of our [[cellular-infrastructure:Titan_TTCN3_Testsuites]]), see #2858
141
142
143 1 laforge
h2. External References
144
145
fn1. ​http://www.sysmocom.de 
146
147
fn2. ​https://media.ccc.de/v/32c3-7412-running_your_own_3g_3_5g_network
148
 
149
fn3. ​http://git.osmocom.org/erlang/osmo_ss7
150
151
fn4. ​http://www.eurecom.fr 
152
153
fn5. See ​http://git.osmocom.org/libasn1c/ and ​http://git.osmocom.org/asn1c/log/?h=aper-prefix
Add picture from clipboard (Maximum size: 48.8 MB)