Project

General

Profile

News post draft 2019-11-25 » History » Version 8

neels, 11/25/2019 01:57 AM

1 1 neels
h1. Distributed GSM / Multicast MS Lookup
2
3
When building communal mobile telephony networks in rural areas, traditional
4
core network infrastructure poses a fundamental challenge: it is built on a
5
centralised paradigm and requires highly available network links at all times.
6 4 neels
Osmocom is currently implementing Distributed GSM (D-GSM), a concept that is a
7
far better match for a decentralised cooperation of independent communal mobile
8
networks, who don't have the luxury of ultra-reliable networking infrastructure.
9 2 neels
10 1 neels
When several communities, who have each built their own independent mobile
11
network infrastructure, would like to join their services and allow calling,
12
messaging and Roaming across sites, the usual answer would be a centralised
13
gateway entity to locate subscribers, and, naturally, a central authority
14
governing all participating communities. That is a challenge, not only socially
15
and administratively, but is also quite impractical when the network links
16
between communities tend to be unstable or expensive.
17
18
For example, when a phone has just moved two a different coverage area, but
19 5 neels
weather conditions impair the hypothetical wireless link to a central subscriber
20 1 neels
database, the phone becomes unreachable, even for callers in the local vicinity
21 3 neels
where connecting a voice call would not have posed any problem.
22 1 neels
23 3 neels
A solution that comes to mind is a series of mirrors of that central database,
24
one for each site; however, that requires database synchronisation, which in
25
practice leads to a considerable delay. After a subscriber has moved to a
26
different coverage area, it can take something like half an hour until a site
27
notices that a given subscriber has lost reception to its network, and until it
28
has synchronised that fact with other sites. For that duration, callers are
29
unable to get the accurate current position of the person they are trying to
30
reach. Imagine a subscriber located just between two coverage areas, often
31
switching back and forth between them at random -- service would be disrupted
32
probably for most of the day.
33
34 5 neels
To solve these challenges, we are implementing D-GSM as part of the Osmocom CNI
35 8 neels
stack. D-GSM is a close cooperation with/for Rhizomatica [[#Links|1]], an organization of
36 5 neels
community owned operators providing mobile telephony service in numerous rural
37
communities in Oaxaca, Mexico. We are aiming to overcome common practical
38
problems that their current mobile networks are experiencing, improving
39
availability and stability. The results of this work are naturally contributed
40
to the Osmocom project and are freely available for anyone to use, under terms
41
of the GNU AGPL. The implementation of D-GSM is mostly funded by the Mozilla
42
MOSS grant [2], and carried out by sysmocom-employed [3] Osmocom contributors.
43
Thank you for making this possible!
44 1 neels
45
The solution we are implementing is inspired by the actual social and physical
46
structure that we aim to service: each village in Oaxaca has their own fully
47
independent core network stack, and each community is fully in charge of their
48
own infrastructure. There is no central authority governing across communities,
49 5 neels
by deliberate choice. Because the infrastructure is operated in remote rural
50
areas, often from a pole on a hill crest running on solar panels, and with
51
directional wifi over large distances, network links between villages can be
52
unstable.
53 1 neels
54 6 neels
D-GSM is a relatively simple, low impact addition to an Osmocom CNI, which is
55 1 neels
designed to match Rhizomatica's situation:
56
57
* it de-centrally resolves the current location of a subscriber (by MSISDN or
58
  IMSI),
59
* provides service addresses to directly reach the subscriber (so far SIP, SMPP
60
  and GSUP; freely extendable), and
61
* it proxies HLR services to provide Roaming across villages.
62
63
The key technology that enables D-GSM in Osmocom is called mslookup, which is
64
built on multicast DNS -- quite similar to the concept of service discovery in
65 7 neels
zeroconf networking [4].
66
67
Whenever calling or messaging a particular phone number (MSISDN), a multicast
68
request is dispatched to all connected sites. Each site where that subscriber
69
has recently been attached replies with the age of the local record, and the
70
youngest aged response wins.
71 1 neels
72 8 neels
_Figure 1: mslookup for connecting subscribers: Alice is visiting village C;
73
a phone call gets routed directly to her current location independently from
74
her resident village infrastructure_
75
76
{{graphviz_link()
77
digraph G {
78
rankdir=LR
79
	
80
subgraph cluster_village_b {
81
	label="Village B"
82
	ms_bob [label="Bob\n(from village B)",shape=box]
83
	pbx_b [label="SIP B"]
84
}
85
86
subgraph cluster_village_c {
87
	label="Village C"
88
	ms_alice [label="Alice\n(from village A)",shape=box]
89
	msc_c [label="MSC C"]
90
	hlr_c [label="HLR C"]
91
	sip_c [label="SIP C"]
92
}
93
94
ms_alice -> msc_c [style=dashed,arrowhead=none]
95
msc_c -> hlr_c [label="attached",style=dashed,arrowhead=none]
96
ms_bob -> pbx_b [label="call Alice"]
97
pbx_b -> hlr_c [label="mslookup by MSISDN",style=dotted,dir=both]
98
pbx_b -> sip_c -> msc_c -> ms_alice [label="call"]
99
}
100
}}
101
102 1 neels
Furthermore, when a subscriber visits a site where its IMSI is not known,
103
mslookup can find the IMSI's home HLR location and provide Roaming service,
104
transparently proxying to the remote site's HLR.
105
106 8 neels
_Figure 2: mslookup for Roaming: Alice visits village B; she can attach to the
107
local mobile network, which proxies HLR administration to her home village._
108
109
{{graphviz_link()
110
digraph G {
111
rankdir=LR
112
	
113
subgraph cluster_village_b {
114
	label="Village B"
115
116
	ms_alice [label="Alice\n(from village A)",shape=box]
117
	msc_b [label="MSC B"]
118
	hlr_b [label="HLR B"]
119
}
120
121
subgraph cluster_village_a {
122
	label="Village A"
123
	hlr_alice [label="Alice's home HLR"]
124
}
125
126
ms_alice -> msc_b -> hlr_b [label="Location\nUpdating"]
127
hlr_b -> hlr_alice [label="mslookup by IMSI",style=dotted,dir=both]
128
hlr_b -> hlr_alice [label="GSUP proxy forwarding"]
129
}
130
}}
131
132 1 neels
By nature of multicast lookups, D-GSM is highly resilient against single sites
133
or links becoming temporarily unavailable. Service between still reachable sites
134
simply continues; Service to a disconnected site resumes as soon as it becomes
135
reachable again. Even adding a new site to the communal network is basically
136
done by setting up a network link with multicast routing, and by choosing
137
distinct naming for the local GSUP services.
138
139 8 neels
OsmoHLR is the workhorse for our D-GSM implementation. In fact, no other
140
Osmocom CNI program's code base besides OsmoHLR itself needs to be touched for
141
implementing D-GSM:
142 1 neels
143
* OsmoHLR answers all service endpoint requests for locally attached
144
  subscribers, as configured in osmo-hlr.cfg;
145
* For IMSIs it doesn't find in the local db (outgoing Roaming), OsmoHLR takes
146
  care of requesting the home HLR of the IMSI and of proxy-routing HLR
147
  operations there; and
148
* OsmoHLR answers requests for all IMSIs it finds in the local db (incoming
149
  Roaming).
150
151 8 neels
A D-GSM enabled OsmoHLR will soon be available on the osmo-hlr.git master
152
branch -- the implementation is currently undergoing peer review to be merged
153
to the master branch.
154 1 neels
155
The elements that request cross-site service for voice and SMS (currently) are:
156
157
* a custom dialplan implementation for a PBX connected to OsmoMSC via
158
  OsmoSIPConnector (we're using FreeSWITCH [5] in the lab), and
159
* a custom SMPP handler connected to OsmoMSC,
160
161
both of which are available as example implementations in osmo-hlr.git/contrib/
162
[6].
163
164
This list is likely to be enhanced with further example integrations, like more
165
FLOSS PBX integrations, or SMS-over-GSUP transport instead of SMPP. That's up to
166
the Osmocom community to implement and contribute. If you need more information,
167
take a look at OsmoHLR's user manual [7].
168
169
All of the above technology is fully functional in our lab setup right now: we
170
are routing Location Updating requests, calls, and SMS to the right site,
171
entirely without the need for centralised administrative infrastructure.
172
173
A further aim of D-GSM is providing Roaming service even though the link to the
174
respective home HLR is unstable or altogether down. The solution is adding a
175
persistent local cache to the HLR proxy, which we are going to implement next.
176
177
D-GSM is, technologically, a relatively trivial enhancement of the Osmocom CNI.
178
Yet it brings an entirely new paradigm to mobile core network infrastructure: It
179
allows independent mobile core network stacks to provide voice, SMS and Roaming
180
services cooperatively, without the need for centralised infrastructure or
181
administration authority, and is resilient against unstable network links
182
between sites. It elegantly provides ad-hoc service for subscribers, who are
183
free to move across all coverage areas, and it allows sites to dynamically join
184
or leave the cooperative network without the need for configuration changes nor
185
administrative decisions at other sites.
186
187
It also has been and is great fun to implement a versatile enhancement that, for
188
a change, completely surpasses 3GPP specifications, and has the potential to
189
change the fundamental shape of communal mobile coverage. We're looking forward
190
to see D-GSM in action in Oaxaca, soon.
191
192 8 neels
h2. Links
193
194
* [1] https://www.rhizomatica.org/
195
* [2] https://www.mozilla.org/en-US/moss/
196
* [3] https://www.sysmocom.de/
197
* [4] https://en.wikipedia.org/wiki/Zeroconf#DNS-based_service_discovery
198
* [5] https://freeswitch.org/
199
* [6] Soon on the master branch at
200 2 neels
    https://git.osmocom.org/osmo-hlr/tree/contrib/dgsm ,
201
    at the time of writing only on the development branch at
202
    https://git.osmocom.org/osmo-hlr/tree/contrib/dgsm?h=neels/dgsm
203 8 neels
* [7] Soon from the master branch at
204 2 neels
    https://ftp.osmocom.org/docs/latest/osmohlr-usermanual.pdf ,
205
    at the time of writing only on the development branch at
206
    https://git.osmocom.org/osmo-hlr/tree/doc/manuals/chapters/dgsm.adoc?h=neels/dgsm
Add picture from clipboard (Maximum size: 48.8 MB)