SDN - SantiagoBH/5G-NSA-Network-with-Mosaic5g GitHub Wiki

Description

Software-Defined Networking (SDN). It is an approach to networking in which the control and forwarding functions of the network are decoupled, In traditional networking, these functions are typically combined into a single device, such as a router or switch. However, with SDN, the control function is separated from the forwarding function, and the network is controlled by a software-based controller. This allows for greater flexibility and programmability in the network, making it easier to manage and optimize for specific use cases.

Drone

The drone application is a web server that can show the status of the RAN graphically in a web browser.

cd mosaic5g
wget https://gitlab.eurecom.fr/mosaic5g/store/-/archive/develop/store-develop.zip
unzip store-develop.zip
cd store-develop/sdk/frontend/drone/
python drone.py --port=8088 --address=127.0.0.1

Measure DL y UL

cd mosaic5g/store-develop/sdk
python mac_rate_app.py --op-mode=sdk

SDN

After running the drone, we go to our browser and type localhost:8088 and to open the statistics of Flexran, it is necessary to access localhost:9999/stats. To view the statistics from the Ubuntu terminal, you must use the following command:

curl -X GET http://127.0.0.1:9999/stats | jq .

To modify any parameter of the Flexran stats, it is necessary to create .json files. In this case, 4 different configurations were created, which are located inside the Flexran folder.

configCell.json

{
    "dlBandwidth": 25,
    "ulBandwidth": 25,
    "dlFreq": 2650,
    "ulFreq": 2530,
    "eutraBand": 7
}
plmn.json

{
    "plmnId": [
        {
            "mcc": 208,
            "mnc": 95,
            "mncLength": 2
        },
        {
            "mcc": 208,
            "mnc": 94,
            "mncLength": 2
        }
    ]
}
slice.json

{
    "dl": {
        "algorithm": "Static",
        "slices": [
            {
                "id": 0,
                "scheduler": "round_robin_dl",
                "static": {
                    "posLow": 12,
                    "posHigh": 16
                }
            },
            {
                "id": 2,
                "static": {
                    "posLow": 1,
                    "posHigh": 11
                }
            }
        ]
    },
    "ul": {
        "algorithm": "None"
    }
}
UEconfig.json

{
    "ueConfig": [
        {
            "imsi": 208950000000001,
            "dlSliceId": 2,
        }
    ]
}

To modify the uplink and downlink bandwidths, operating frequency, and band.

cd mosaic5g/flexran/
curl localhost:9999/stats | jq .eNB_config[0].eNB.cellConfig[0]
curl -X POST http://127.0.0.1:9999/conf/enb/-1 --data-binary "@configCell.json"

To add an MCC (Mobile Country Code) and MNC (Mobile Network Code).

cd mosaic5g/flexran/
curl localhost:9999/stats | jq .eNB_config[0].eNB.cellConfig[0].plmnId
curl -X POST localhost:9999/plmn/enb --data-binary @plmn.json

To perform network slicing, it is necessary to modify the number of Resource Block Groups (RBG), which range from 1 to 16 RBG. They were modified in ID:0, the resource blocks between 12-16 RBG, and in ID:1, the resource blocks between 1-11 RBG.

cd mosaic5g/flexran/
curl localhost:9999/stats | jq .eNB_config[0].eNB.cellConfig[0].sliceConfig 
curl -X POST http://127.0.0.1:9999/slice/enb/-1 --data-binary "@slice.json"

Finally, to assign an ID to a UE, the following command was used.

cd mosaic5g/flexran/
curl -X POST http://127.0.0.1:9999/ue_slice_assoc/enb/-1 --data-binary "@UEconfig.json"
⚠️ **GitHub.com Fallback** ⚠️