Project

General

Profile

OsmoBSCNAT » History » Version 16

laforge, 05/25/2018 12:38 PM
cosmetics + SCCPlite clarification

1 12 laforge
{{>toc}}
2 13 laforge
3 11 zecke2
h2. BSC NAT/MUX
4
5
h3. Introduction
6
7 16 laforge
The @osmo-bsc_nat@ is masquerading multiple BSCs behind one. It listens for incoming A (SCCPlite) connections from BSCs on port 5000 and connects to a specified upstream MSC, also via SCCPlite.
8 2 laforge
9 16 laforge
It will forward Paging Requests and MGCP messages from the MSC/MGW to the right BSC (if it is connected). Each incoming SCCP connection gets patched with a different Source Reference to avoid any collision between the different BSCs.
10
11 1 zecke2
To the network the NAT looks like a real BSC, to the BSC the NAT looks like almost a real MSC. One
12 3 zecke2
difference is that MGCP messages are not send via UDP but inside the IPA protocol to avoid
13
any issues with firewalls and such.
14 4 zecke2
15 15 laforge
{{graphviz_link()
16 1 zecke2
digraph G {
17
  rankdir=LR;
18 7 laforge
  nanobts1->OpenBSC1 [ label="Abis/IP" ];
19 1 zecke2
  nanobts2->OpenBSC1 [ label="Abis/IP" ];
20 7 laforge
  nanobts3->OpenBSC2 [ label="Abis/IP" ];
21 1 zecke2
  nanobts4->OpenBSC2 [ label="Abis/IP" ];
22 7 laforge
  BSC1->cellmgr_ng1 [label="A/MTP" ];
23 16 laforge
  OpenBSC1->bsc_nat [ label="A/SCCPlite" ];
24
  OpenBSC2->bsc_nat [ label="A/SCCPlite" ];
25
  cellmgr_ng1->bsc_nat [ label = "A/SCCPlite" ];
26
  bsc_nat->MSC      [ label="A/SCCPlite" ];
27 1 zecke2
  nanobts2 [ label = "BTS 1" ];
28
  nanobts1 [ label = "BTS 2" ];
29
  nanobts3 [ label = "BTS 3" ];
30
  nanobts4 [ label = "BTS 4" ];
31
  BSC1 [ label = "Traditional BTS/BSC" ];
32 16 laforge
  OpenBSC1 [ label = "osmo-bsc-sccplite 1" ];
33
  OpenBSC2 [ label = "osmo-bsc-sccplite 2" ];
34
  cellmgr_ng1 [ label = "cellmgr_ng" ];
35
  bsc_nat [ label = "osmo-bsc_nat" ];
36 11 zecke2
}
37 9 zecke2
}}
38
39 1 zecke2
{{child_pages}}
40
41
h3. Concept
42 9 zecke2
43 16 laforge
The bsc_nat is useful when the BSCs of a GSM network are not in the same IP network. The BSC might be behind a firewall, or the IP is changing, also the ports might be masqueraded. The bsc_nat is tunneling the MGCP protocol through the A/IP link to penetrate firewalls and UDP port discovery for RTP based audio. Being the central part to the GSM network it provides detailed statistics and other features.
44 1 zecke2
45 11 zecke2
46
h3. Features
47
48 1 zecke2
h4. IMSI based access control
49 9 zecke2
50 11 zecke2
The bsc_nat provides a per MSC and per BSC IMSI filter. The filter works during the Location Updating
51
Procedure, the CM Service Request and other places. It allows to exclude IMSIs from certain locations.
52 1 zecke2
53 11 zecke2
h4. Number rewriting
54
55
The bsc_nat provides a way to rewrite destination numbers based on MNC and MCC of the subscriber.
56
57 9 zecke2
h4. USSD bypass
58 1 zecke2
59 16 laforge
The bsc_nat provides a way to forward USSD requests for certain number ranges for subscribers based on the MNC and MCC to an external process.
60 11 zecke2
61 14 laforge
h4. Detailed statistics
62 4 zecke2
63 16 laforge
The bsc_nat provides detailed statistics about the traffic of each BSC, the reason for opening the connection,  the number of active connections.
64 4 zecke2
65
66
h4. NAT traversal
67
68 16 laforge
The bsc_nat tunnels MGCP through the A/IP link, the BSC will send a beacon from the source RTP port to make the external port visible to the NAT.
69 4 zecke2
70 11 zecke2
71
h5.  USSD Bypass
72
73 16 laforge
We want to implement certain USSD messages ourselves, the MSC does not provide an extension API so it must be done inside the NAT. On ther other hand we do not want to have complicated code inside the NAT, the development of new features should not require a restart of the NAT. This means we will have a simple bypass that detects USSD messages that we want to handle and then forwards them to an external process. To begin with we will have a static decision making, which will be turned into more dynamic pattern matching.
74 4 zecke2
75
h5. Implementation in the NAT
76
77 16 laforge
The difficulty is the management of the SCCP Connection. In case of a USSD operation as part of a SMS or as a voice call, we should hope that sending the response arrives before the MSC is sending the connection release. If the Connection is created with the intention of USSD we will have to take over the connection and close it on the MSC side. It might show that this approach is tricky and we might need better handling on the connection close.
78 4 zecke2
79 11 zecke2
* -Keep track of the IMSI of every SCCP Connection. The increase in storage size is acceptable right now. We have not started to tune anything in the NAT anyway.- (done)
80
* -Keep track of the Connection Type, identify SS requests in the CM Service Request.- (done)
81
* Listen on a port for incoming USSD Bypass connections. We will use the IPA protocol, with one extra stream identifier for control messages.
82
* Identify USSD request to be forwarded to the MSC, send the IMSI and SCCP references to the bridge so it can start doing its job.
Add picture from clipboard (Maximum size: 48.8 MB)