Multi Access Edge Compute Integrated With LTE Networks
Multi Access Edge Compute Integrated With LTE Networks
Project Demo :-
https://drive.google.com/drive/folders/1xdqw0mj03XZ9jCgzzrrEgOzMe8ywxdM6?usp=share_link
List of repositories which we have used for the project Deployment:-
For Ran:-
https://gitlab.eurecom.fr/mosaic5g/mosaic5g/-/wikis/tutorials/oai-ran
For LL-MEC:-
https://gitlab.eurecom.fr/mosaic5g/mosaic5g/-/wikis/tutorials/llmec
For OVS:-
https://gitlab.eurecom.fr/mosaic5g/ll-mec/-/wikis/home
For CoreNetwork:-
https://gitlab.eurecom.fr/mosaic5g/mosaic5g/-/wikis/tutorials/oai-cn-v2
For Sim Programming:-
https://open-cells.com/index.php/uiccsim-programing/
Software Requirements:-
- Ubuntu OS 16.04 with 4.4.0-210-lowlatency.
- Docker with version 20.10.14
- Wireshark tool with version 2.6.10
- Open-cells repository with version uicc V2.6
Hardware Requirements:-
- Intel-based CPU with 6 core @4.5 GHz, 16G RAM, USB3. (Intel(R) Core(TM) i5-10500 CPU @ 3.10GHz)
- USRP B210 as the SDR with UHD Version 3.15.0.0
- U-Sim cards: Open-cells customizable U-sim cards Version 2.6.
- UE: Google Pixel 5
To deploy the MEC environment for LTE network I have used mosaic5g open source project.Here I have given the url of the gitlab where the project is available:-
Gitlab Project URL:- https://gitlab.eurecom.fr/mosaic5g/ll-mec
Architecture:-
Project Setup Instruction:-
1.OVS-GTP Installation:-
Repository:-
https://gitlab.eurecom.fr/mosaic5g/ll-mec/-/wikis/home
Prerequisite: kernel version 4.9 (Ubuntu 16.04)
Clone the repository first:-
git clone https://gitlab.eurecom.fr/mosaic5g/ll-mec-ovs.git
All you need to do is to run the install.sh.
cd ll-mec-ovs/ovs_kernel_gtp
./install.sh
For configuration:- Run this commands:
cd ll-mec-ovs
Filling the required information in config file:-
EXT_INTERFACE=enp3s0 # the interface name with Internet access
EXT_IP=172.16.1.1 # the ip address of the interface with the Internet access
CTRL_IP=192.168.12.240 # controller IP, i.e. LL-MEC IP
CTRL_PORT=6653 # controller port, default to 6653
OF_VERSION=OpenFlow10,OpenFlow13 # supported version
To start the OVS and stop the OVS run these following commands:-
./0-start-ovs.sh
# Setup OVS server. Required only once after booting.
./1-setup-switch.sh # Bring up switch
./2-remove-switch.sh # Tear down switch
2. LL-MEC Installation:-
This setup is installed on another PC with Core Network and RAN.
Repository:-
https://gitlab.eurecom.fr/mosaic5g/mosaic5g/-/wikis/tutorials/llmec
Use the build_m5g script to install LL-MEC:-
$ ./build_m5g -L
$ sudo ll-mec
Update the LL-MEC config file:-
Only update the MAC Address of gateway.
{
"llmec": {
"address": "0.0.0.0",
"port": 6653,
"number_of_workers": 4,
"secure_connection": false
},
"northbound_api": {
"port": 9999
},
"gateway": {
"mac": "00:24:9b:23:33:a6" // Change the MAC Address
},
"ovs_switch": {
"s1u_port": 2,
"external_port": 1
}
}
3.Core Network:-
Repository:-
https://gitlab.eurecom.fr/mosaic5g/mosaic5g/-/wikis/tutorials/oai-cn-v2
Preliminaries:-
=> OAI-HSS is based on Cassandra DB. To facilitate the installation and deployment procedure, we make use of docker.Install Ubuntu-based Docker and Cassandra as follows and configure for the HSS (oai_db.cql).
$ sudo snap install docker //install docker
$ docker ps # Check Docker status, see comment below
$ docker run --name cassandra-docker -d -e CASSANDRA_CLUSTER_NAME="OAI
HSS Cluster" \
-e CASSANDRA_ENDPOINT_SNITCH=GossipingPropertyFileSnitch \
mosaic5gecosys/cassandra-m5g:1.0 # Create a cassandra container for the HSS
$ docker exec -it cassandra-docker bash # Start an interactive session
$ nodetool status # Check the Cassandra status
$ cqlsh --file ./oai_db.cql 172.17.0.2 # Install the oai_db database
=> The cassandra status and IP address (172.17.0.2) should be as follows:
# nodetool status
Datacenter: DC1
===============
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns (effective) Host ID Rack
UN 172.17.0.2 Y KB 256 100.0%
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX RAC1"
Install the snaps:-
Install the OAI CN snaps:-
$ ./build_m5g -C v2
$ snap list
HSS configuration:-
Before being able to run the oai-hss snap, we need to grant permissions:-
$ sudo snap connect oai-hss:log-observe
$ sudo snap connect oai-hss:process-control
$ sudo snap connect oai-hss:network-control
First, create new configuration files for the HSS:
$ sudo oai-hss.init // to init the HSS
$ sudo oai-hss.conf-get // to get the config file
$ sudo oai-hss // to run the HSS
The HSS can be run as a systemd service:-
$ sudo oai-hss.start # run the HSS as a service
$ sudo oai-hss.status # verify the service's status
$ sudo oai-hss.journal # see the service's journal
$ sudo oai-hss.stop # stop the service
MME configuration:-
Before being able to run the oai-mme snap, we need to grant permissions:-
$ sudo snap connect oai-mme:log-observe
$ sudo snap connect oai-mme:process-control
$ sudo snap connect oai-mme:network-control
Create certificates and the configuration files:-
Change HSS_HOSTNAME to match your computer's hostname.
Change GUMMEI_LIST and TAI_LIST to match your desired PLMN configuration.
$ sudo oai-mme.init
$ sudo oai-mme.conf-get
$ sudo oai-mme
In the HSS window, there should be output related to the connecting MME. In the last line there should be:
'STATE_CLOSED' -> 'STATE_OPEN' '<hostname>.openair5G.eur'
SPGWC and SPGWU configuration:-
Before being able to run the oai-spgwc & oai-spgwu snap, we need to grant permissions:-
$ sudo snap connect oai-spgwc:log-observe
$ sudo snap connect oai-spgwc:process-control
$ sudo snap connect oai-spgwu:process-control
$ sudo snap connect oai-spgwu:network-control
$ sudo snap connect oai-spgwu:firewall-control
$ sudo snap connect oai-spgwu:log-observe
Create and list the configuration files:-
$ sudo oai-spgwc.init
$ sudo oai-spgwc.conf-get
$ sudo oai-spgwu.init
$ sudo oai-spgwu.conf-get
The remote controller sections will be important for the scenario with LL-MEC controllers. For this deployment scenario (with LL-MEC controller), the LL-MEC controller should be enabled by setting REMOTE_CONTROLLER_ENABLED to Yes.
If you want to use a different APN, set it in the APN_LIST section of P-GW.
Run SPGWC and SPGWU in separate terminals and make sure to see the HEARTBEATS are sent and received in the SPGWC and SPGWU apps.
$ sudo oai-spgwc
$ sudo oai-spgwu
4.Installing the RAN:-
Repository:-
https://gitlab.eurecom.fr/mosaic5g/mosaic5g/-/wikis/tutorials/oai-ran
Use the build_m5g script to install the OAI RAN snaps:;
$ ./build_m5g -R
Before being able to run OAI-RAN, you have to grant some permissions (see oai-ran.info):
$ sudo snap connect oai-ran:log-observe
$ sudo snap connect oai-ran:network-control
$ sudo snap connect oai-ran:netlink-connector
$ sudo snap connect oai-ran:process-control
$ sudo snap connect oai-ran:cpu-control
$ sudo snap connect oai-ran:raw-usb
To configure the RAN, get the configuration file using the -conf-get command, then use an editor with sudo rights:-
$ sudo oai-ran.enb-conf-get
#gets a file path, e.g var/snap/oai-ran/17/enb.band7.tm1.50PRB.usrpb210.conf
$ sudo vim /var/snap/oai-ran/17/enb.band7.tm1.50PRB.usrpb210.conf
$ sudo oai-ran.enb-conf-show # to check the configuration
Once the RAN is configured, it can be started in the two following ways:-
$ sudo oai-ran.enb
# run manually, recommended, stop with Ctrl-C
$ sudo oai-ran.enb-start # as a daemon
Configuration:-
First configure the network information:-
plmn_list = ( { mcc = 208; mnc = 95; mnc_length = 2; } )
Second, configure the core network information matching the MME's configuration (as in the MME's MME_INTERFACE_NAME_FOR_S1_MME):-
mme_ip_address = (
{
ipv4
= "127.0.1.10";
ipv6
= "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
5.SIM Programming:-
Link:- https://open-cells.com/index.php/uiccsim-programing/
Download the UICC-v2.6,source code link also given in official documentation of U-SIM programming.
For Compilation:-
make
Insert the card in the reader and the reader in a USB socket.
Reads basic data in the card:-
sudo ./program_uicc
Run this command (with IMSI, OPC and Ki used in our example configuration files):-
sudo ./program_uicc --adm 1oc45678 --imsi 208950100001101 --isdn 00000001 --acc
0001 --key 6874736969202073796d4b2079650a73 --opc
504f20634f6320504f50206363500a4f -spn "OpenCells01" --authenticate
--noreadafter
● adm:- You can find it on your sim card.
● key:- Go to the HSS database log file and copy the key from here.
● opc:- HSS generates the New OP key while running it.Check the HSS database log file to
get this.
● imsi :- Change the value of imsi according to your MNC and MCC value.
● spn :- Set the SIM name.
=> Install all the components which are required for the setup.
- Start the OVS-GTP and establish the connection with LL-MEC.
- Connect the USRP with RAN.
- Run the Core Network Components and RAN.
- Turn On the mobile network in UE.
- Check the MME log and LL-MEC API log
============================================
Our Setup :
Here, we have internet connection only in PC3 so from PC3 we do a NAT operations to get an internet in PC2 & PC1.
1. Do a NAT Operation in PC3.
#sudo iptables -P FORWARD ACCEPT
#sudo sysctl net.ipv4.ip_forward
#sudo iptables --table nat --append POSTROUTING --out-interface <interfacename> -j MASQUERADE // {give networkaccess interface }
#sudo iptables --append FORWARD --in-interface <interfacename> -j ACCEPT // {give other connected interface which is not getting internet}
2. Add gateway in PC2 and Do NAT operation in PC2.
# sudo route add default gw 172.16.1.1
#sudo iptables -P FORWARD ACCEPT
#sudo sysctl net.ipv4.ip_forward
#sudo iptables --table nat --append POSTROUTING --out-interface <interfacename> -j MASQUERADE } // {give networkaccess interface }
#sudo iptables --append FORWARD --in-interface <interfacename> -j ACCEPT // {give other connected interface which is not getting internet}
3. Add gateway in PC1.
# sudo route add default gw 192.168.150.119
4. Check all the PCs are getting Internet.
5. Now in PC1 :
Start the docker
# sudo docker start cassandra-docker
# sudo docker ps
Run OAI-HSS, OAI-SPGWC, OAI-SPGWU, OAI-MME, OAI-RAN.ENB in diiferent tabs
# sudo oai-hss
# sudo oai-spgwc
# sudo oai-spgwu
# sudo oai-mme
# sudo oai-ran.enb
Connect UE
6.Then, Start OVS-GTP in PC2
# cd mosaic5g/ovs-gtp
# ./0-start-ovs.sh
# 1-setup-switch.sh
7.Run ll-mec in PC1 (if flows are not getting then do interface down and up)
# sudo ll-mec
(if flows are not getting then do interface down and up)
8. Now, only stop RAN.ENB and re-run RAN.ENB
# sudo oai-ran.enb
Connect to UE
9. After connected if you are not getting internet on UE then add gateway in PC2
# sudo route add default gw 172.16.1.1
add route in PC3.
# sudo ip route add 12.1.1.0/24 via 172.16.1.253 // here 12.1.1.0/24 is UE ip network
Wireshark Outputs:
GW pc to UE:
MEC to UE:
OVS to UE:
<wireshark output>
References:
https://gitlab.eurecom.fr/mosaic5g/mosaic5g/-/wikis/tutorials/oai-ran
https://gitlab.eurecom.fr/mosaic5g/mosaic5g/-/wikis/tutorials/llmec
https://gitlab.eurecom.fr/mosaic5g/ll-mec/-/wikis/home
https://gitlab.eurecom.fr/mosaic5g/mosaic5g/-/wikis/tutorials/oai-cn-v2
https://open-cells.com/index.php/uiccsim-programing/
https://gitlab.eurecom.fr/mosaic5g/ll-mec
https://gitlab.eurecom.fr/mosaic5g/ll-mec/-/wikis/home
https://gitlab.eurecom.fr/mosaic5g/mosaic5g/-/wikis/tutorials/llmec
https://gitlab.eurecom.fr/mosaic5g/mosaic5g/-/wikis/tutorials/oai-cn-v2
https://open-cells.com/index.php/uiccsim-programing/
Combined effort by :
V Abhishek Raj (vabhishekraj@idrbt.ac.in)
Beeranna Dude (dbeeranna@idrbt.ac.in)
Project supported by 5G Use case lab - IDRBT
Comments
Post a Comment