open5gs/README.md

184 lines
6.8 KiB
Markdown
Raw Normal View History

2017-11-02 08:21:21 +00:00
What's NextEPC
2017-10-09 02:03:15 +00:00
================
2017-02-02 11:34:37 +00:00
2017-11-02 08:21:21 +00:00
NextEPC is a C-language Open Source implementation of the 3GPP Evolved Packet Core, i.e. the core network of an LTE network.
2017-02-20 00:52:42 +00:00
2017-11-02 08:21:21 +00:00
NextEPC provides the MME (Mobility Management Engine), which terminates the S1 interfaces from the eNodeBs cells in the cellular network, and interfaces via S11 to the SGW as well as via S6a to the HSS.
2017-02-20 00:52:42 +00:00
2017-11-02 08:21:21 +00:00
NextEPC provides the SGW (Serving Gateway) which is situated between the MME and PGW. It implements the S11 interface to the MME, and the S5 interface to the PGW.
2017-09-29 14:25:45 +00:00
2017-11-02 12:38:12 +00:00
NextEPC provides the PGW or PDN-GW (Packet Data Network Gateway) element of the EPC, i.e. the gateway between the EPC and the external packet data network, such as the public Internet. It implements the S5 interface towards the S-GW, the SGi interface towards the Internet, and the S7 interface towards the PCRF.
2017-09-29 14:25:45 +00:00
2017-11-02 08:21:21 +00:00
NextEPC provides the HSS (Home Subscriber Server) element of the EPC, i.e. the central database of mobile network subscribers, with their IMSI, MSISDN, cryptographic key materials, service subscription information, etc. It implements the S6a interface towards the MME using the DIAMETER protocol.
2017-09-29 14:25:45 +00:00
2017-11-02 08:21:21 +00:00
NextEPC contains the PCRF (Policy and Charging Rules Function), which controls the service quality (QoS) of individual connections and how to account/charge related traffic. It implements the Gx interface towards the PGW using the DIAMETER protocol.
2017-09-29 14:25:45 +00:00
2017-11-02 08:21:21 +00:00
Installation
============
2017-09-29 14:25:45 +00:00
2017-12-18 04:21:10 +00:00
This post will guide you on how to get installed **NextEPC** with your environment. To date, NextEPC has been tested on GNU/Linux distributions(Debian, Ubuntu, CentOS, Fedora, OpenSUSE), FreeBSD, and Mac OS X.
2017-09-29 14:25:45 +00:00
2017-12-18 04:21:10 +00:00
## Ubuntu
To get the latest Ubuntu version, please visit the official Ubuntu website: [https://www.ubuntu.com/download/](https://www.ubuntu.com/download/).
* ### Install with a Package Manager
The Nextepc package is available on the recent versions of Ubuntu.
2017-09-29 14:25:45 +00:00
```bash
2017-11-02 08:21:21 +00:00
sudo add-apt-repository ppa:acetcom/nextepc
sudo apt-get update
sudo apt-get install nextepc
2017-09-29 14:25:45 +00:00
```
2017-12-18 04:21:10 +00:00
This will create a virtual network interface named as *pgwtun*. It is automatically removed by uninstalling NextEPC.
```markdown
ifconfig pgwtun
pgwtun Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:45.45.0.1 P-t-P:45.45.0.1 Mask:255.255.0.0
inet6 addr: fe80::50f6:182c:5aa3:16bb/64 Scope:Link
inet6 addr: cafe::1/64 Scope:Global
...
```
2017-09-29 14:25:45 +00:00
2017-12-18 04:21:10 +00:00
* ### Uninstall NextEPC
2017-09-29 14:25:45 +00:00
2017-12-18 04:21:10 +00:00
```bash
sudo apt-get purge nextepc-core
2017-11-02 08:21:21 +00:00
```
2017-09-29 14:25:45 +00:00
2017-12-18 04:21:10 +00:00
You may need to remove manually /var/log/nextepc unless it is empty.
2017-09-29 14:25:45 +00:00
```bash
2017-12-18 04:21:10 +00:00
sudo rm -Rf /var/log/nextepc
2017-09-29 14:25:45 +00:00
```
2017-12-18 04:21:10 +00:00
## Debian, CentOS, Fedora, OpenSUSE, FreeBSD, and Mac OS X
2017-09-29 14:25:45 +00:00
2017-12-18 04:21:10 +00:00
For these OS, you should build NextEPC from the code. First clone this [repository](https://github.com/acetcom/nextepc.git) and then follow instructions described in the [documentation](http://nextepc.org/docs/).
2017-09-29 14:25:45 +00:00
2017-12-18 04:21:10 +00:00
* ### [FreeBSD](http://nextepc.org/docs/build/1-freebsd)
* ### [Mac OS X](http://nextepc.org/docs/build/2-macosx)
* ### [CentOS](http://nextepc.org/docs/build/3-centos)
* ### [Fedora](http://nextepc.org/docs/build/4-fedora)
* ### [Ubuntu](http://nextepc.org/docs/build/5-ubuntu)
2017-09-29 14:25:45 +00:00
2017-12-18 04:21:10 +00:00
Configuraiton
=============
In LTE, there are tons of configurable parameters. This page will guide you to set essential parameters up. The configuration consists of two parts: IP network connectivity and LTE network settings.
## 1. IP Connectivity between Network Entities
The minimum requirement of having IP connectvity is to add a route for UE to have Internet connectivity.
By default, a LTE UE will receive a IP address with the network address of 45.45.0.0/16 or cafe::0/64. If you have a [NAT](https://en.wikipedia.org/wiki/Network_address_translation) router (e.g., wireless router, cable modem, etc), the LTE UE can reach Internet in uplink, but it cannot in downlink. It's because the NAT router has no idea on these IP addresses, so adding a route is required. Please refer to the user manual to know how to add a static route in your router.
Add a route of both 45.45.0.0/16 and cafe::0/64 to go the PGW IP address. For example, a command for Linux will be:
```bash
sudo ip route add 45.45.0.0/16 via <PGW IP address>
sudo ip route add cafe::0/64 via <PGW IP address>
2017-11-02 12:38:12 +00:00
```
2017-12-18 04:21:10 +00:00
## 2. LTE Network Settings
By default, LTE PLMN and TAC are set as shown in the following:
```yaml
mme:
gummei:
plmn_id:
mcc: 001
mnc: 01
mme_gid: 2
mme_code: 1
tai:
plmn_id:
mcc: 001
mnc: 01
tac: 12345
2017-11-02 08:21:21 +00:00
```
2017-09-29 14:25:45 +00:00
2017-12-18 04:21:10 +00:00
The LTE EnodeBs need to be set to use the same values of PLMN and TAC in NextEPC. If you want to change them, please modifiy in `/etc/nextepc/mme.conf`.
After changing conf files, please restart NextEPC daemons.
2017-09-29 14:25:45 +00:00
2017-11-02 08:21:21 +00:00
```bash
systemctl restart nextepc-mmed
```
2017-09-29 14:25:45 +00:00
2017-12-18 04:21:10 +00:00
Web UI
2017-11-02 08:21:21 +00:00
==================
2017-09-29 14:25:45 +00:00
2017-12-18 04:21:10 +00:00
NextEPC has a number of configuration files corresponding to LTE network entities, which are in [YAML](http://yaml.org/) format. The LTE user subcription information of NextEPC is stored and maintained by [Mongo DB](https://www.mongodb.com/). Configuration files, located in `etc/nextepc/*.conf` can be easily modified using a general text editor such as [vi](http://www.vim.org/) or [emacs](https://www.gnu.org/s/emacs/), while managing the subscriber information requires a [Mongo DB client](https://docs.mongodb.com/ecosystem/tools/).
NextEPC provides an alternative management interface for customers to manage their subscriber information in an easy way, that is **Web User Interface**. The following shows how to install the Web UI of NextEPC.
## 1. Install Node.js and NPM
2017-09-29 14:25:45 +00:00
2017-12-18 04:21:10 +00:00
To get the latest [Node.js](https://nodejs.org/) and [NPM](https://www.npmjs.com/), please visit the official Node.js website:
2017-11-02 08:21:21 +00:00
[https://nodesjs.org/en/download/](https://nodesjs.org/en/download/).
2017-09-29 14:25:45 +00:00
2017-12-18 04:21:10 +00:00
Or, you can install [Node.js](https://nodejs.org/) and [NPM](https://www.npmjs.com/) if you're using [Ubuntu](https://www.ubuntu.com):
2017-09-29 14:25:45 +00:00
```bash
2017-11-02 08:21:21 +00:00
sudo apt-get -y install curl gnupg
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get -y install nodejs
2017-09-29 14:25:45 +00:00
```
2017-12-18 04:21:10 +00:00
## 2. Obtain the source code
2017-11-02 08:21:21 +00:00
2017-12-18 04:21:10 +00:00
```bash
git clone https://github.com/acetcom/nextepc
```
## 3. Install the dependencies to build the code
2017-09-29 14:25:45 +00:00
2017-11-02 08:21:21 +00:00
```bash
cd nextepc/webui
npm install
```
2017-12-18 04:21:10 +00:00
## 4. Build
2017-11-02 08:21:21 +00:00
```bash
npm run build
```
2017-12-18 04:21:10 +00:00
## 5. Running
2017-11-02 08:21:21 +00:00
```bash
npm run start
```
2017-12-18 04:21:10 +00:00
Now the web server is running on _http://localhost:3000_.
2017-11-02 08:21:21 +00:00
2017-12-18 04:21:10 +00:00
## 6. Login with the default account
2017-11-02 08:21:21 +00:00
2017-12-18 04:21:10 +00:00
Open _http://localhost:3000_. Login with **admin**.
2017-11-02 08:21:21 +00:00
* Username : admin
* Password : 1423
2017-12-18 04:21:10 +00:00
Please change the password in _Account_ Menu.
## 7. Register a subscriber
2017-11-02 08:21:21 +00:00
2017-12-18 04:21:10 +00:00
Using Web UI, you can add a subscriber without a Mongo DB client.
2017-11-02 08:21:21 +00:00
2017-12-18 04:21:10 +00:00
* Go to Subscriber Menu.
* Click `+` Button to add a new subscriber.
* Fill the IMSI, security context(K, OPc, AMF), and APN of the subscriber.
* Click `SAVE` Button
2017-11-02 08:21:21 +00:00
2017-12-18 04:21:10 +00:00
This addition affects immediately NextEPC without restaring any daemon.
2017-11-02 08:21:21 +00:00