How to run oaisim with virtual MME on same machine
(example_oaisim_enb_ue_mme_virtual)
Since I don’t have much knowledge about EPC and MME, just follow the example file(example_oaisim_enb_ue_mme_virtual.txt)to make a test?The example file has such an configuration,according to Lionel Gauthier.This example shows how to generate and launch enb,
1 ue (NAS still not virtualized in UE) in virtualised mode, mme_gw, hss executables on the same host?
So I will put my own debug logs and some suggestions about the simulation,
1. Configuration
- freediameter 1.2.0 (not 1.1.5, 1.1.6,...) has to be installed and patched (done by check_install_oai_software() calling install_freediameter_from_source() in script build_helper)
- Config File:
/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 ubuntu.openair4G.eur ubuntu
If you run “build_oai –I” as it is, and input the “ubuntu” as the name( I don’t know who’s ?) , you can edit the /etc/hosts file like me.
2. Building HSS
2.1 You can build HSS like this, some key words have to be changed.
[email protected]:~/Simulator/OpenAir4G_trunk/trunk/cmake_targets
tools/build_hss -c --connect-to-mme ubuntu.openair4G.eur -t -T --realm openair4G.eur
2.2 then you have to configure the HSS:
In oai_db (easier for newbies to access HSS database through http://127.0.0.1/phpmyadmin)
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 users, enter the record corresponding to your USIM card.
You may ( or may not) have some errors, when you type http://127.0.0.1/phpmyadmin,
404!!!!!( http://blog.csdn.net/junning_wu/article/details/46490767),
then you should run sudo ln -s /usr/share/phpmyadmin/ /var/www/html/ ,when you login the phpmyadmin,
(pic....)
then you can config your own MME,
(pic....)
and add your IMEI & SIM card
(pic....)
Also, you have to change the configure file hss.conf like this:
(pic....)
Or you may have some errors.
2.3 Run HSS
[email protected]:~/Simulator/OpenAir4G_trunk/trunk/cmake_targets
sudo tools/run_hss -g
Now you can see in the terminal, the “STATE_CLOSED”. It is because the MME is still not running.
(pic....)
3. Building the MME-GW
3.1 Build MME
[email protected]:~/Simulator/OpenAir4G_trunk/trunk/cmake_targets
./build_epc -c -d -t -T --s6a-server
If you have installed all the required libs, there will have no errors.
3.2 Configure MME
You can follow the example file, Since my knowledge about EPC is poor, I just leave it alone.( later I have some problems about tun2 interface and ping )
Configuring the MME-GW:
You can configure in file openair4G/trunk/cmake_targets/tools/epc.local.enb.conf.in the following parameters:
MCC/MNC of your network
SGI interface (outgoing interface of the S/P-GW)
Integrity algorithms, Ciphering algorithms
Please note that DNS addresses are hardcoded in source code (TODO in list).
3.3 Run MME
Running the MME-GW:
[email protected]:~/Simulator/OpenAir4G_trunk/trunk/cmake_targets
sudo ./run_epc -l -g -K
At first, you still have the “STATE_CLOSED”,.
(pic....)
Later, when HSS and MME are attached, you will see OPEN state.
(pic....)
4. eNB and UE
4.1 Build eNB
Just run the bash file, if you want to initiate SCOPE, you can do it as you want.
[email protected]:~/Simulator/OpenAir4G_trunk/trunk/cmake_targets
./build_oai --oaisim
4.2 Config eNB
Please change the configure file, enb.band7.generic.oaisim.local_mme.conf, or you can leave it as it is.
Maybe I should change the MME parameters, But like I already said, my knowledge is so poor. ~~~~
(pic....)
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.
[email protected]:~/Simulator/OpenAir4G_trunk/trunk/cmake_targets
sudo tools/run_enb_ue_virt_s1 -m /tmp -K /tmp/enb_ue_virt_s1_itti.log
if you have initiated the soft scope, you will see some transactions between the eNB and UE..
(pic....)
And in the EPC terminal , you can find 1 UE has attached.
And some message echange between MME and HSS.
(pic....)
And if you run ifcong in a new terminal , you will find there has a tun2 & lo interface,
(pic....)
You can ping tun2(though I don’t know what it mean????)
END
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.
版权声明:本文为博主原创文章,未经博主允许不得转载。