|
|
---+ How to run oaisim with virtual MME on same machine
|
|
|
# How to run oaisim with virtual MME on same machine
|
|
|
|
|
|
Please use the DOCS/EPC_User_Guide.pdf (from openair-cn repository, https://gitlab.eurecom.fr/oai/openair-cn.git) for OAI EPC Documentation.
|
|
|
Please use the `DOCS/EPC_User_Guide.pdf` (from openair-cn repository, https://gitlab.eurecom.fr/oai/openair-cn.git) for OAI EPC Documentation.
|
|
|
|
|
|
So I will put my own debug logs and some suggestions about the simulation,
|
|
|
|
|
|
*We have recently moved from SVN to Gitlab, please use the updated instructions from the link below for downloading the latest code.*
|
|
|
**We have recently moved from SVN to Gitlab, please use the updated instructions from the link below for downloading the latest code.**
|
|
|
|
|
|
*The download instructions for the repository are located here, <a href="GetSources" title="https://twiki.eurecom.fr/twiki/bin/view/OpenAirInterface/GetSources">https://twiki.eurecom.fr/twiki/bin/view/OpenAirInterface/GetSources</a>*
|
|
|
**The download instructions for the repository are located at [GetSources](GetSources)**.
|
|
|
|
|
|
*The build instructions for both the repositories are located here , <a href="AutoBuild" title="https://twiki.eurecom.fr/twiki/bin/view/OpenAirInterface/AutoBuild">https://twiki.eurecom.fr/twiki/bin/view/OpenAirInterface/AutoBuild</a>*
|
|
|
**The build instructions for both the repositories are located at [AutoBuild](AutoBuild)**.
|
|
|
|
|
|
## 1. Configuration
|
|
|
|
|
|
---++ 1. Configuration
|
|
|
* Config File:
|
|
|
/etc/hosts must contain the fqdn of the MME and HSS (same since both run on the same host):
|
|
|
|
|
|
`/etc/hosts` must contain the fqdn of the MME and HSS (same since both run on the same host):
|
|
|
|
|
|
(assuming the realm is openair4G.eur)
|
|
|
|
|
|
```
|
|
|
127.0.0.1 localhost
|
|
|
|
|
|
127.0.1.1 calisson.openair4G.eur calisson
|
|
|
```
|
|
|
|
|
|
---++ 2. Building HSS
|
|
|
## 2. Building HSS
|
|
|
|
|
|
---+++ 2.1 configure the HSS:
|
|
|
### 2.1 configure the HSS:
|
|
|
|
|
|
The HSS database is automatically installed if openair-CN build instructions are followed, https://twiki.eurecom.fr/twiki/bin/view/OpenAirInterface/AutoBuild
|
|
|
The HSS database is automatically installed if openair-CN build instructions
|
|
|
are followed: [AutoBuild](AutoBuild)
|
|
|
|
|
|
In oai_db (easier for newbies to access HSS database through http://127.0.0.1/phpmyadmin) Login: root, Password: Linux
|
|
|
In `oai_db` (easier for newbies to access HSS database through http://127.0.0.1/phpmyadmin) Login: root, Password: Linux
|
|
|
|
|
|
In table mmeidentity, enter the record corresponding to your MME:
|
|
|
In table `mmeidentity`, enter the record corresponding to your MME:
|
|
|
|
|
|
```
|
|
|
(idmmeidentity, mmehost, mmerealm)
|
|
|
```
|
|
|
|
|
|
In table pdn, enter the record allowing an IMSI to connect to an APN
|
|
|
In table `pdn`, enter the record allowing an IMSI to connect to an APN
|
|
|
|
|
|
In table users, enter the record corresponding to your USIM card.
|
|
|
In table `users`, enter the record corresponding to your USIM card.
|
|
|
|
|
|
<img width="3200" alt="phpmyadmin_main_page.png" src="https://twiki.eurecom.fr/twiki/pub/OpenAirInterface/HowtorunoaisimwithvirtualMMEonsamemachine/phpmyadmin_main_page.png" title="phpmyadmin_main_page.png" height="1080" />
|
|
|
![phpmyadmin_main_page.png](HowtorunoaisimwithvirtualMMEonsamemachine/phpmyadmin_main_page.png)
|
|
|
|
|
|
then you can config your own MME,
|
|
|
|
|
|
<img width="1594" alt="phpmyadmin_mme_identity.png" src="https://twiki.eurecom.fr/twiki/pub/OpenAirInterface/HowtorunoaisimwithvirtualMMEonsamemachine/phpmyadmin_mme_identity.png" title="phpmyadmin_mme_identity.png" height="849" />
|
|
|
![phpmyadmin_mme_identity.png](HowtorunoaisimwithvirtualMMEonsamemachine/phpmyadmin_mme_identity.png)
|
|
|
|
|
|
and add your IMEI & SIM card. %RED% __Make sure mmeidentity in ALL sim cards is 2 (which is what corresponds to mmeidentity of calisson.openair4G.eur)__ %ENDCOLOR%
|
|
|
and add your IMEI & SIM card. __Make sure mmeidentity in ALL sim cards is 2 (which is what corresponds to mmeidentity of calisson.openair4G.eur)__
|
|
|
|
|
|
<img width="3200" alt="phpmyadmin_users.png" src="https://twiki.eurecom.fr/twiki/pub/OpenAirInterface/HowtorunoaisimwithvirtualMMEonsamemachine/phpmyadmin_users.png" title="phpmyadmin_users.png" height="1080" />
|
|
|
![phpmyadmin_users.png](HowtorunoaisimwithvirtualMMEonsamemachine/phpmyadmin_users.png)
|
|
|
|
|
|
Also, you have to change the configure file hss.conf like this:
|
|
|
|
|
|
<img alt="004.jpg" src="%ATTACHURL%/004.jpg" />
|
|
|
![004.jpg](HowtorunoaisimwithvirtualMMEonsamemachine/004.jpg)
|
|
|
|
|
|
Or you may have some errors.
|
|
|
---+++ 2.2 You can build HSS like this,
|
|
|
|
|
|
### 2.2 You can build HSS like this
|
|
|
|
|
|
```shell
|
|
|
wujn@ubuntu:~/Simulator/openair-cn/cmake_targets tools/build_hss -c -l
|
|
|
---+++ 2.3 Run HSS
|
|
|
```
|
|
|
|
|
|
### 2.3 Run HSS
|
|
|
|
|
|
```shell
|
|
|
wujn@ubuntu:~/Simulator/openair-cn/SCRIPTS/run_hss -g
|
|
|
```
|
|
|
|
|
|
Now you can see in the terminal, the STATE_CLOSED. It is because the MME is still not running.
|
|
|
|
|
|
Now you can see in the terminal, the “STATE_CLOSED”. It is because the MME is still not running.
|
|
|
![005.jpg](HowtorunoaisimwithvirtualMMEonsamemachine/005.jpg)
|
|
|
|
|
|
<img alt="005.jpg" src="%ATTACHURL%/005.jpg" />
|
|
|
## 3. Building the MME-GW
|
|
|
|
|
|
---++ 3. Building the MME-GW
|
|
|
---+++ 3.1 Configure MME
|
|
|
### 3.1 Configure MME
|
|
|
|
|
|
Configuring the MME-GW:
|
|
|
|
|
|
You can configure in file openair-cn/BUILD/EPC/epc.local.enb.conf.in the following parameters:
|
|
|
You can configure in file `openair-cn/BUILD/EPC/epc.local.enb.conf.in` the following parameters:
|
|
|
|
|
|
*See openair-cn/DOCS/EPC_User_Guide.pdf for EPC Documentation*
|
|
|
**See `openair-cn/DOCS/EPC_User_Guide.pdf` for EPC Documentation**
|
|
|
|
|
|
MCC/MNC of your network
|
|
|
|
|
|
<em><br /></em>
|
|
|
|
|
|
<span style="color: deeppink;"> </span>
|
|
|
<div id="_mcePaste"> _TAI_LIST = (_ </div> <div id="_mcePaste"> _{MCC="208" ; MNC="10"; TAC = "1"; } # YOUR PLMN CONFIG HERE_ </div> <div id="_mcePaste"> _);_ </div>
|
|
|
```
|
|
|
TAI_LIST = (
|
|
|
{MCC="208" ; MNC="10"; TAC = "1"; } # YOUR PLMN CONFIG HERE
|
|
|
);
|
|
|
```
|
|
|
|
|
|
SGI interface (outgoing interface of the S/P-GW)
|
|
|
|
|
|
```
|
|
|
NETWORK_INTERFACES :
|
|
|
|
|
|
%RED%
|
|
|
|
|
|
_{_
|
|
|
|
|
|
_PGW_INTERFACE_NAME_FOR_S5_S8 = "none"; # DO NOT CHANGE_
|
|
|
|
|
|
_PGW_IPV4_ADDRESS_FOR_S5_S8 = "0.0.0.0/24"; # DO NOT CHANGE_
|
|
|
|
|
|
<em><br /></em>
|
|
|
|
|
|
_PGW_INTERFACE_NAME_FOR_SGI = "eth1"; # %RED%<span>YOUR NETWORK CONFIG HERE (ETHERNET INTERFACE CONNECTED TO INTERNET)</span>%ENDCOLOR%_
|
|
|
|
|
|
_PGW_IPV4_ADDRESS_FOR_SGI = "192.168.12.82/24"; #%RED% YOUR NETWORK CONFIG HERE (IP ADDRESS OF CALISSON)%ENDCOLOR%_
|
|
|
|
|
|
_PGW_MASQUERADE_SGI = "yes"; # YOUR NETWORK CONFIG HERE_
|
|
|
|
|
|
_};_ %ENDCOLOR%
|
|
|
{
|
|
|
PGW_INTERFACE_NAME_FOR_S5_S8 = "none"; # DO NOT CHANGE_
|
|
|
PGW_IPV4_ADDRESS_FOR_S5_S8 = "0.0.0.0/24"; # DO NOT CHANGE_
|
|
|
PGW_INTERFACE_NAME_FOR_SGI = "eth1"; # YOUR NETWORK CONFIG HERE (ETHERNET INTERFACE CONNECTED TO INTERNET)
|
|
|
PGW_IPV4_ADDRESS_FOR_SGI = "192.168.12.82/24"; # YOUR NETWORK CONFIG HERE (IP ADDRESS OF CALISSON)
|
|
|
PGW_MASQUERADE_SGI = "yes"; # YOUR NETWORK CONFIG HERE
|
|
|
};
|
|
|
```
|
|
|
|
|
|
Integrity algorithms, Ciphering algorithms
|
|
|
|
|
|
Please note that DNS addresses are hardcoded in source code (TODO in list).
|
|
|
|
|
|
%RED%The example config file of working setup is [[%ATTACHURL%/epc.local.enb.conf.in][https://twiki.eurecom.fr/twiki/pub/OpenAirInterface/HowtorunoaisimwithvirtualMMEonsamemachine/epc.local.enb.conf.in]]%ENDCOLOR%
|
|
|
---+++ 3.2 Build MME
|
|
|
The example config file of working setup is [epc.local.enb.conf.in](HowtorunoaisimwithvirtualMMEonsamemachine/epc.local.enb.conf.in).
|
|
|
|
|
|
### 3.2 Build MME
|
|
|
|
|
|
```shell
|
|
|
wujn@ubuntu:~/openair-cn/SCRIPTS/build_epc -c -l
|
|
|
```
|
|
|
|
|
|
If you have installed all the required libs, there will have no errors.
|
|
|
If you have installed all the required libs, you will have no error.
|
|
|
|
|
|
---+++ 3.3 Run MME
|
|
|
### 3.3 Run MME
|
|
|
|
|
|
Running the MME-GW:
|
|
|
|
|
|
```shell
|
|
|
wujn@ubuntu:~/openair-cn/SCRIPTS/run_epc -l -g
|
|
|
```
|
|
|
|
|
|
At first, you still have the “STATE_CLOSED”,.
|
|
|
At first, you still have the STATE_CLOSED.
|
|
|
|
|
|
<img alt="006.jpg" src="%ATTACHURL%/006.jpg" />
|
|
|
![006.jpg](HowtorunoaisimwithvirtualMMEonsamemachine/006.jpg)
|
|
|
|
|
|
Later, when HSS and MME are attached, you will see OPEN state.
|
|
|
|
|
|
<img alt="007.jpg" src="%ATTACHURL%/007.jpg" />
|
|
|
![007.jpg](HowtorunoaisimwithvirtualMMEonsamemachine/007.jpg)
|
|
|
|
|
|
## 4. eNB and UE
|
|
|
|
|
|
---++ 4. eNB and UE
|
|
|
---+++ 4.1 Build eNB
|
|
|
### 4.1 Build eNB
|
|
|
|
|
|
Just run the bash file, if you want to initiate SCOPE, you can do it as you want.
|
|
|
|
|
|
```shell
|
|
|
wujn@ubuntu:~/openairinterface5g/cmake_targets/build_oai --oaisim
|
|
|
|
|
|
wujn@ubuntu:~/openairinterface5g/cmake_targets/build_oai --UE
|
|
|
---+++ 4.2 Config eNB
|
|
|
```
|
|
|
|
|
|
Please change the following parameters in configuration file, enb.band7.generic.oaisim.local_mme.conf,
|
|
|
### 4.2 Config eNB
|
|
|
|
|
|
You only need to modify the following parameters to match the EPC configuration above.
|
|
|
Please change the following parameters in configuration file `enb.band7.generic.oaisim.local_mme.conf`.
|
|
|
|
|
|
tracking_area_code = "1";<br /><br />mobile_country_code = "208";
|
|
|
You only need to modify the following parameters to match the EPC configuration above.
|
|
|
|
|
|
```
|
|
|
tracking_area_code = "1";
|
|
|
mobile_country_code = "208";
|
|
|
mobile_network_code = "10";
|
|
|
```
|
|
|
|
|
|
The example config file of working setup is
|
|
|
[enb.band7.generic.oaisim.local_mme.conf](HowtorunoaisimwithvirtualMMEonsamemachine/enb.band7.generic.oaisim.local_mme.conf).
|
|
|
|
|
|
%RED%The example config file of working setup is [[%ATTACHURL%/enb.band7.generic.oaisim.local_mme.conf][https://twiki.eurecom.fr/twiki/pub/OpenAirInterface/HowtorunoaisimwithvirtualMMEonsamemachine/enb.band7.generic.oaisim.local_mme.conf]]%ENDCOLOR%
|
|
|
---+++ 4.3 Run eNB
|
|
|
### 4.3 Run eNB
|
|
|
|
|
|
Now,suppose you have already run the HSS and MME, and They are all waiting the eNB & UE. You can run eNB like this.
|
|
|
Now suppose you have already run the HSS and MME, and they are all waiting the eNB & UE. You can run eNB like this.
|
|
|
|
|
|
```
|
|
|
wujn@ubuntu:~/openairinterface5g/cmake_targets/tools sudo -E ./run_enb_ue_virt_s1
|
|
|
```
|
|
|
|
|
|
if you have initiated the soft scope, you will see some transactions between the eNB and UE..
|
|
|
if you have initiated the soft scope, you will see some transactions between the eNB and UE.
|
|
|
|
|
|
<img alt="009.jpg" src="%ATTACHURL%/009.jpg" />
|
|
|
![009.jpg](HowtorunoaisimwithvirtualMMEonsamemachine/009.jpg)
|
|
|
|
|
|
And in the EPC terminal , you can find 1 UE has attached.
|
|
|
|
|
|
<img alt="010.jpg" src="%ATTACHURL%/010.jpg" />
|
|
|
![010.jpg](HowtorunoaisimwithvirtualMMEonsamemachine/010.jpg)
|
|
|
|
|
|
And some message exchanges between MME and HSS.
|
|
|
|
|
|
![011.jpg](HowtorunoaisimwithvirtualMMEonsamemachine/011.jpg)
|
|
|
|
|
|
And if you run `ifconfig` in a new terminal you will find there is a tun2 & lo interfaces,
|
|
|
|
|
|
And some message echange between MME and HSS.
|
|
|
![012.jpg](HowtorunoaisimwithvirtualMMEonsamemachine/012.jpg)
|
|
|
|
|
|
<img alt="011.jpg" src="%ATTACHURL%/011.jpg" />
|
|
|
The example working output from oaisim if eNB/UE is successfully connected is
|
|
|
[oaisim_with_s1_working.log](HowtorunoaisimwithvirtualMMEonsamemachine/oaisim_with_s1_working.log).
|
|
|
|
|
|
And if you run ifcong in a new terminal , you will find there has a tun2 & lo interface,
|
|
|
## END
|
|
|
|
|
|
<img alt="012.jpg" src="%ATTACHURL%/012.jpg" />
|
|
|
This page is just a begining. Next I will learn some materials about EPC & MME, and I still
|
|
|
expect someone may help about the Topology about the default configuration files. I think THIS will help lots of people LIKE me.
|
|
|
|
|
|
The example working output from oaisim if eNB/UE is successfully connected is [[%ATTACHURL%/oaisim_with_s1_working.log][https://twiki.eurecom.fr/twiki/pub/OpenAirInterface/HowtorunoaisimwithvirtualMMEonsamemachine/oaisim_with_s1_working.log]].
|
|
|
---++ END
|
|
|
If this page needs improvement, please contact **openair_tech (AT) eurecom (DOT) fr** requesting for access to twiki so you can update this web page.
|
|
|
|
|
|
This page is just a begining , Next I will learn some materials about EPC & MME, and I still expect someone may help about the Topology about the default configuration files. I think THIS will help lots of people LIKE me.
|
|
|
## Attachments
|
|
|
|
|
|
If this page needs improvement, please contact <strong>openair_tech (AT) eurecom (DOT) fr </strong>requesting for access to twiki so you can update this web page.
|
|
|
* [001.jpg](HowtorunoaisimwithvirtualMMEonsamemachine/001.jpg)
|
|
|
* [002.jpg](HowtorunoaisimwithvirtualMMEonsamemachine/002.jpg)
|
|
|
* [003.jpg](HowtorunoaisimwithvirtualMMEonsamemachine/003.jpg)
|
|
|
* [004.jpg](HowtorunoaisimwithvirtualMMEonsamemachine/004.jpg)
|
|
|
* [005.jpg](HowtorunoaisimwithvirtualMMEonsamemachine/005.jpg)
|
|
|
* [006.jpg](HowtorunoaisimwithvirtualMMEonsamemachine/006.jpg)
|
|
|
* [007.jpg](HowtorunoaisimwithvirtualMMEonsamemachine/007.jpg)
|
|
|
* [008.jpg](HowtorunoaisimwithvirtualMMEonsamemachine/008.jpg)
|
|
|
* [009.jpg](HowtorunoaisimwithvirtualMMEonsamemachine/009.jpg)
|
|
|
* [010.jpg](HowtorunoaisimwithvirtualMMEonsamemachine/010.jpg)
|
|
|
* [011.jpg](HowtorunoaisimwithvirtualMMEonsamemachine/011.jpg)
|
|
|
* [012.jpg](HowtorunoaisimwithvirtualMMEonsamemachine/012.jpg)
|
|
|
* [enb.band7.generic.oaisim.local_mme.conf](HowtorunoaisimwithvirtualMMEonsamemachine/enb.band7.generic.oaisim.local_mme.conf)
|
|
|
* [epc.local.enb.conf.in](HowtorunoaisimwithvirtualMMEonsamemachine/epc.local.enb.conf.in)
|
|
|
* [oaisim_with_s1_working.log](HowtorunoaisimwithvirtualMMEonsamemachine/oaisim_with_s1_working.log)
|
|
|
* [phpmyadmin_main_page.png](HowtorunoaisimwithvirtualMMEonsamemachine/phpmyadmin_main_page.png)
|
|
|
* [phpmyadmin_mme_identity.png](HowtorunoaisimwithvirtualMMEonsamemachine/phpmyadmin_mme_identity.png)
|
|
|
* [phpmyadmin_users.png](HowtorunoaisimwithvirtualMMEonsamemachine/phpmyadmin_users.png)
|
|
|
* [run_EPCHSSeNB_v1.docx](HowtorunoaisimwithvirtualMMEonsamemachine/run_EPCHSSeNB_v1.docx)
|
|
|
|
|
|
-- User.JunningWu - 29 Jun 2015 |
|
|
-- @JunningWu - 29 Jun 2015 |