How to run oaisim with virtual MME on same machine

本文详细介绍了如何在SAM机器上设置虚拟MME,并通过配置EPC系统实现eNB和UE的连接。包括安装freediameter、构建HSS、MME-GW、eNB和UE等步骤,提供了从零开始搭建完整EPC系统的指南。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.

wujn@ubuntu:~/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.youkuaiyun.com/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

wujn@ubuntu:~/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

wujn@ubuntu:~/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:

wujn@ubuntu:~/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.

wujn@ubuntu:~/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.

wujn@ubuntu:~/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.


评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值