Project

General

Profile

OsmoHNBGW » History » Version 18

osmith, 12/21/2022 03:28 PM
after further discussion with Pau, the branch is now osmo-iuh/master

1 1 laforge
h1. OsmoHNBGW
2 8 fixeria
3
{{>toc}}
4 1 laforge
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 14 neels
Iu support in Osmocom allows using a femto-cell aka hNodeB as 3G base transceiver station, 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 1 laforge
9 13 neels
Here is an overview of HNBGW operation:
10 1 laforge
11 13 neels
{{graphviz_link()
12 1 laforge
13 13 neels
digraph G {
14
  rankdir = LR;
15
  
16
  UE [label="UE\n(3G phone)"]
17
  PBX [label="PBX\nAsterisk, FreeSwitch,\nKamailio, Yate, ..."]
18
19
  subgraph cluster_msc_mgw {
20
    style=dotted
21
    MSC
22
    MGW1 [label="MGW"]
23
    MSC -> MGW1 [label="MGCP",constraint=false]
24
  }
25
26
  subgraph cluster_hnbgw_mgw_upf {
27
    style=dotted
28
    MGW3 [label="MGW"]
29
    UPF
30 15 neels
    HNBGW [label=OsmoHNBGW,style=bold]
31 13 neels
    HNBGW -> MGW3 [label="MGCP",constraint=false]
32
    HNBGW -> UPF [label="PFCP",constraint=false]
33
  }
34
35
  hNodeB [shape="box",label="hNodeB\n(3G femto cell)"]
36
37
  MSC -> HLR [label="\nGSUP",style=bold]
38
  SGSN -> HLR [label="GSUP",style="dashed,bold"]
39
  UE -> hNodeB [label="Uu",style=bold]
40
  UE -> hNodeB [style="dashed,bold"]
41
  hNodeB -> HNBGW [label="Iuh",style="bold"]
42
  STP2 [label="STP\n(SCCP/M3UA)"]
43
  HNBGW -> STP2 -> SGSN [label="IuPS",style="dashed,bold"]
44
  HNBGW -> STP2 -> MSC [label="IuCS",style="bold"]
45
  SGSN -> GGSN [label="GTP-C",style="dashed,bold"]
46
  hNodeB -> UPF -> GGSN [label="GTP-U(3G)",style="dashed"]
47
  GGSN -> internet [label="tun",style="dashed"]
48
49
  hNodeB -> MGW3 [label="IuUP/RTP",constraint=false]
50
  MGW3 -> MGW1 [label="IuUP/RTP"]
51
52
  MSC -> SIPConnector [label="MNCC socket",style=bold]
53
54
  SIPConnector -> PBX [label="SIP",style=bold]
55
  MGW1 -> PBX [label="RTP"]
56
57
  A, B, C, D [style="invisible"]
58
  A -> B [label="data (PS)",style="dashed"]
59
  C -> D [label="voice/SMS/USSD (CS)"]
60
61
}
62
63
}}
64
65
<pre>
66 1 laforge
                      Iuh                         IuCS/IuPS
67
68
NAS                   +----+----+                 +----+----+
69
Non-Access Stratum    | CC | MM |                 | CC | MM |
70
- - - - - - - - - - - +----+----+-------+         +----+----+
71
                      | RANAP   |       |    H    | RANAP   |
72
Access Stratum        +---------+ HNBAP |    N    +---------+ - - SCCP USER SAP
73 13 neels
                      | RUA     |       |    B    | M3UA    |  \
74 1 laforge
                      +---------+-------+    -    +---------+  |
75
                      |        SCTP     |    G    | SCTP    |  } SIGTRAN
76
                      +-----------------+    W    +---------+  |
77
                      |        IP       |         | IP      |  /
78
                      +-----------------+         +---------+
79
</pre>
80 11 laforge
81 1 laforge
{{include(cellular-infrastructure:MacroBinaryPackages)}}
82
83 14 neels
h2. HNB-GW
84 1 laforge
85 14 neels
The HNB-GW, i.e. the HomeNodeB Gateway, negotiates HNBAP to register hNodeB connections, and then splits Iuh (RUA) to IuCS and IuPS (RANAP). IuCS/RANAP is delivered to the MSC, IuPS/RANAP to the SGSN.
86 1 laforge
87 15 neels
The IuUP/RTP and GTP user plane data is optionally proxied via local MGW and UPF instances, or sent directly to the MSC's MGW and the GGSN. OsmoHNBGW controls its local MGW via the MGCP protocol, and the UPF via the PFCP protocol.
88 1 laforge
89
h2. Manuals
90
91 14 neels
* OsmoHNBGW User Manual: https://ftp.osmocom.org/docs/latest/osmohnbgw-usermanual.pdf
92 1 laforge
* osmo-hnbgw VTY Reference: https://ftp.osmocom.org/docs/latest/osmohnbgw-vty-reference.pdf
93
94
h2. Source code
95
96
The source code is available from @gitea.osmocom.org@ (module @osmo-hnbgw@).
97
98
Public read-only access is available via
99
<pre>
100
git clone https://gitea.osmocom.org/cellular-infrastructure/osmo-hnbgw.git
101 5 laforge
</pre>
102
103
You can browse it via gitea: https://gitea.osmocom.org/cellular-infrastructure/osmo-hnbgw
104
105 6 daniel
Contributions are welcome via [[cellular-infrastructure:Gerrit]].
106
107
h2. Test Suite
108 5 laforge
109
* Source code: https://gitea.osmocom.org/ttcn3/osmo-ttcn3-hacks/src/branch/master/hnbgw
110
* Test results: https://jenkins.osmocom.org/jenkins/job/ttcn3-hnbgw-test/
111 14 neels
112
h2. Some context
113
114
See Harald's 3G talk at the 32c3[2]
115
116
h3. ASN1 support
117
118
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.
119
120
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).
121
122
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/.
123
124
It could be more beautiful, but the bottom line is that we now have fully free/libre support for Iuh ASN1 encodings. Cheers
125
126 16 osmith
See also: [[generate sources from ASN1 files]]
127 5 laforge
128 1 laforge
h2. External References
129
130
fn1. ​http://www.sysmocom.de 
131
132
fn2. ​https://media.ccc.de/v/32c3-7412-running_your_own_3g_3_5g_network
133
 
134
fn3. ​http://git.osmocom.org/erlang/osmo_ss7
135
136
fn4. ​http://www.eurecom.fr 
137
138 18 osmith
fn5. See ​http://git.osmocom.org/libasn1c/ and ​https://gitea.osmocom.org/osmocom/asn1c, osmo-iuh/master branch
139 7 laforge
140
{{include(cellular-infrastructure:MacroCommercialSupport)}}
Add picture from clipboard (Maximum size: 48.8 MB)