Project

General

Profile

Wiki » History » Version 1

laforge, 02/21/2016 08:16 PM

1 1 laforge
h1. OsmoHNBGW
2 1 laforge
3 1 laforge
We are implementing Iuh support in the Osmocom stack, mostly carried out by employees of sysmocom GmbH[1], with highly appreciated (yet undisclosed) external backing.
4 1 laforge
5 1 laforge
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.
6 1 laforge
7 1 laforge
Here is an ASCII art overview of our current aim:
8 1 laforge
<pre>
9 1 laforge
        +------------+           +--------+          +----------+
10 1 laforge
 UE <-->| hNodeB     |<--Iuh---->| HNB-GW |<--IuCS-->| OsmoCSCN |
11 1 laforge
 UE <-->| femto cell |     ...-->|        |    ...-->|          |
12 1 laforge
        |            |           |        |          +----------+
13 1 laforge
        +------------+<--GTP-U   |        |
14 1 laforge
                              \  |        |          +------+           +------+
15 1 laforge
                              |  |        |<--IuPS-->| SGSN |<--GTP-C-->| GGSN |
16 1 laforge
                              |  +--------+    ...-->|      |   GTP-U-->|      |
17 1 laforge
                              |                      +------+  /        +------+
18 1 laforge
                              \_______________________________/
19 1 laforge
20 1 laforge
21 1 laforge
                      Iuh                         IuCS/IuPS
22 1 laforge
23 1 laforge
NAS                   +----+----+                 +----+----+
24 1 laforge
Non-Access Stratum    | CC | MM |                 | CC | MM |
25 1 laforge
- - - - - - - - - - - +----+----+-------+         +----+----+
26 1 laforge
                      | RANAP   |       |    H    | RANAP   |
27 1 laforge
Access Stratum        +---------+ HNBAP |    N    +---------+ - - SCCP USER SAP
28 1 laforge
                      | RUA     |       |    B    | SUA     |  \
29 1 laforge
                      +---------+-------+    -    +---------+  |
30 1 laforge
                      |        SCTP     |    G    | SCTP    |  } SIGTRAN
31 1 laforge
                      +-----------------+    W    +---------+  |
32 1 laforge
                      |        IP       |         | IP      |  /
33 1 laforge
                      +-----------------+         +---------+
34 1 laforge
</pre>
35 1 laforge
36 1 laforge
UE (User Endpoint) == MS (Mobile Subscriber) == mobile device
37 1 laforge
CSCN (Circuit Switched Core Network) == OsmoNITB without BSC
38 1 laforge
(Source: ​http://git.osmocom.org/osmo-iuh/tree/doc/protocols_around_hnbgw.txt )
39 1 laforge
40 1 laforge
41 1 laforge
h2. 3G in a Nutshell
42 1 laforge
43 1 laforge
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.
44 1 laforge
45 1 laforge
h3. HNB-GW
46 1 laforge
47 1 laforge
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 OsmoCSCN or the OsmoSGSN. The HNB-GW is implemented in osmo-iuh/src/hnbgw.c, compiling as osmo-hnbgw, and is (mostly?) complete.
48 1 laforge
49 1 laforge
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.
50 1 laforge
51 1 laforge
h3. HNBAP
52 1 laforge
53 1 laforge
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.
54 1 laforge
55 1 laforge
h3. SIGTRAN
56 1 laforge
57 1 laforge
Typically, the IuCS and IuPS interfaces would talk this layering of protocols:
58 1 laforge
<pre>
59 1 laforge
  CC/MM
60 1 laforge
  RANAP
61 1 laforge
  SCCP  <--- note
62 1 laforge
  M3UA  <--- note
63 1 laforge
  SCTP
64 1 laforge
  IP
65 1 laforge
</pre>
66 1 laforge
67 1 laforge
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).
68 1 laforge
69 1 laforge
However, since SUA does the same as SCCP-over-M3UA and is simpler to implement, our HNB-GW talks SUA towards IuCS and IuPS:
70 1 laforge
<pre>
71 1 laforge
  CC/MM
72 1 laforge
  RANAP
73 1 laforge
  SUA   <--- note
74 1 laforge
  SCTP
75 1 laforge
  IP
76 1 laforge
</pre>
77 1 laforge
78 1 laforge
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]).
79 1 laforge
80 1 laforge
Various SIGTRAN implementations:
81 1 laforge
<pre>
82 1 laforge
                IuCS/IuPS
83 1 laforge
                  usual
84 1 laforge
                   |     simplest
85 1 laforge
                   |       |
86 1 laforge
                   v       v
87 1 laforge
  +------+------+------+-----+
88 1 laforge
  | SCCP | SCCP |      |     |
89 1 laforge
  +------+------+ SCCP |     |
90 1 laforge
  | MTP3 | MTP3 |      |     |
91 1 laforge
  +------+------+------+ SUA |
92 1 laforge
  | MTP2 |      |      |     |
93 1 laforge
  +------+ M2UA | M3UA |     |
94 1 laforge
  | M2PA |      |      |     |
95 1 laforge
  +------+------+------+-----+
96 1 laforge
  |           SCTP           |
97 1 laforge
  +--------------------------+
98 1 laforge
  |            IP            |
99 1 laforge
  +--------------------------+
100 1 laforge
</pre>
101 1 laforge
102 1 laforge
h3. ASN1 Convolutions
103 1 laforge
104 1 laforge
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.
105 1 laforge
106 1 laforge
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).
107 1 laforge
108 1 laforge
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/.
109 1 laforge
110 1 laforge
It could be more beautiful, but the bottom line is that we now have fully free/libre support for Iuh ASN1 encodings. Cheers!
111 1 laforge
112 1 laforge
h2. Conclusion
113 1 laforge
114 1 laforge
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!
115 1 laforge
116 1 laforge
h2. External References
117 1 laforge
118 1 laforge
fn1. ​http://www.sysmocom.de 
119 1 laforge
120 1 laforge
fn2. ​https://media.ccc.de/v/32c3-7412-running_your_own_3g_3_5g_network
121 1 laforge
 
122 1 laforge
fn3. ​http://git.osmocom.org/erlang/osmo_ss7
123 1 laforge
124 1 laforge
fn4. ​http://www.eurecom.fr 
125 1 laforge
126 1 laforge
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)