基于 OAI 部署私有的 4G EPS,作者分为上下两部分进行阐述,本文主要分享下部分内容,大纲如下:
部署步骤
前期部署
安装 OAI-CN
安装 OAI-RAN
上部分内容回顾:
硬件设备要求
操作系统要求
All-In-One 部署网络拓
前言
笔者参加了北京邮电大学去年冬季的 OpenAirInterface Workshop Fall 2019,收获颇丰。尤其是对 Mosaic5G 演示的通过 Ubuntu Snap 来快速部署 OAI All-In-One 实验环境的方式印象深刻。Ubuntu Snap 部署方式的优点是快速便捷,适合新手入门体验 OAI,或者非通信专业人士搭建方案验证环境。但并不适合 OAI 开发者。本文主要是对 Ubuntu Snap 部署方式进行验证以及对 4G LTE/EPC 的实践学习。
注:下文部分内容摘自 PPT 《FlexRAN-Training》
1
部署步骤
前期准备
国内软件源
软件更新
运维工具
Ubuntu Snap,详见《Ubuntu Snap 简述》
科学上网
安装 OAI-CN
HSS
Initialize the HSS: sudo oai-cn.hss-init
Get the configuration file: sudo oai-cn.hss-conf-ge
In hss_fd.conf, change Identity to match
In hss.conf, ensure the right MySQL username and password. Set OPERATOR_key to 1111…
Install MySQL and PHPMyAdmin if you not:
Create certificates: sudo oai-cn.hss-init(会生成 oai_db 数据库,所以执行之前要安装好 MySQL)
Run HSS: sudo oai-cn.hss
The last line should read Initializing S6a layer: DONE
MME
Initialize the MME: sudo oai-cn.mme-init
Locate configuration files in directory: sudo oai-cn.mme-conf-get
In mme_fd.conf: Identity needs to match hostname, ConnectPeer maybe too
In mme.conf
Correct hostname in HSS_HOSTNAME
Edit GUMMEI_LIST and TAI_LIST
NETWORK_INTERFACES: MME_IPV4_ADDRESS_FOR_S1_MME to 127.0.1.10/24, MME_IPV4_ADDRESS_FOR_S11_MME to 127.0.11.1/8
S-GW: SGW_IPV4_ADDRESS_FOR_S11 to 127.0.11.2/
Start the MME: sudo oai-cn.mme
Last line: Peer
NOTE:如果是分布式部署不能使用 lo 的话,就需要根据实际的网络情况首先配置好网卡和 IP 地址。例如:
否则 S1-C 接口建立的时候会触发 Failed to create new SCTP listener 错误,因为 S1-C 接口是在 SCTP 协议之上实现的。
SPGW
Initialize the SPGW: sudo oai-cn.spgw-init
In spgw.conf:
SGW_IPV4_ADDRESS_FOR_S11 to 127.0.11.2/8
SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP to 127.0.1.10/24
PGW_INTERFACE_NAME_FOR_SGI: the interface to the Internet
DEFAULT_DNS_IPV4_ADDRESS: your DNS
Start the SPGW: sudo oai-cn.spgw
Last line: Initializing SPGW-APP task interface: DONE
安装 OAI-RAN
Get the configuration file: sudo oai-ran.enb-conf-get
Edit plmn_list
Edit mme_ip_address
Edit NETWORK_INTERFACES
Lower max_rxgain
Set parallel_config to PARALLEL_SINGLE_THREAD
Disable FLEXRAN_ENABLED (no)
Possibly lower downlink_frequency
Recommended: N_RB_DL to 25
Start Wireshark on any interface, capture filter port 36412
Start the RAN sudo oai-ran.enb
Verify that S1SetupRequest is followed by S1SetupResponse (without error. . . )
Connection of a phone, troubleshooting individually
启动 eNB 时,会与 MME 连接 SCTP 连接,在此之上再连接 S1-AP 协议通信。SCTP 连接建立过程如下: