open5gs/README.md

211 lines
5.0 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-11-02 08:21:21 +00:00
## Install with a Package Manager
2017-09-29 14:25:45 +00:00
2017-11-02 08:21:21 +00:00
The nextepc package is available on 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-11-02 08:21:21 +00:00
That's it!
2017-09-29 14:25:45 +00:00
2017-11-02 08:21:21 +00:00
Configuraiton
=============
## Configuration IP connectivity
2017-09-29 14:25:45 +00:00
2017-11-02 08:21:21 +00:00
Configuration files are located `/etc/nextepc` directory.
2017-09-29 14:25:45 +00:00
2017-11-02 08:21:21 +00:00
Let's modify first the `/etc/nextepc/mme.conf` to set your IP address which is connected to eNodeB. For example, if your IP address is 192.168.0.6, both MME.NETWORK.S1AP_IPV4 and SGW.NETWORK.GTPU_IPV4 are changed as follows.
2017-11-02 12:38:12 +00:00
```
2017-11-02 08:21:21 +00:00
MME :
2017-09-29 14:25:45 +00:00
{
NETWORK :
{
2017-11-02 08:21:21 +00:00
S1AP_IPV4: "192.168.0.6",
GTPC_IPV4: "127.76.0.1"
2017-09-29 14:25:45 +00:00
}
2017-11-02 08:21:21 +00:00
},
SGW :
{
NETWORK :
2017-09-29 14:25:45 +00:00
{
2017-11-02 08:21:21 +00:00
GTPC_IPV4: "127.76.0.2",
GTPU_IPV4: "192.168.0.6"
2017-09-29 14:25:45 +00:00
}
2017-11-02 08:21:21 +00:00
}
```
2017-09-29 14:25:45 +00:00
2017-11-02 08:21:21 +00:00
And then, modify `/etc/nextepc/sgw.conf` to set your IP address. SGW.NETWORK.GTPU_IPV4 is updated with 192.168.0.6.
2017-11-02 12:38:12 +00:00
```
2017-11-02 08:21:21 +00:00
SGW :
{
NETWORK :
2017-09-29 14:25:45 +00:00
{
2017-11-02 08:21:21 +00:00
GTPC_IPV4: "127.76.0.2",
GTPU_IPV4: "192.168.0.6"
2017-09-29 14:25:45 +00:00
}
}
2017-11-02 08:21:21 +00:00
```
2017-09-29 14:25:45 +00:00
2017-11-02 08:21:21 +00:00
Finally, you should modify the routing table of the router, which is connected to the nextepc installed host. The following command is just a sample. The configuration method for each router will be different.
2017-09-29 14:25:45 +00:00
```bash
2017-11-02 08:21:21 +00:00
sudo route add -net 45.45.0.0 192.168.0.6
2017-09-29 14:25:45 +00:00
```
## Update GUMMEI and TAI
The followings are the **GUMMEI** and **TAI** of the *MME* currently set to Default. Your *eNodeB* will also have a **PLMN ID** and **TAC** set. Refer to these parameters to change the setting of MME or eNodeB.
2017-11-02 12:38:12 +00:00
```
2017-09-29 14:25:45 +00:00
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
For reference, MME can set several GUMMEI and TAI as **JSON array notation** as follows.
2017-11-02 12:38:12 +00:00
```
2017-09-29 14:25:45 +00:00
GUMMEI:
[
{
PLMN_ID :
{
MCC : "001",
MNC : "01"
}
MME_GID : 2,
MME_CODE : 1
},
{
PLMN_ID :
{
MCC : "005",
MNC : "05"
}
MME_GID : 5,
MME_CODE : 6
},
]
TAI:
[
{
PLMN_ID :
{
MCC: "001",
MNC: "01",
}
TAC: 12345
},
{
PLMN_ID :
{
MCC: "005",
MNC: "05",
}
TAC: 6789
}
]
2017-11-02 08:21:21 +00:00
```
2017-09-29 14:25:45 +00:00
2017-11-02 08:21:21 +00:00
## Restart MME and SGW.
2017-09-29 14:25:45 +00:00
2017-11-02 08:21:21 +00:00
```bash
systemctl restart nextepc-mmed
systemctl restart nextepc-sgwd
```
2017-09-29 14:25:45 +00:00
2017-11-02 08:21:21 +00:00
Now, S1-Setup is ready!
2017-09-29 14:25:45 +00:00
2017-11-02 08:21:21 +00:00
Web User Interface
==================
2017-09-29 14:25:45 +00:00
2017-11-02 08:21:21 +00:00
## Install Node.js and NPM
2017-09-29 14:25:45 +00:00
2017-11-02 08:21:21 +00:00
To get the latest **Node.js** and **NPM** version, you can visit the official **Node.js** website:
[https://nodesjs.org/en/download/](https://nodesjs.org/en/download/).
2017-09-29 14:25:45 +00:00
2017-11-02 08:21:21 +00:00
Or, you can install _Node.js_ and _NPM_ on **Ubuntu** as follows:
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-11-02 08:21:21 +00:00
## Install the dependencies for building the source
The first step is to use **npm** to install all depedencies.
2017-09-29 14:25:45 +00:00
2017-11-02 08:21:21 +00:00
```bash
cd nextepc/webui
npm install
```
## Build Web User Interface
```bash
npm run build
```
## Running Web Server
```bash
npm run start
```
This will start a server available on [http://localhost:3000](http://localhost:3000).
## Login with default account
Use **Web Browser** to connect it. _http://localhost:3000_
* Username : admin
* Password : 1423
Then, you can change your password in _Account_ Menu.
## Register Subscriber Information
There is only one setting for this guide. The _Subscriber Information_ required for **HSS** should be registered in _Mongo DB_.
* Go to Subscriber Menu
* Click + Button to add Subscriber Information
* Fill IMSI, Security(K, OPc, AMF), APN in the Form
* Click the `SAVE` Button
Turn on your **eNodeB** and **Mobile**. Check Wireshark!