Project

General

Profile

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

neels, 11/25/2019 11:54 PM
Roaming -> roaming

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