|
|
|
# How to build a RAN sharing demo
|
|
|
|
|
|
|
|
This tutorial allows to build the following setup, consisting of an eNodeB
|
|
|
|
connected to two core networks of different operators and their respective UEs:
|
|
|
|
|
|
|
|
![Slicing with S1-flex](fig/slicing.png)
|
|
|
|
|
|
|
|
## Demo Setup
|
|
|
|
|
|
|
|
The following software components need to be fetched from the Mosaic5G repository:
|
|
|
|
* RAN: refer to [OAI RAN](./oai-ran) to setup the environment.
|
|
|
|
* Controller: refer to [Flexran](./flexran) to setup the environment.
|
|
|
|
* CNs: refer to [OAI CN](./oai-cn) to setup the environment.
|
|
|
|
|
|
|
|
For RAN testing purposes, SIM cards belonging to the same operator can be used.
|
|
|
|
However, in order to connect to two multiple core networks, respective SIM
|
|
|
|
cards are needed.
|
|
|
|
|
|
|
|
In the following, we assume four computers:
|
|
|
|
* one for the controller, IP 192.168.12.4,
|
|
|
|
* one for the RAN, IP 192.168.12.45, and
|
|
|
|
* two for each CN, IPs 192.168.12.240 for CN 20894 and 192.168.12.242 for
|
|
|
|
20895.
|
|
|
|
|
|
|
|
## Setup of the CNs
|
|
|
|
|
|
|
|
The CNs are installed as indicated in the [tutorial](./oai-cn). Please note
|
|
|
|
that PLMN IDs 20894 and 20895 need to be correctly set in the `GUMMEI_LIST` and
|
|
|
|
`TAI_LIST` of `mme.conf` for each CN. This is all, and the setup can be tested
|
|
|
|
with the "normal" RAN by simply changing the PLMN and MME IP address one by one
|
|
|
|
for each CN.
|
|
|
|
|
|
|
|
## Setup of the controller
|
|
|
|
|
|
|
|
FlexRAN is installed as indicated in the [tutorial](./flexran). No special
|
|
|
|
configuration is needed for the controller. However, to make sure the
|
|
|
|
controller has loaded the correct application, issue the command without a
|
|
|
|
connected RAN:
|
|
|
|
```bash
|
|
|
|
$ curl -X POST http://192.168.12.45:9999/slice/enb/-1
|
|
|
|
```
|
|
|
|
A JSON error message `{ "error": "can not find agent" }` should be printed. An
|
|
|
|
error `Could not find a matching route` indicates that the corresponding north
|
|
|
|
bound application `rrm_calls` is not loaded.
|
|
|
|
|
|
|
|
## Setup of the RAN
|
|
|
|
|
|
|
|
Two sections are important to setup S1-flex. Assuming both core networks are in
|
|
|
|
the same network, we need to add both in the list `mme_ip_address` in the RAN
|
|
|
|
configuration file (in the case of, see the active conf file using
|
|
|
|
`oai-ran.enb-conf-get`):
|
|
|
|
```
|
|
|
|
mme_ip_address = (
|
|
|
|
{
|
|
|
|
ipv4 = "192.168.12.240"; // IP address of CN 1
|
|
|
|
ipv6 = "192:168:30::17"; // Don't care
|
|
|
|
active = "yes";
|
|
|
|
preference = "ipv4";
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ipv4 = "192.168.12.242"; // IP address of CN 2
|
|
|
|
ipv6 = "192:168:30::17"; // Don't care
|
|
|
|
active = "yes";
|
|
|
|
preference = "ipv4";
|
|
|
|
}
|
|
|
|
);
|
|
|
|
```
|
|
|
|
|
|
|
|
Second, the system broadcast has to be configured to include both core
|
|
|
|
networks:
|
|
|
|
```
|
|
|
|
tracking_area_code = 1;
|
|
|
|
plmn_list = (
|
|
|
|
{ mcc = 208; mnc = 94; mnc_length = 2; },
|
|
|
|
{ mcc = 208; mnc = 95; mnc_length = 2; }
|
|
|
|
)
|
|
|
|
```
|
|
|
|
|
|
|
|
Of course, the FlexRAN controller IP address has to be configured, too.
|
|
|
|
|
|
|
|
Define the RAN sharing/slicing policy, to be sent to the controller later
|
|
|
|
through the REST API, as follows. This consists in creating a JSON
|
|
|
|
configuration file `ran-sharing.json`, defining a radio resource management
|
|
|
|
policy, with the following structure:
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"dl": [
|
|
|
|
{
|
|
|
|
"id": 0,
|
|
|
|
"percentage": 50,
|
|
|
|
"maxmcs": 28
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": 3,
|
|
|
|
"percentage": 50,
|
|
|
|
"maxmcs": 28
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"ul": [
|
|
|
|
{
|
|
|
|
"id": 0,
|
|
|
|
"percentage": 50,
|
|
|
|
"firstRb": 0
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"id": 3,
|
|
|
|
"percentage": 50,
|
|
|
|
"firstRb": 25
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"intrasliceShareActive": false,
|
|
|
|
"intersliceShareActive": false
|
|
|
|
}
|
|
|
|
```
|
|
|
|
The above file defines :
|
|
|
|
* two active slices with IDs 0 and 3.
|
|
|
|
* each slices has 50% resources (based on an LTE configuration of 50 RBs) and don't share to the other if they have unused resources (`"intersliceShareActive": false`) but share them between users within one slice (`"intrasliceShareActive": true`).
|
|
|
|
|
|
|
|
This command is to be sent when the agent runs (see below). More information can be found [in the apidocs, section ApplySliceConfiguration](http://mosaic-5g.io/apidocs/flexran/#api-SliceConfiguration-ApplySliceConfiguration).
|
|
|
|
|
|
|
|
# Running the demo
|
|
|
|
|
|
|
|
First, run both CNs on the respective computers, e.g. using the following
|
|
|
|
command:
|
|
|
|
```bash
|
|
|
|
$ sudo oai-cn.start-all
|
|
|
|
```
|
|
|
|
|
|
|
|
Next, start FlexRAN which will wait for incoming agent connections:
|
|
|
|
```bash
|
|
|
|
$ sudo flexran
|
|
|
|
```
|
|
|
|
|
|
|
|
Finally, on the last computer, start the RAN:
|
|
|
|
```bash
|
|
|
|
$ sudo oai-ran
|
|
|
|
```
|
|
|
|
|
|
|
|
In particular, FlexRAN should acknowledge the incoming agent request. Also, to
|
|
|
|
verify that the RAN part correctly connects to both CNs, Wireshark could be
|
|
|
|
used to trace S1AP traffic as follows:
|
|
|
|
* start Wireshark on the RAN computer.
|
|
|
|
* select the `any` device
|
|
|
|
* set the capture filter to `port 36412`, limiting sniffed traffic to SCTP
|
|
|
|
(carrying S1AP).
|
|
|
|
|
|
|
|
Wireshark should show two S1 Setup Request messages, followed by two S1 Setup
|
|
|
|
Response messages coming from the two IP addresses 192.168.12.240 and
|
|
|
|
192.168.12.242.
|
|
|
|
|
|
|
|
Once this runs, UEs of the different operators will automatically be routed to
|
|
|
|
their respective CNs which can be verified with Wireshark, too.
|
|
|
|
|
|
|
|
To configure the scheduler, issue a policy reconfiguration command as follows:
|
|
|
|
```bash
|
|
|
|
$ curl -X POST http://192.168.12.45:9999/slice/enb/-1 --data-binary @ran-sharing.json
|
|
|
|
```
|
|
|
|
In the FlexRAN window, the same JSON file alongside a message indicating the
|
|
|
|
transmission of the configuration to the respective agent should be shown. The
|
|
|
|
RAN part will equally acknowledge the setting for each parameter.
|
|
|
|
|
|
|
|
Newly arriving users will automatically placed in slice 0. To put a UE with a
|
|
|
|
given IMSI or RNTI (see the [stats call of the
|
|
|
|
controller](http://mosaic-5g.io/apidocs/flexran/#api-Stats-GetStatsEnb)) in
|
|
|
|
another slice, issue:
|
|
|
|
```bash
|
|
|
|
$ curl -X POST http://192.168.12.45:9999/ue_slice_assoc/enb/-1/ue/<imsi-or-rnti>/slice/3
|
|
|
|
```
|
|
|
|
More information is available in the apidocs ([short version call](http://mosaic-5g.io/apidocs/flexran/#api-SliceConfiguration-ChangeUeSliceAssociationShort), [long version call](http://mosaic-5g.io/apidocs/flexran/#api-SliceConfiguration-ChangeUeSliceAssociation)). |