Project

General

Profile

News post draft 2019-11-25 » History » Revision 3

Revision 2 (neels, 11/25/2019 01:14 AM) → Revision 3/18 (neels, 11/25/2019 01:18 AM)

h1. Distributed GSM / Multicast MS Lookup 

 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. 

 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. 

 For example, when a phone has just moved two a different coverage area, but 
 weather conditions impair the link to a hypothetical 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. 

 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. 

 To solve these challenges, Osmocom is currently implementing Distributed GSM 
 (D-GSM) as part of the Osmocom CNI stack. We are working closely with/for 
 Rhizomatica [1], an organization of community owned operators providing mobile 
 telephony service in numerous rural communities in Oaxaca, Mexico. We are aiming to 
 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], and carried out by sysmocom-employed [3] 
 Osmocom contributors. Thank you for making this possible! 

 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 run in remote rural areas, 
 often from a pole on a hill crest run by solar panels, and with directional wifi 
 over large distances, network links between villages can be unstable. 

 D-GSM is a quite simple, low impact modification to an Osmocom CNI, which is 
 designed to match Rhizomatica's situation: 

 * it de-centrally resolves the current location of a subscriber (by MSISDN or 
   IMSI), 
 * provides service addresses to directly reach the subscriber (so far SIP, SMPP 
   and GSUP; freely extendable), and 
 * it proxies HLR services to provide Roaming across villages. 

 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]. 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. Furthermore, when a 
 subscriber visits another village and attaches to the local service, mslookup 
 can find the IMSI's home HLR location and provide Roaming service, proxying to 
 the remote site's HLR. 

 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. 

 OsmoHLR is the workhorse for our D-GSM implementation: 

 * OsmoHLR answers all service endpoint requests for locally attached 
   subscribers, as configured in osmo-hlr.cfg; 
 * For IMSIs it doesn't find in the local db (outgoing Roaming), OsmoHLR takes 
   care of requesting the home HLR of the IMSI and of proxy-routing HLR 
   operations there; and 
 * OsmoHLR answers requests for all IMSIs it finds in the local db (incoming 
   Roaming). 

 In fact, no Osmo-Programs' code bases besides OsmoHLR itself need to be touched 
 for implementing D-GSM. 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. 

 The elements that request cross-site service for voice and SMS (currently) are: 

 * a custom dialplan implementation for a PBX connected to OsmoMSC via 
   OsmoSIPConnector (we're using FreeSWITCH [5] in the lab), and 
 * a custom SMPP handler connected to OsmoMSC, 

 both of which are available as example implementations in osmo-hlr.git/contrib/ 
 [6]. 

 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]. 

 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. 

 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. 

 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. 

 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. 

 [1] https://www.rhizomatica.org/ 
 [2] https://www.mozilla.org/en-US/moss/ 
 [3] https://www.sysmocom.de/ 
 [4] https://en.wikipedia.org/wiki/Zeroconf#DNS-based_service_discovery 
 [5] https://freeswitch.org/ 
 [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 
 [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)