Add a Document

This commit is contained in:
Sukchan Lee 2019-04-28 00:01:51 +09:00
parent 3ff9c6bbb5
commit 48bfe83c0f
57 changed files with 3456 additions and 0 deletions

3
docs/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
_site
.sass-cache
.jekyll-metadata

24
docs/Gemfile Normal file
View File

@ -0,0 +1,24 @@
source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 3.8.5"
gem "minima", "~> 2.0"
gem 'jekyll-seo-tag'
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
gem "jekyll-redirect-from"
end

77
docs/Gemfile.lock Normal file
View File

@ -0,0 +1,77 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
colorator (1.1.0)
concurrent-ruby (1.1.5)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.7)
ffi (1.10.0)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jekyll (3.8.5)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 2.0)
kramdown (~> 1.14)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
jekyll-feed (0.12.1)
jekyll (>= 3.7, < 5.0)
jekyll-redirect-from (0.15.0)
jekyll (>= 3.3, < 5.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-seo-tag (2.6.0)
jekyll (~> 3.3)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (1.17.0)
liquid (4.0.3)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
mercenary (0.3.6)
minima (2.5.0)
jekyll (~> 3.5)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (3.0.3)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
ffi (~> 1.0)
rouge (3.3.0)
ruby_dep (1.5.0)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
PLATFORMS
ruby
DEPENDENCIES
jekyll (~> 3.8.5)
jekyll-feed (~> 0.6)
jekyll-redirect-from
jekyll-seo-tag
minima (~> 2.0)
BUNDLED WITH
2.0.1

107
docs/_config.yml Normal file
View File

@ -0,0 +1,107 @@
# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely edit after that. If you find
# yourself editing this file very often, consider using Jekyll's data files
# feature for the data you need to update frequently.
#
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'bundle exec jekyll serve'. If you change this file, please restart the server process.
# Site settings
# These are used to personalize your new site. If you look in the HTML files,
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.
title: NextEPC
email: acetcom@gmail.com
description: >- # this means to ignore newlines until "baseurl:"
An open source implementation of the Evolved Packet Core of LTE networks
supporting 3GPP Release 13.
baseurl: "/blog" # the subpath of your site, e.g. /blog
url: "https://open5gs.org" # the base hostname & protocol for your site, e.g. http://example.com
author: "Sukchan Lee"
github_username: acetcom
# Build settings
markdown: kramdown
plugins:
- jekyll-feed
- jekyll-seo-tag
- jekyll-redirect-from
include:
- _pages
# Exclude from processing.
# The following items will not be processed, by default. Create a custom list
# to override the default setting.
exclude:
- Gemfile
- Gemfile.lock
- node_modules
- vendor/bundle/
- vendor/cache/
- vendor/gems/
- vendor/ruby/
# Minima date format
# refer to http://shopify.github.io/liquid/filters/date/ if you want to customize this
minima_reboot:
date_format: "%Y-%m-%d %H:%M"
footer_icons:
- username: open5gs/nextepc
url: https://github.com/open5gs/nextepc
icon: icon-github.svg
header_pages:
- _pages/docs.md
- _pages/faq.md
- _pages/about.md
- _pages/github.md
show_excerpts: true
# Collections
collections:
docs:
output: true
permalink: /:collection/:path/
defaults:
# _pages
- scope:
path: ""
type: pages
values:
layout: page
# _posts
- scope:
path: ""
type: posts
values:
layout: post
# _docs
- scope:
path: ""
type: docs
values:
layout: post
# Archives
# Type
# - GitHub Pages compatible archive pages built with Liquid ~> type: liquid (default)
# - Jekyll Archives plugin archive pages ~> type: jekyll-archives
# Path (examples)
# - Archive page should exist at path when using Liquid method or you can
# expect broken links (especially with breadcrumbs enabled)
# - <base_path>/tags/my-awesome-tag/index.html ~> path: /tags/
# - <base_path/categories/my-awesome-category/index.html ~> path: /categories/
# - <base_path/my-awesome-category/index.html ~> path: /
category_archive:
type: liquid
path: /categories/
tag_archive:
type: liquid
path: /tags/

View File

@ -0,0 +1,233 @@
---
title: Qucikstart
---
**Note:** NextEPC supports installation of packages in *Debian/Ubuntu and openSUSE* environments. *CentOS, Fedora, FreeBSD, and Mac OSX* require you to [build with source code]({{ site.url }}{{ site.baseurl }}/docs/guide/02-building-nextepc-from-sources)
{: .notice--warning}
### Install NextEPC with a Package Manager
---
The nextepc package is available on the recent versions of *Ubuntu*.
```bash
$ sudo apt update
$ sudo apt install software-properties-common
$ sudo add-apt-repository ppa:acetcom/nextepc
$ sudo apt update
$ sudo apt install nextepc
```
>The NextEPC package is also available on [OBS](https://build.opensuse.org/package/show/home:acetcom:open5gs:snapshot/nextepc). First, install the authentication key as shown below.
```bash
$ sudo apt install wget
$ wget https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_18.10/Release.key
$ sudo apt install gnupg
$ sudo apt-key add Release.key
```
In Debian 9.0, you can install it as follows:
```bash
$ sudo sh -c "echo 'deb https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Debian_9.0/ ./' > /etc/apt/sources.list.d/open5gs.list"
$ sudo apt update
$ sudo apt install nextepc
```
Other Linux distributions can be installed by changing the path.
```
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/Raspbian_9.0/
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_16.04/
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_17.10/
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_18.04/
https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_18.10/
```
{: .notice--success}
[Martin Hauke](https://build.opensuse.org/user/show/mnhauke) packaged NextEPC for *openSUSE* on [OBS](https://build.opensuse.org/package/show/home:mnhauke:nextepc/nextepc).
```bash
$ sudo zypper addrepo -f obs://home:mnhauke:nextepc home:mnhauke:nextepc
$ sudo zypper install nextepc
$ sudo zypper install mongodb-server mongodb-shell
```
### Configure NextEPC
---
Modify [/etc/nextepc/mme.conf](https://github.com/{{ site.github_username }}/nextepc/blob/master/support/config/mme.conf.in) to set the S1AP/GTP-C IP address, PLMN ID, and TAC
```diff
diff -u /etc/nextepc/mme.conf.old /etc/nextepc/mme.conf
--- mme.conf.old 2018-04-15 18:28:31.000000000 +0900
+++ mme.conf 2018-04-15 19:53:10.000000000 +0900
@@ -8,18 +8,20 @@ parameter:
mme:
freeDiameter: mme.conf
s1ap:
+ addr: 192.168.0.100
gtpc:
+ addr: 192.168.0.100
gummei:
plmn_id:
- mcc: 001
- mnc: 01
+ mcc: 901
+ mnc: 70
mme_gid: 2
mme_code: 1
tai:
plmn_id:
- mcc: 001
- mnc: 01
- tac: 12345
+ mcc: 901
+ mnc: 70
+ tac: 7
security:
integrity_order : [ EIA1, EIA2, EIA0 ]
ciphering_order : [ EEA0, EEA1, EEA2 ]
```
Modify [/etc/nextepc/sgw.conf](https://github.com/{{ site.github_username }}/nextepc/blob/master/support/config/sgw.conf.in) to set the GTP-U IP address.
```diff
diff -u /etc/nextepc/sgw.conf.old /etc/nextepc/sgw.conf
--- sgw.conf.old 2018-04-15 18:30:25.000000000 +0900
+++ sgw.conf 2018-04-15 18:30:30.000000000 +0900
@@ -14,3 +14,4 @@
gtpc:
addr: 127.0.0.2
gtpu:
+ addr: 192.168.0.100
```
After changing conf files, please restart NextEPC daemons.
```bash
$ sudo systemctl restart nextepc-mmed
$ sudo systemctl restart nextepc-sgwd
```
### Install WebUI of NextEPC
---
[Node.js](https://nodejs.org/) is required to install WebUI of NextEPC
1. *Debian and Ubuntu* based Linux distributions can install [Node.js](https://nodejs.org/) as follows:
```bash
$ sudo apt install curl
$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
$ sudo apt install nodejs
```
2. To install [Node.js](https://nodejs.org/) on *openSUSE*, run the following:
```bash
$ sudo zypper install nodejs8
```
You can now install WebUI of NextEPC.
```bash
$ curl -sL {{ site.url }}/static/webui/install | sudo -E bash -
```
### Register Subscriber Information
---
Connect to `http://localhost:3000` and login with **admin** account.
> Username : admin
> Password : 1423
**Tip:** You can change the password in _Account_ Menu.
{: .notice--info}
To add subscriber information, you can do WebUI operations in the following order:
1. Go to `Subscriber` Menu.
2. Click `+` Button to add a new subscriber.
3. Fill the IMSI, security context(K, OPc, AMF), and APN of the subscriber.
4. Click `SAVE` Button
**Tip:** This addition immediately affects NextEPC without restaring any daemon.
{: .notice--info}
### Adding a route for UE to have Internet connectivity
---
If your phone can connect to internet, you must run the following command in NextEPC-PGW installed host.
```bash
$ sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
$ sudo iptables -t nat -A POSTROUTING -o 'interface-name' -j MASQUERADE
$ sudo iptables -I INPUT -i pgwtun -j ACCEPT
```
**Note:** In the above command, you should replace `'interface-name'` with your interface name that can connect to the internet. (For example, `enp0s25`, `wls3`, and so on).
{: .notice--danger}
### Turn on your eNodeB and Phone
---
- You can see actual traffic through wireshark -- [[srsenb.pcapng]]({{ site.url }}{{ site.baseurl }}/assets/pcapng/srsenb.pcapng).
- You can view the log at `/var/log/nextepc/*.log`.
### Troubleshooting
---
Problem with NextEPC can be filed as [GitHub Issues](https://github.com/open5gs/nextepc/issues). Please include the following to get help:
- Attach `*.pcapng` file created by wireskark.
- Attach configuration files at `/etc/nextepc/*.conf`.
- Attach log files at `/var/log/nextepc/*.log`.
You can modify the configuration file to record more logs.
```diff
diff -u /etc/nextepc/mme.conf.old /etc/nextepc/mme.conf
--- mme.conf.old 2018-04-15 18:28:31.000000000 +0900
+++ mme.conf 2018-04-15 19:53:10.000000000 +0900
@@ -2,6 +2,7 @@
logger:
file: @LOCALSTATE_DIR@/log/nextepc/mme.log
+ level: debug
parameter:
```
After changing conf files, please restart NextEPC daemons.
```bash
$ sudo systemctl restart nextepc-mmed
$ sudo systemctl restart nextepc-sgwd
```
### Uninstall NextEPC and WebUI
How to remove NextEPC package:
1. On *Ubuntu*:
```bash
$ sudo apt purge nextepc*
```
2. On *openSUSE*:
```bash
$ sudo zypper rm nextepc
```
You may need to remove manually `/var/log/nextepc` unless it is empty.
```bash
$ sudo rm -Rf /var/log/nextepc
```
The WebUI of NextEPC can be removed as follows:
```bash
curl -sL {{ site.url }}{{ site.baseurl }}/assets/webui/uninstall | sudo -E bash -
```

View File

@ -0,0 +1,400 @@
---
title: Building nextepc from Sources
head_inline: "<style> .blue { color: blue; } </style>"
---
This post explains how to compile and install the source code on **Debian/Ubuntu** based Linux Distribution.
{: .blue}
### Getting MongoDB
---
Install MongoDB with package manager.
```bash
$ sudo apt update
$ sudo apt install mongodb
$ sudo systemctl start mongodb (if '/usr/bin/mongod' is not running)
```
### Setting up TUN device (No persistent after rebooting)
---
Create the TUN device with the interface name `pgwtun`.
```bash
$ sudo ip tuntap add name pgwtun mode tun
$ sudo ip addr add 45.45.0.1/16 dev pgwtun
$ sudo ip addr add cafe::1/64 dev pgwtun
$ sudo ip link set pgwtun up
```
The script provided in [$GIT_REPO/support/network/restart.sh](https://github.com/{{ site.github_username }}/nextepc/blob/master/support/network/restart.sh) makes it easy to configure the TUN device as follows:
`$ sudo ./support/network/restart.sh`
{: .notice--info}
### Building NextEPC
---
Install the depedencies for building the source code.
```bash
$ sudo apt install autoconf libtool gcc pkg-config git flex bison libsctp-dev libgnutls28-dev libgcrypt-dev libssl-dev libidn11-dev libmongoc-dev libbson-dev libyaml-dev
```
Git clone with `--recursive` option.
```bash
➜ open5gs git clone --recursive https://github.com/{{ site.github_username }}/nextepc
```
To compile with autotools:
```bash
➜ open5gs cd nextepc
➜ nextepc git:(master) ✗ autoreconf -iv
➜ nextepc git:(master) ✗ ./configure --prefix=`pwd`/install
➜ nextepc git:(master) ✗ make -j `nproc`
```
Check whether the compilation is correct.
```bash
➜ nextepc git:(master) ✗ make check
```
You need to perform the **installation process**.
```bash
➜ nextepc git:(master) ✗ make install
```
Check whether the installation is correct.
```bash
➜ nextepc git:(master) ✗ ./test/testcomplex
s1setup_test : SUCCESS
attach_test : SUCCESS
volte_test : SUCCESS
handover_test : SUCCESS
All tests passed.
```
**Tip:** You can also check the result of `./test/testcomplex` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || diameter || gtp`. You can see the virtually created packets. [[testcomplex.pcapng]]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testcomplex.pcapng)
{: .notice--info}
### Configure NextEPC
---
**Note:** In the developer environment, all settings can be managed in one place, such as [$INSTALL_PREFIX/install/etc/nextepc/nextepc.conf](https://github.com/{{ site.github_username }}/nextepc/blob/master/support/config/nextepc.conf.in).
{: .notice--danger}
Modify [$INSTALL_PREFIX/install/etc/nextepc/nextepc.conf](https://github.com/{{ site.github_username }}/nextepc/blob/master/support/config/nextepc.conf.in) to set the S1AP/GTP-C/GTP-U IP address, PLMN ID, and TAC
```diff
diff -u ./install/etc/nextepc/nextepc.conf.old ./install/etc/nextepc/nextepc.conf
--- nextepc.conf.old 2018-04-15 18:28:31.000000000 +0900
+++ nextepc.conf 2018-04-15 19:53:10.000000000 +0900
@@ -74,6 +74,7 @@ mme:
# dev: eth0
#
s1ap:
+ addr: 192.168.0.100
#
# <GTP-C Server>>
@@ -87,6 +88,7 @@ mme:
# - addr: ::1
#
gtpc:
+ addr: 192.168.0.100
#
# <GUMMEI>
@@ -110,8 +112,8 @@ mme:
#
gummei:
plmn_id:
- mcc: 001
- mnc: 01
+ mcc: 901
+ mnc: 70
mme_gid: 2
mme_code: 1
@@ -149,9 +151,9 @@ mme:
#
tai:
plmn_id:
- mcc: 001
- mnc: 01
- tac: 12345
+ mcc: 901
+ mnc: 70
+ tac: 7
security:
integrity_order : [ EIA1, EIA2, EIA0 ]
@@ -242,6 +244,7 @@ sgw:
# gtpu:
#
gtpu:
+ addr: 192.168.0.100
pgw:
freeDiameter: pgw.conf
```
### Running NextEPC
---
For developers, it provides `nextepc-epcd` daemon that includes both *MME*, *SGW*, *PGW*, *HSS*, and *PCRF*.
```bash
➜ nextepc git:(master) ✗ ./nextepc-epcd
04/06 23:13:03.367: [core] INFO: NextEPC daemon start (main.c:169)
PID[6404]: '/home/acetcom/Documents/git/open5gs/nextepc/install/var/run/nextepc-epcd/pid'
File Logging: '/home/acetcom/Documents/git/open5gs/nextepc/install/var/log/nextepc/nextepc.log'
MongoDB URI: 'mongodb://localhost/nextepc'
Configuration: '/home/acetcom/Documents/git/open5gs/nextepc/install/etc/nextepc/nextepc.conf'
04/06 23:13:03.369: [core] INFO: PCRF try to initialize (epc.c:37)
...
```
Several command line options are provided.
```bash
➜ nextepc git:(master) ✗ ./nextepc-epcd -h
Password:
NextEPC daemon v0.4.0.67-078c - Apr 6 2019 17:20:24
Usage: ./nextepc-epcd [arguments]
Arguments:
-v Show version
-h Show help
-D Start as daemon
-f Set configuration file name
-l log_file Log file path to be logged to
-p pid_file PID file path
-d core:gtp:event Enable debugging
-t sock:mem: Enable trace
```
### Building WebUI of NextEPC
---
[Node.js](https://nodejs.org/) is required to build WebUI of NextEPC
```bash
$ sudo apt install curl
$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
$ sudo apt install nodejs
```
Install the dependencies to run WebUI
```bash
➜ nextepc git:(master) ✗ cd webui
➜ webui git:(master) ✗ npm install
```
The WebUI runs as an [npm](https://www.npmjs.com/) script.
```bash
➜ webui git:(master) ✗ npm run dev
```
### Register Subscriber Information
---
Connect to `http://localhost:3000` and login with **admin** account.
> Username : admin
> Password : 1423
**Note:**
You can change the password in _Account_ Menu.
{: .notice--info}
To add subscriber information, you can do WebUI operations in the following order:
1. Go to `Subscriber` Menu.
2. Click `+` Button to add a new subscriber.
3. Fill the IMSI, security context(K, OPc, AMF), and APN of the subscriber.
4. Click `SAVE` Button
**Tip:** This addition immediately affects NextEPC without restaring any daemon.
{: .notice--warning}
### Adding a route for UE to have internet connectivity
---
If your phone can connect to internet, you must run the following command in NextEPC-PGW installed host.
```bash
$ sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
$ sudo iptables -t nat -A POSTROUTING -o 'interface-name' -j MASQUERADE
$ sudo iptables -I INPUT -i pgwtun -j ACCEPT
```
**Note:** In the above command, you should replace `'interface-name'` with your interface name that can connect to the internet. (For example, `enp0s25`, `wls3`, and so on).
{: .notice--danger}
### Turn on your eNodeB and Phone
---
- You can see actual traffic through wireshark -- [[srsenb.pcapng]]({{ site.url }}{{ site.baseurl }}/assets/pcapng/srsenb.pcapng).
- You can view the log at `$INSTALL_PREFIX/var/log/nextepc/*.log`.
### Troubleshooting
---
Debugging tools can help you troubleshoot problems.
- [GDB](https://www.gnu.org/software/gdb/) can be used as below:
```bash
➜ nextepc git:(master) ✗ sudo apt install gdb
➜ nextepc git:(master) ✗ ./libtool --mode=execute gdb ./nextepc-epcd
```
- On *Mac OS X*, you can use the [LLDB](https://lldb.llvm.org/).
```bash
➜ nextepc git:(master) ✗ ./libtool --mode=execute sudo lldb ./nextepc-epcd
```
You can use the command line option[`-d`] to record more logs.
```bash
➜ nextepc git:(master) ✗ ./nextepc-epcd -d
04/07 16:46:23.982: [core] INFO: NextEPC daemon start (main.c:169)
PID[5185]: '/Users/acetcom/Documents/git/open5gs/nextepc/install/var/run/nextepc-epcd/pid'
File Logging: '/Users/acetcom/Documents/git/open5gs/nextepc/install/var/log/nextepc/nextepc.log'
MongoDB URI: 'mongodb://localhost/nextepc'
Configuration: '/Users/acetcom/Documents/git/open5gs/nextepc/install/etc/nextepc/nextepc.conf'
04/07 16:46:23.996: [core] INFO: PCRF try to initialize (epc.c:37)
04/07 16:46:24.033: [core] INFO: PCRF initialize...done (epc.c:40)
04/07 16:46:24.035: [core] INFO: PGW try to initialize (epc.c:84)
04/07 16:46:24.132: [thread] DEBUG: [0x10d4df908] thread started (ogs-thread.c:101)
04/07 16:46:24.132: [thread] DEBUG: [0x10d4df908] worker signal (ogs-thread.c:66)
04/07 16:46:24.132: [fd] INFO: CONNECTED TO 'pgw.localdomain' (TCP,soc#11): (fd_logger.c:113)
04/07 16:46:24.133: [core] INFO: PGW initialize...done (epc.c:87)
04/07 16:46:24.133: [pgw] DEBUG: pgw_state_initial(): INIT (pgw_sm.c:15)
04/07 16:46:24.133: [fd] INFO: CONNECTED TO 'pcrf.localdomain' (TCP,soc#11): (fd_logger.c:113)
04/07 16:46:24.134: [pgw] DEBUG: pgw_state_operational(): ENTRY (pgw_sm.c:33)
04/07 16:46:24.135: [core] INFO: SGW try to initialize (epc.c:133)
04/07 16:46:24.136: [sock] DEBUG: socket create(2:2:17) (ogs-socket.c:82)
04/07 16:46:24.136: [sock] DEBUG: udp socket(2) (ogs-udp.c:32)
04/07 16:46:24.137: [sock] DEBUG: socket bind 127.0.0.3:2123 (ogs-socket.c:107)
04/07 16:46:24.138: [sock] DEBUG: udp_server() [127.0.0.3]:2123 (ogs-udp.c:55)
04/07 16:46:24.139: [gtp] INFO: gtp_server() [127.0.0.3]:2123 (gtp_path.c:35)
04/07 16:46:24.140: [sock] DEBUG: socket create(2:2:17) (ogs-socket.c:82)
04/07 16:46:24.140: [sock] DEBUG: udp socket(2) (ogs-udp.c:32)
04/07 16:46:24.141: [sock] DEBUG: socket bind 127.0.0.3:2152 (ogs-socket.c:107)
04/07 16:46:24.142: [sock] DEBUG: udp_server() [127.0.0.3]:2152 (ogs-udp.c:55)
04/07 16:46:24.143: [gtp] INFO: gtp_server() [127.0.0.3]:2152 (gtp_path.c:35)
04/07 16:46:24.158: [thread] DEBUG: [0x10d4df408] worker signal (ogs-thread.c:66)
04/07 16:46:24.158: [thread] DEBUG: [0x10d4df408] thread started (ogs-thread.c:101)
04/07 16:46:24.159: [sgw] DEBUG: sgw_state_initial(): INIT
(sgw_sm.c:12)
04/07 16:46:24.159: [core] INFO: SGW initialize...done (epc.c:136)
04/07 16:46:24.160: [sgw] DEBUG: sgw_state_operational(): ENTRY
(sgw_sm.c:30)
04/07 16:46:24.161: [sock] DEBUG: socket create(2:2:17) (ogs-socket.c:82)
04/07 16:46:24.162: [sock] DEBUG: udp socket(2) (ogs-udp.c:32)
04/07 16:46:24.162: [sock] DEBUG: socket bind 127.0.0.2:2123 (ogs-socket.c:107)
04/07 16:46:24.162: [core] INFO: HSS try to initialize (epc.c:184)
04/07 16:46:24.163: [sock] DEBUG: udp_server() [127.0.0.2]:2123 (ogs-udp.c:55)
04/07 16:46:24.164: [gtp] INFO: gtp_server() [127.0.0.2]:2123 (gtp_path.c:35)
04/07 16:46:24.164: [sock] DEBUG: socket create(2:2:17) (ogs-socket.c:82)
04/07 16:46:24.165: [sock] DEBUG: udp socket(2) (ogs-udp.c:32)
04/07 16:46:24.166: [sock] DEBUG: socket bind 192.168.0.3:2152 (ogs-socket.c:107)
04/07 16:46:24.166: [sock] DEBUG: udp_server() [192.168.0.3]:2152 (ogs-udp.c:55)
04/07 16:46:24.167: [gtp] INFO: gtp_server() [192.168.0.3]:2152 (gtp_path.c:35)
04/07 16:46:24.254: [core] INFO: HSS initialize...done (epc.c:187)
04/07 16:46:24.255: [core] INFO: MME try to initialize (epc.c:217)
04/07 16:46:24.366: [fd] INFO: CONNECTED TO 'mme.localdomain' (TCP,soc#9): (fd_logger.c:113)
04/07 16:46:24.367: [fd] INFO: CONNECTED TO 'hss.localdomain' (TCP,soc#17): (fd_logger.c:113)
04/07 16:46:24.367: [thread] DEBUG: [0x10d4dfe08] thread started (ogs-thread.c:101)
04/07 16:46:24.367: [core] INFO: MME initialize...done (epc.c:220)
04/07 16:46:24.367: [thread] DEBUG: [0x10d4dfe08] worker signal (ogs-thread.c:66)
NextEPC daemon v0.4.0.67-078c - Apr 6 2019 17:20:24
04/07 16:46:24.368: [mme] DEBUG: mme_state_initial(): INIT
(mme_sm.c:23)
04/07 16:46:24.368: [mme] DEBUG: mme_state_operational(): ENTRY
(mme_sm.c:43)
04/07 16:46:24.368: [sock] DEBUG: socket create(2:2:17) (ogs-socket.c:82)
04/07 16:46:24.368: [sock] DEBUG: udp socket(2) (ogs-udp.c:32)
04/07 16:46:24.368: [sock] DEBUG: socket bind 192.168.0.3:2123 (ogs-socket.c:107)
04/07 16:46:24.368: [sock] DEBUG: udp_server() [192.168.0.3]:2123 (ogs-udp.c:55)
04/07 16:46:24.368: [gtp] INFO: gtp_server() [192.168.0.3]:2123 (gtp_path.c:35)
04/07 16:46:24.368: [sock] DEBUG: socket create(2:2:17) (ogs-socket.c:82)
04/07 16:46:24.368: [sock] DEBUG: udp socket(2) (ogs-udp.c:32)
04/07 16:46:24.368: [sock] DEBUG: socket connect 127.0.0.2:2123
(ogs-socket.c:132)
04/07 16:46:24.368: [sock] DEBUG: udp_client() [127.0.0.2]:2123 (ogs-udp.c:89)
04/07 16:46:24.368: [gtp] INFO: gtp_client() [127.0.0.2]:2123 (gtp_path.c:49)
04/07 16:46:24.368: [mme] DEBUG: Old INITMSG (numout:10 maxin:2048 maxattempt:8 maxinit_to:60000) (s1ap_usrsctp.c:283)
04/07 16:46:24.368: [mme] DEBUG: New INITMSG (numout:30 maxin:65535 maxattempt:4 maxinit_to:8000) (s1ap_usrsctp.c:311)
04/07 16:46:24.368: [mme] INFO: s1ap_server() [192.168.0.3]:36412 (s1ap_usrsctp.c:69)
04/07 16:46:24.609: [pgw] DEBUG: [PGW] PROTO:17 SRC:2d2d0001 2d2d0001 d683d683 010f2296 (pgw_ipfw.c:277)
04/07 16:46:24.610: [pgw] DEBUG: [PGW] HLEN:20 DST:2d2d0001 d683d683 010f2296 0053756b (pgw_ipfw.c:280)
04/07 16:46:25.611: [pgw] DEBUG: [PGW] PROTO:17 SRC:2d2d0001 2d2d0001 d683d683 010f3a6d (pgw_ipfw.c:277)
04/07 16:46:25.612: [pgw] DEBUG: [PGW] HLEN:20 DST:2d2d0001 d683d683 010f3a6d 0053756b (pgw_ipfw.c:280)
04/07 16:46:26.607: [pgw] DEBUG: [PGW] PROTO:17 SRC:2d2d0001 2d2d0001 d683d683 010fa451 (pgw_ipfw.c:277)
04/07 16:46:26.608: [pgw] DEBUG: [PGW] HLEN:20 DST:2d2d0001 d683d683 010fa451 0053756b (pgw_ipfw.c:280)
...
...
...
^C04/07 16:46:27.013: [core] INFO: SIGINT received (main.c:60)
04/07 16:46:27.013: [core] INFO: NextEPC daemon terminating... (main.c:185)
04/07 16:46:27.013: [core] INFO: DB-Client try to terminate (application.c:116)
04/07 16:46:27.019: [core] INFO: DB-Client terminate...done (application.c:118)
04/07 16:46:27.019: [core] INFO: MME try to terminate (epc.c:229)
04/07 16:46:27.019: [event] DEBUG: interrupt all (ogs-queue.c:260)
04/07 16:46:27.019: [thread] DEBUG: [0x10d4dfe08] thread running(1) (ogs-thread.c:111)
04/07 16:46:27.019: [mme] DEBUG: mme_state_operational(): EXIT
(mme_sm.c:43)
04/07 16:46:27.020: [mme] DEBUG: mme_state_final(): INIT
(mme_sm.c:32)
04/07 16:46:27.020: [thread] DEBUG: [0x10d4dfe08] worker done (ogs-thread.c:72)
04/07 16:46:27.021: [thread] DEBUG: [0x10d4dfe08] thread destroy (ogs-thread.c:123)
04/07 16:46:27.021: [thread] DEBUG: [0x10d4dfe08] thread join (ogs-thread.c:132)
04/07 16:46:27.021: [thread] DEBUG: [0x10d4dfe08] thread done (ogs-thread.c:138)
04/07 16:46:27.022: [fd] INFO: freeDiameter[6]: Initiating freeDiameter shutdown sequence (3) (fd_init.c:131)
04/07 16:46:27.148: [core] INFO: MME terminate...done (epc.c:231)
04/07 16:46:27.148: [core] INFO: HSS try to terminate (epc.c:194)
04/07 16:46:27.149: [fd] INFO: freeDiameter[6]: Initiating freeDiameter shutdown sequence (3) (fd_init.c:131)
04/07 16:46:27.257: [core] INFO: HSS terminate...done (epc.c:196)
04/07 16:46:27.257: [core] INFO: SGW try to terminate (epc.c:143)
04/07 16:46:27.258: [event] DEBUG: interrupt all (ogs-queue.c:260)
04/07 16:46:27.258: [thread] DEBUG: [0x10d4df408] thread running(1) (ogs-thread.c:111)
04/07 16:46:27.258: [sgw] DEBUG: sgw_state_operational(): EXIT
(sgw_sm.c:30)
04/07 16:46:27.259: [sgw] DEBUG: sgw_state_final(): INIT
(sgw_sm.c:21)
04/07 16:46:27.260: [thread] DEBUG: [0x10d4df408] worker done (ogs-thread.c:72)
04/07 16:46:27.260: [thread] DEBUG: [0x10d4df408] thread destroy (ogs-thread.c:123)
04/07 16:46:27.261: [thread] DEBUG: [0x10d4df408] thread join (ogs-thread.c:132)
04/07 16:46:27.261: [thread] DEBUG: [0x10d4df408] thread done (ogs-thread.c:138)
04/07 16:46:27.263: [core] INFO: SGW terminate...done (epc.c:145)
04/07 16:46:27.263: [core] INFO: PGW try to terminate (epc.c:94)
04/07 16:46:27.264: [event] DEBUG: interrupt all (ogs-queue.c:260)
04/07 16:46:27.265: [thread] DEBUG: [0x10d4df908] thread running(1) (ogs-thread.c:111)
04/07 16:46:27.265: [pgw] DEBUG: pgw_state_operational(): EXIT (pgw_sm.c:33)
04/07 16:46:27.266: [pgw] DEBUG: pgw_state_final(): INIT (pgw_sm.c:24)
04/07 16:46:27.267: [thread] DEBUG: [0x10d4df908] worker done (ogs-thread.c:72)
04/07 16:46:27.268: [thread] DEBUG: [0x10d4df908] thread destroy (ogs-thread.c:123)
04/07 16:46:27.269: [thread] DEBUG: [0x10d4df908] thread join (ogs-thread.c:132)
04/07 16:46:27.270: [thread] DEBUG: [0x10d4df908] thread done (ogs-thread.c:138)
04/07 16:46:27.271: [fd] INFO: freeDiameter[6]: Initiating freeDiameter shutdown sequence (3) (fd_init.c:131)
04/07 16:46:27.401: [core] INFO: PGW terminate...done (epc.c:96)
04/07 16:46:27.402: [core] INFO: PCRF try to terminate (epc.c:47)
04/07 16:46:27.403: [fd] INFO: freeDiameter[6]: Initiating freeDiameter shutdown sequence (3) (fd_init.c:131)
04/07 16:46:27.514: [core] INFO: PCRF terminate...done (epc.c:49)
```

View File

@ -0,0 +1,108 @@
---
title: Build on Ubuntu/Debian
---
### TUN device permissions
---
To run nextepc with least privilege, the TUN device privilege should be a `crw-rw-rw-`(666). Otherwise, you need to run nextepc daemon as root. If the permission is not `crw-rw-rw-`(666), you may need to install [udev](https://mirrors.edge.kernel.org/pub/linux/utils/kernel/hotplug/udev/udev.html) package.
```bash
$ ls -al /dev/net/tun
crw-rw---- 1 root 28 10, 200 Feb 11 05:13 /dev/net/tun
$ sudo apt install udev
$ sudo systemctl start systemd-udevd (if '/lib/systemd/systemd-udevd' is not running)
$ ls -al /dev/net/tun
crw-rw-rw- 1 root 28 10, 200 Feb 11 05:13 /dev/net/tun
```
Nevertheless, if the permission do not change, you can run nextepc with root privileges or change the permission using [chmod](https://www.gnu.org/software/coreutils/manual/html_node/chmod-invocation.html) as follows:
```bash
$ sudo chmod 666 /dev/net/tun
```
### Making TUN Permanent
---
Write a configuration file for the TUN deivce.
```bash
$ sudo sh -c "cat << EOF > /etc/systemd/network/99-nextepc.netdev
[NetDev]
Name=pgwtun
Kind=tun
EOF"
```
Create a TUN device. The interface name will be `pgwtun`.
```bash
$ sudo systemctl enable systemd-networkd
$ sudo systemctl restart systemd-networkd
$ sudo apt install net-tools
$ ifconfig pgwtun
pgwtun: flags=4241<UP,POINTOPOINT,NOARP,MULTICAST> mtu 1500
inet6 fe80::e86e:86d8:ea24:f8ee prefixlen 64 scopeid 0x20<link>
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2 bytes 255 (255.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
```
Then, to support IPv6-enabled UEs, you must configure your TUN device to support IPv6.
```bash
$ sysctl -n net.ipv6.conf.pgwtun.disable_ipv6
1
$ sudo sh -c "echo 'net.ipv6.conf.pgwtun.disable_ipv6=0' > /etc/sysctl.d/30-nextepc.conf"
$ sudo sysctl -p /etc/sysctl.d/30-nextepc.conf
$ sysctl -n net.ipv6.conf.pgwtun.disable_ipv6
0
```
**Note:** If your TUN device already supports IPv6, you can skip this steps above.
{: .notice--warning}
You are now ready to set the IP address on TUN device.
```bash
$ sudo sh -c "cat << EOF > /etc/systemd/network/99-nextepc.network
[Match]
Name=pgwtun
[Network]
Address=45.45.0.1/16
Address=cafe::1/64
EOF"
```
Restart the TUN device
```bash
$ sudo systemctl restart systemd-networkd
```
Make sure it is set up properly.
```bash
$ ifconfig pgwtun
pgwtun: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 45.45.0.1 netmask 255.255.0.0 destination 45.45.0.1
inet6 cafe::1 prefixlen 64 scopeid 0x0<global>
inet6 fe80::e86e:86d8:ea24:f8ee prefixlen 64 scopeid 0x20<link>
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 20 bytes 2019 (2.0 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
```
**Note:** On *Linux*, you should run `nextepc-pgwd` first to correctly verify the IP address of TUN device. Otherwise, the TUN device's IP address is not displayed by the [ifconfig](http://net-tools.sourceforge.net/man/ifconfig.8.html) command.
{: .notice--warning}

View File

@ -0,0 +1,145 @@
---
title: CentOS
head_inline: "<style> .blue { color: blue; } </style>"
---
This guide is based on **CentOS 7** Distribution.
{: .blue}
### Getting MongoDB
---
Create the MongoDB repository file.
```bash
$ sudo sh -c 'cat << EOF > /etc/yum.repos.d/mongodb-org-3.4.repo
[mongodb-org-3.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/\$releasever/mongodb-org/3.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc
EOF'
```
Install MongoDB with Package Manager.
```bash
sudo yum -y install mongodb-org
sudo systemctl start mongod (if '/usr/bin/mongod' is not running)
```
### Setting up TUN device (No persistent after rebooting)
---
Create the TUN device. Interface name will be `pgwtun`.
```bash
$ sudo yum -y install iproute
$ sudo ip tuntap add name pgwtun mode tun
$ ip link show
```
Then, to support IPv6-enabled UEs, you must configure your TUN device to support IPv6.
```bash
$ sysctl -n net.ipv6.conf.pgwtun.disable_ipv6
1
$ sudo -w net.ipv6.conf.pgwtun.disable_ipv6=0
$ sysctl -n net.ipv6.conf.pgwtun.disable_ipv6
0
```
**Note:** If your TUN device already supports IPv6, you can skip this steps above.
{: .notice--warning}
You are now ready to set the IP address on TUN device.
```bash
$ sudo ip addr add 45.45.0.1/16 dev pgwtun
$ sudo ip addr add cafe::1/64 dev pgwtun
```
Make sure it is set up properly.
```bash
$ sudo ip link set pgwtun up
$ ip link show
```
**Tip:** The script provided in [$GIT_REPO/support/network/restart.sh](https://github.com/{{ site.github_username }}/nextepc/blob/master/support/network/restart.sh) makes it easy to configure the TUN device as follows:
`$ sudo ./support/network/restart.sh`
{: .notice--info}
### Building NextEPC
---
Install the depedencies for building the source code.
```bash
$ sudo yum -y install git flex bison autoconf libtool lksctp-tools-devel libidn-devel gnutls-devel libgcrypt-devel openssl-devel cyrus-sasl-devel libyaml-devel
```
Configure EPEL package and install mongo-c-driver.
```bash
$ sudo yum -y install epel-release
$ sudo yum -y install mongo-c-driver-devel
```
Git clone with `--recursive` option.
```bash
➜ open5gs git clone --recursive https://github.com/{{ site.github_username }}/nextepc
```
To compile with autotools:
```bash
➜ open5gs cd nextepc
➜ nextepc git:(master) ✗ autoreconf -iv
➜ nextepc git:(master) ✗ ./configure --prefix=`pwd`/install
➜ nextepc git:(master) ✗ make -j `nproc`
```
Check whether the compilation is correct.
```bash
➜ nextepc git:(master) ✗ make check
```
You need to perform the **installation process**.
```bash
➜ nextepc git:(master) ✗ make install
```
Check whether the installation is correct.
```bash
➜ nextepc git:(master) ✗ ./test/testcomplex
s1setup_test : SUCCESS
attach_test : SUCCESS
volte_test : SUCCESS
handover_test : SUCCESS
All tests passed.
```
**Tip:** You can also check the result of `./test/testcomplex` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || diameter || gtp`. You can see the virtually created packets. [[testcomplex.pcapng]]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testcomplex.pcapng)
{: .notice--info}
### Building WebUI of NextEPC
---
[Node.js](https://nodejs.org/) is required to build WebUI of NextEPC
```bash
$ curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
$ sudo yum -y install nodejs
```
Install the dependencies to run WebUI
```bash
➜ nextepc git:(master) ✗ cd webui
➜ webui git:(master) ✗ npm install
```
The WebUI runs as an [npm](https://www.npmjs.com/) script.
```bash
➜ webui git:(master) ✗ npm run dev
```

View File

@ -0,0 +1,131 @@
---
title: Fedora
head_inline: "<style> .blue { color: blue; } </style>"
---
This guide is based on **Fedora 27** Distribution.
{: .blue}
### Getting MongoDB
---
Install MongoDB with package manager.
```bash
$ sudo dnf -y install mongodb-server
```
Run MongoDB server.
```bash
$ mkdir -p ./data/db
$ mongod --dbpath ./data/db
```
### Setting up TUN device (No persistent after rebooting)
---
Create the TUN device. Interface name will be `pgwtun`.
```bash
$ sudo dnf -y install iproute
$ sudo ip tuntap add name pgwtun mode tun
$ ip link show
```
Then, to support IPv6-enabled UEs, you must configure your TUN device to support IPv6.
```bash
$ sysctl -n net.ipv6.conf.pgwtun.disable_ipv6
1
$ sudo -w net.ipv6.conf.pgwtun.disable_ipv6=0
$ sysctl -n net.ipv6.conf.pgwtun.disable_ipv6
0
```
**Note:** If your TUN device already supports IPv6, you can skip this steps above.
{: .notice--warning}
You are now ready to set the IP address on TUN device.
```bash
$ sudo ip addr add 45.45.0.1/16 dev pgwtun
$ sudo ip addr add cafe::1/64 dev pgwtun
```
Make sure it is set up properly.
```bash
$ sudo ip link set pgwtun up
$ ip link show
```
**Tip:** The script provided in [$GIT_REPO/support/network/restart.sh](https://github.com/{{ site.github_username }}/nextepc/blob/master/support/network/restart.sh) makes it easy to configure the TUN device as follows:
`$ sudo ./support/network/restart.sh`
{: .notice--info}
### Building NextEPC
---
Install the depedencies for building the source code.
```bash
$ sudo dnf -y install git gcc flex bison autoconf libtool mongo-c-driver-devel lksctp-tools-devel libidn-devel gnutls-devel libgcrypt-devel openssl-devel cyrus-sasl-devel snappy-devel libyaml-devel
```
Git clone with `--recursive` option.
```bash
➜ open5gs git clone --recursive https://github.com/{{ site.github_username }}/nextepc
```
To compile with autotools:
```bash
➜ open5gs cd nextepc
➜ nextepc git:(master) ✗ autoreconf -iv
➜ nextepc git:(master) ✗ ./configure --prefix=`pwd`/install
➜ nextepc git:(master) ✗ make -j `nproc`
```
Check whether the compilation is correct.
```bash
➜ nextepc git:(master) ✗ make check
```
You need to perform **the installation process**.
```bash
➜ nextepc git:(master) ✗ make install
```
Check whether the installation is correct.
```bash
➜ nextepc git:(master) ✗ ./test/testcomplex
s1setup_test : SUCCESS
attach_test : SUCCESS
volte_test : SUCCESS
handover_test : SUCCESS
All tests passed.
```
**Tip:** You can also check the result of `./test/testcomplex` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || diameter || gtp`. You can see the virtually created packets. [[testcomplex.pcapng]]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testcomplex.pcapng)
{: .notice--info}
### Building WebUI of NextEPC
---
[Node.js](https://nodejs.org/) is required to build WebUI of NextEPC
```bash
$ sudo dnf -y install nodejs
```
Install the dependencies to run WebUI
```bash
➜ nextepc git:(master) ✗ cd webui
➜ webui git:(master) ✗ npm install
```
The WebUI runs as an [npm](https://www.npmjs.com/) script.
```bash
➜ webui git:(master) ✗ npm run dev
```

View File

@ -0,0 +1,134 @@
---
title: FreeBSD
head_inline: "<style> .blue { color: blue; } </style>"
---
This guide is based on **FreeBSD Relase 11.1**.
{: .blue}
### Getting MongoDB
---
Install MongoDB with package manager.
```bash
$ sudo pkg install mongodb
```
Run MongoDB server.
```bash
$ mkdir -p ./data/db
$ mongod --dbpath ./data/db
```
### Setting up TUN device (No persistent after rebooting)
---
Configure the TUN device.
```bash
$ sudo ifconfig lo0 alias 127.0.0.2 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.3 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.4 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.5 netmask 255.255.255.255
```
Enable IP forwarding
```bash
$ sudo sysctl -w net.inet.ip.forwarding=1
```
**Tip:** The script provided in [$GIT_REPO/support/network/restart.sh](https://github.com/{{ site.github_username }}/nextepc/blob/master/support/network/restart.sh) makes it easy to configure the TUN device as follows:
`$ sudo ./support/network/restart.sh`
{: .notice--info}
### Building NextEPC
---
Install the depedencies for building the source code.
```bash
$ sudo pkg install git gcc bison gsed pkgconf autoconf automake libtool mongo-c-driver gnutls libgcrypt libidn libyaml
```
Git clone with `--recursive` option.
```bash
➜ open5gs git clone --recursive https://github.com/{{ site.github_username }}/nextepc
```
To compile with autotools:
```bash
➜ open5gs cd nextepc
➜ nextepc git:(master) ✗ autoreconf -iv
➜ nextepc git:(master) ✗ ./configure --prefix=`pwd`/install
➜ nextepc git:(master) ✗ make -j `nproc`
```
Check whether the compilation is correct.
**Note:** This should require *sudo* due to access `/dev/tun0`.
{: .notice--danger}
```bash
➜ nextepc git:(master) ✗ sudo make check
```
You need to perform **the installation process**.
```bash
➜ nextepc git:(master) ✗ make install
```
Check whether the installation is correct.
**Note:** This should require *sudo* due to access `/dev/tun0`.
{: .notice--danger}
```bash
acetcom@nextepc:~/nextepc$ sudo ./test/testcomplex
s1setup_test : SUCCESS
attach_test : SUCCESS
volte_test : SUCCESS
handover_test : SUCCESS
All tests passed.
```
**Tip:** You can also check the result of `./test/testcomplex` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || diameter || gtp`. You can see the virtually created packets. [[testcomplex.pcapng]]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testcomplex.pcapng)
{: .notice--info}
For developers, it provides `nextepc-epcd` daemon that includes both *MME*, *SGW*, *PGW*, *HSS*, and *PCRF*.
**Note:** This should require *sudo* due to access `/dev/tun0`.
{: .notice--danger}
```bash
acetcom@nextepc:~/nextepc$ sudo ./nextepc-epcd
04/06 23:13:03.367: [core] INFO: NextEPC daemon start (main.c:169)
PID[6404]: '/home/acetcom/Documents/git/open5gs/nextepc/install/var/run/nextepc-epcd/pid'
File Logging: '/home/acetcom/Documents/git/open5gs/nextepc/install/var/log/nextepc/nextepc.log'
MongoDB URI: 'mongodb://localhost/nextepc'
Configuration: '/home/acetcom/Documents/git/open5gs/nextepc/install/etc/nextepc/nextepc.conf'
04/06 23:13:03.369: [core] INFO: PCRF try to initialize (epc.c:37)
...
```
### Building WebUI of NextEPC
---
[Node.js](https://nodejs.org/) is required to build WebUI of NextEPC
```bash
$ sudo pkg install node
```
Install the dependencies to run WebUI
```bash
➜ nextepc git:(master) ✗ cd webui
➜ webui git:(master) ✗ npm install
```
The WebUI runs as an [npm](https://www.npmjs.com/) script.
```bash
➜ webui git:(master) ✗ npm run dev
```

View File

@ -0,0 +1,141 @@
---
title: Mac OS X
head_inline: "<style> .blue { color: blue; } </style>"
---
This guide is based on **macOS High Sierra 10.13.3**.
{: .blue}
### Installing Homebrew
---
```bash
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```
### Getting MongoDB
---
Install MongoDB with Package Manager.
```bash
$ brew install mongodb
```
Run MongoDB server.
```bash
$ mkdir -p ./data/db
$ mongod --dbpath ./data/db
```
### Setting up TUN device (No persistent after rebooting)
---
Install TUN/TAP driver
- You can download it from [http://tuntaposx.sourceforge.net/](http://tuntaposx.sourceforge.net/)
Configure the TUN device.
```bash
$ sudo ifconfig lo0 alias 127.0.0.2 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.3 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.4 netmask 255.255.255.255
$ sudo ifconfig lo0 alias 127.0.0.5 netmask 255.255.255.255
```
Enable IP forwarding & Masquerading
```bash
$ sudo sysctl -w net.inet.ip.forwarding=1
$ sudo sh -c "echo 'nat on {en0} from 45.45.0.0/16 to any -> {en0}' > /etc/pf.anchors/org.nextepc"
$ sudo pfctl -e -f /etc/pf.anchors/org.nextepc
```
**Tip:** The script provided in [$GIT_REPO/support/network/restart.sh](https://github.com/{{ site.github_username }}/nextepc/blob/master/support/network/restart.sh) makes it easy to configure the TUN device as follows:
`$ sudo ./support/network/restart.sh`
{: .notice--info}
### Building NextEPC
---
Install the depedencies for building the source code.
```bash
$ brew install autoconf automake libtool gnu-sed mongo-c-driver libusrsctp gnutls libgcrypt libidn libyaml pkg-config
```
Git clone with `--recursive` option.
```bash
➜ open5gs git clone --recursive https://github.com/{{ site.github_username }}/nextepc
```
To compile with autotools:
```bash
➜ open5gs cd nextepc
➜ nextepc git:(master) ✗ autoreconf -iv
➜ nextepc git:(master) ✗ ./configure --prefix=`pwd`/install
➜ nextepc git:(master) ✗ make -j `nproc`
```
**Note:** On MAC OS X, the compilation check is not supported at this point.
{: .notice--danger}
You need to perform **the installation process**.
```bash
➜ nextepc git:(master) ✗ make install
```
Check whether the installation is correct.
**Note:** This should require *sudo* due to access `/dev/tun0`.
{: .notice--danger}
```bash
acetcom@nextepc:~/nextepc$ sudo ./test/testcomplex
s1setup_test : SUCCESS
attach_test : SUCCESS
volte_test : SUCCESS
handover_test : SUCCESS
All tests passed.
```
**Tip:** You can also check the result of `./test/testcomplex` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || diameter || gtp`. You can see the virtually created packets. [[testcomplex.pcapng]]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testcomplex.pcapng)
{: .notice--info}
For developers, it provides `nextepc-epcd` daemon that includes both *MME*, *SGW*, *PGW*, *HSS*, and *PCRF*.
**Note:** This should require *sudo* due to access `/dev/tun0`.
{: .notice--danger}
```bash
acetcom@nextepc:~/nextepc$ sudo ./nextepc-epcd
04/06 23:13:03.367: [core] INFO: NextEPC daemon start (main.c:169)
PID[6404]: '/home/acetcom/Documents/git/open5gs/nextepc/install/var/run/nextepc-epcd/pid'
File Logging: '/home/acetcom/Documents/git/open5gs/nextepc/install/var/log/nextepc/nextepc.log'
MongoDB URI: 'mongodb://localhost/nextepc'
Configuration: '/home/acetcom/Documents/git/open5gs/nextepc/install/etc/nextepc/nextepc.conf'
04/06 23:13:03.369: [core] INFO: PCRF try to initialize (epc.c:37)
...
```
### Building WebUI of NextEPC
---
[Node.js](https://nodejs.org/) is required to build WebUI of NextEPC
```bash
$ brew install node
```
Install the dependencies to run WebUI
```bash
➜ nextepc git:(master) ✗ cd webui
➜ webui git:(master) ✗ npm install
```
The WebUI runs as an [npm](https://www.npmjs.com/) script.
```bash
➜ webui git:(master) ✗ npm run dev
```

View File

@ -0,0 +1,157 @@
---
title: Ubuntu (Trusty)
head_inline: "<style> .blue { color: blue; } </style>"
---
This guide is based on **Ubuntu 14.04(Trusty)** Distribution.
{: .blue}
## Getting MongoDB
Install MongoDB with package manager.
```bash
$ sudo apt update
$ sudo apt install mongodb
$ sudo systemctl start mongodb (if '/usr/bin/mongod' is not running)
```
### TUN device permissions
---
To run nextepc with least privilege, the TUN device privilege should be a `crw-rw-rw-`(666). Otherwise, you need to run nextepc daemon as root. If the permission is not `crw-rw-rw-`(666), you may need to install [udev](https://mirrors.edge.kernel.org/pub/linux/utils/kernel/hotplug/udev/udev.html) package.
```bash
$ ls -al /dev/net/tun
crw-rw---- 1 root 28 10, 200 Feb 11 05:13 /dev/net/tun
$ sudo apt install udev
$ sudo systemctl start systemd-udevd (if '/lib/systemd/systemd-udevd' is not running)
$ ls -al /dev/net/tun
crw-rw-rw- 1 root 28 10, 200 Feb 11 05:13 /dev/net/tun
```
Nevertheless, if the permission do not change, you can run nextepc with root privileges or change the permission using [chmod](https://www.gnu.org/software/coreutils/manual/html_node/chmod-invocation.html) as follows:
```bash
$ sudo chmod 666 /dev/net/tun
```
### Making TUN Permanent
---
Write the configuration file for the TUN deivce.
```bash
$ sudo sh -c "cat << EOF > /etc/network/interfaces.d/nextepc
auto pgwtun
iface pgwtun inet static
address 45.45.0.1
netmask 255.255.0.0
pre-up ip tuntap add name pgwtun mode tun
post-down ip tuntap del name pgwtun mode tun
iface pgwtun inet6 static
address cafe::1
netmask 64
EOF"
```
For loading TUN configuration,
```bash
$ sudo sh -c 'if ! grep "source-directory" /etc/network/interfaces | grep "/etc/network/interfaces.d" > /dev/null; then
echo "source-directory /etc/network/interfaces.d" >> /etc/network/interfaces
fi'
```
Create the TUN device. Interface name will be `pgwtun`.
```bash
$ ifup pgwtun
```
Then, to support IPv6-enabled UEs, you must configure your TUN device to support IPv6.
```bash
$ sysctl -n net.ipv6.conf.pgwtun.disable_ipv6
1
$ sudo sh -c "echo 'net.ipv6.conf.pgwtun.disable_ipv6=0' > /etc/sysctl.d/30-nextepc.conf"
$ sudo sysctl -p /etc/sysctl.d/30-nextepc.conf
$ sysctl -n net.ipv6.conf.pgwtun.disable_ipv6
0
```
**Note:** If your TUN device already supports IPv6, you can skip this steps above.
{: .notice--warning}
### Building NextEPC
---
Install the depedencies for building the source code.
```bash
sudo apt install git gcc flex bison make autoconf libtool pkg-config libsctp-dev libssl-dev libgnutls-dev libidn11-dev libyaml-dev
```
Then, compile and install Mongo C Driver like the followings.
```bash
sudo apt-get -y install g++ libsasl2-dev
tar xzf mongo-c-driver-1.8.0.tar.gz
cd mongo-c-driver-1.8.0
./configure --disable-automatic-init-and-cleanup
make
sudo make install
sudo ldconfig
```
Git clone with `--recursive` option.
```bash
➜ open5gs git clone --recursive https://github.com/{{ site.github_username }}/nextepc
```
To compile with autotools:
```bash
➜ open5gs cd nextepc
➜ nextepc git:(master) ✗ autoreconf -iv
➜ nextepc git:(master) ✗ ./configure --prefix=`pwd`/install
➜ nextepc git:(master) ✗ make -j `nproc`
```
Check whether the compilation is correct.
```bash
➜ nextepc git:(master) ✗ make check
```
You need to perform **the installation process**.
```bash
➜ nextepc git:(master) ✗ make install
```
Check whether the installation is correct.
```bash
➜ nextepc git:(master) ✗ ./test/testcomplex
s1setup_test : SUCCESS
attach_test : SUCCESS
volte_test : SUCCESS
handover_test : SUCCESS
All tests passed.
```
**Tip:** You can also check the result of `./test/testcomplex` with a tool that captures packets. If you are running `wireshark`, select the `loopback` interface and set FILTER to `s1ap || gtpv2 || diameter || gtp`. You can see the virtually created packets. [[testcomplex.pcapng]]({{ site.url }}{{ site.baseurl }}/assets/pcapng/testcomplex.pcapng)
{: .notice--info}
For developers, it provides `nextepc-epcd` daemon that includes both *MME*, *SGW*, *PGW*, *HSS*, and *PCRF*.
```bash
➜ nextepc git:(master) ✗ ./nextepc-epcd
04/06 23:13:03.367: [core] INFO: NextEPC daemon start (main.c:169)
PID[6404]: '/home/acetcom/Documents/git/open5gs/nextepc/install/var/run/nextepc-epcd/pid'
File Logging: '/home/acetcom/Documents/git/open5gs/nextepc/install/var/log/nextepc/nextepc.log'
MongoDB URI: 'mongodb://localhost/nextepc'
Configuration: '/home/acetcom/Documents/git/open5gs/nextepc/install/etc/nextepc/nextepc.conf'
04/06 23:13:03.369: [core] INFO: PCRF try to initialize (epc.c:37)
...
```

View File

@ -0,0 +1,320 @@
---
title: Your First LTE
head_inline: "<style> .blue { color: blue; } .bold { font-weight: bold; } </style>"
---
This post is the perfect starting point for learning to build your own LTE network. View this lession as a guided introduction -- including the installation, configuration, and best practices that will ease your learning.
### Prerequisites
---
First, you have to prepare USRP B200/B210 to run srsENB. However, please keep in mind that you would still need a fairly high-end PC (at least dual-core i5, better quad-core i7) with USB 3.0 to attach the USRP B200/B210.
Also, for USRP B200/B210 you will need a GPS antenna for clock synchronization. It is good to have a window near your desk where you can put the small GPS patch antenna. In my case, a 1 to 2 meters antenna cable is used between desk/computer and the window.
For stable operation of USRP B200/B210, I used 10Mhz GPS-DO(GPS disciplined oscillator). Of course, a USIM card(sysmoUSIM-SJS1) was also inserted into the phone.
### Overall Physical Setup
---
Setup your devices in the following order:
1. GPS antenna near window
2. GPS antenna connected to "GPS ANT" connector of GPS-DO (SMA)
3. 10MHz output (BNC) of GPS-DO connected to 10MHz input of USRP (SMA)
4. GPS input of USRP open/unused!
5. 1PPS input of USRP open/unused!
6. 4x Small Antennas connected to USRP Rx/Tx ports (RF-A/RF-B)
7. USRP powered via power supply or over USB
8. USRP USB port connected to your PC
9. GPS-DO powered via power supply
**Note:** When the GPS-DO acquires a lock on the GPS signal, a **GREEN** LED is displayed. GPS takes time to function normally. You also need to wait for the **RED** LED(ALARM) to turn off.
{: .notice--warning}
### Installation
---
We will use *Ubuntu 18.04(Bionic)* installed PC.
{: .blue .bold}
#### 1. USRP Hardware Driver
Most Linux distributions provide UHD as part of their package management. On *Debian and Ubuntu* systems, this will install the base UHD library, all headers and build-specific files, as well as utilities:
```bash
$ sudo add-apt-repository ppa:ettusresearch/uhd
$ sudo apt update
$ sudo apt install libuhd-dev libuhd003 uhd-host
```
After installing, you need to download the FPGA images packages by running _uhd images downloader_ on the command line (the actual path may differ based on your installation):
```bash
$ sudo /usr/lib/uhd/utils/uhd_images_downloader.py
```
#### 2. srsENB
On *Ubuntu 18.04(Bionic)*, one can install the required libraries with:
```bash
$ sudo apt install cmake libfftw3-dev libmbedtls-dev libboost-program-options-dev libconfig++-dev libsctp-dev
```
Download and build srsLTE:
```bash
➜ git git clone https://github.com/srsLTE/srsLTE.git
➜ git cd srsLTE
➜ srsLTE git:(master) ✗ mkdir build
➜ srsLTE git:(master) ✗ cd build
➜ build git:(master) ✗ cmake ../
➜ build git:(master) ✗ make
➜ build git:(master) ✗ make test
```
#### 3. NextEPC
The NextEPC package is available on the recent versions of *Ubuntu*.
```bash
# Getting the authentication key
$ sudo apt install wget
$ wget https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_18.04/Release.key
$ sudo apt-key add Release.key
# Installing NextEPC
$ sudo sh -c "echo 'deb https://download.opensuse.org/repositories/home:/acetcom:/open5gs:/latest/xUbuntu_18.04/ ./' > /etc/apt/sources.list.d/open5gs.list"
$ sudo apt update
$ sudo apt install nextepc
```
The following shows how to install the Web UI of NextEPC.
```bash
$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
$ sudo apt install nodejs
$ curl -sL http://nextepc.org/static/webui/install | sudo -E bash -
```
### Configuration & Running
---
#### 1. NextEPC
When you purchase the sysmoUSIM, you will receive the following information via e-mail.
```
Title : sysmocom SIM Card Details / AM93\PICK\00859
IMSI ICCID ACC PIN1 PUK1 PIN2 PUK2 Ki OPC ADM1 KIC1 KID1 KIK1
...
901700000017408 8988211000000174089 0100 3623 84724035 8774 57473966 B1233463AB9BC2AD2DB1830EB6417E7B 625150E2A943E3353DD23554101CAFD4 47190711 C865CAA0A54542333929B29B116F4375 7D7F65DCD99003C0A0D5D31CA3E5253E 5B27983AF628FC3FCB36B89300012944
```
Here's my subscriber information from above.
```
IMSI : 901700000017408
K : B1233463AB9BC2AD2DB1830EB6417E7B
OPc : 625150E2A943E3353DD23554101CAFD4
```
Connect to `http://localhost:3000` and login with **admin** account.
> Username : admin
> Password : 1423
Then proceed as follows:
1. Go to `Subscriber` Menu.
2. Click `+` Button to add a new subscriber.
3. Fill the IMSI, security context(K, OPc, AMF), and APN of the subscriber.
4. Click `SAVE` Button
Modify [/etc/nextepc/mme.conf](https://github.com/{{ site.github_username }}/nextepc/blob/master/support/config/mme.conf.in) to set the S1AP/GTP-C IP address, PLMN ID, and TAC
```diff
diff -u mme.conf.old mme.conf
--- mme.conf.old 2018-04-15 18:28:31.000000000 +0900
+++ mme.conf 2018-04-15 19:53:10.000000000 +0900
@@ -14,18 +14,20 @@
mme:
freeDiameter: mme.conf
s1ap:
+ addr: 127.0.1.100
gtpc:
+ addr: 127.0.1.100
gummei:
plmn_id:
- mcc: 001
- mnc: 01
+ mcc: 901
+ mnc: 70
mme_gid: 2
mme_code: 1
tai:
plmn_id:
- mcc: 001
- mnc: 01
- tac: 12345
+ mcc: 901
+ mnc: 70
+ tac: 7
security:
integrity_order : [ EIA1, EIA2, EIA0 ]
ciphering_order : [ EEA0, EEA1, EEA2 ]
```
S1AP/GTP-C IP address, PLMN ID, TAC are changed as follows.
```
S1AP address : 127.0.1.100 - srsENB default value
GTP-C address : 127.0.1.100 - Use loopback interface
PLMN ID : MNC(901), MCC(70) - sysmoUSIM default value
TAC : 7 - srsENB default value
```
The GTP-U IP address will be set to 127.0.0.2. To do this, modify [/etc/nextepc/sgw.conf](https://github.com/{{ site.github_username }}/nextepc/blob/master/support/config/sgw.conf.in) to set the GTP-U IP address.
```diff
diff -u /etc/nextepc/sgw.conf.old /etc/nextepc/sgw.conf
--- sgw.conf.old 2018-04-15 18:30:25.000000000 +0900
+++ sgw.conf 2018-04-15 18:30:30.000000000 +0900
@@ -14,3 +14,4 @@
gtpc:
addr: 127.0.0.2
gtpu:
+ addr: 127.0.0.2
```
After changing conf files, please restart NextEPC daemons.
```bash
$ sudo systemctl restart nextepc-mmed
$ sudo systemctl restart nextepc-sgwd
```
If your phone can connect to internet, you must run the following command in NextEPC-PGW installed host.
```bash
$ sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
$ sudo iptables -t nat -A POSTROUTING -o 'interface-name' -j MASQUERADE
$ sudo iptables -I INPUT -i pgwtun -j ACCEPT
```
**Note:** In the above command, you should replace `'interface-name'` with your interface name that can connect to the internet. (For example, `enp0s25`, `wls3`, and so on).
{: .notice--danger}
#### 2. srsENB
Change back to the srsENB source directory and copy the main config example as well as all additional config files for RR, SIB and DRB.
```bash
➜ srsLTE git:(master) ✗ cp srsenb/enb.conf.example srsenb/enb.conf
➜ srsLTE git:(master) ✗ cp srsenb/rr.conf.example srsenb/rr.conf
➜ srsLTE git:(master) ✗ cp srsenb/sib.conf.example srsenb/sib.conf
➜ srsLTE git:(master) ✗ cp srsenb/drb.conf.example srsenb/drb.conf
```
You should check your phone frequency. If your phone does not support Band-3, you should use a different DL EARFCN value.
```diff
--- enb.conf.example 2018-11-19 18:16:06.953631893 +0900
+++ enb.conf 2019-04-08 11:15:18.051261318 +0900
@@ -23,8 +23,8 @@
cell_id = 0x01
phy_cell_id = 1
tac = 0x0007
-mcc = 001
-mnc = 01
+mcc = 901
+mnc = 70
mme_addr = 127.0.1.100
gtp_bind_addr = 127.0.1.1
s1c_bind_addr = 127.0.1.1
@@ -66,12 +66,13 @@
# Default "auto". B210 USRP: 400 us, bladeRF: 0 us.
#####################################################################
[rf]
-dl_earfcn = 3400
+dl_earfcn = 1600
tx_gain = 80
rx_gain = 40
#device_name = auto
#device_args = auto
+device_args="clock=external"
#time_adv_nsamples = auto
#burst_preamble_us = auto
```
PLMN ID, DL EARFCN, and Device Argument are updated as belows.
```
PLMN ID : MNC(901), MCC(70) sysmoUSIM default value
DL EARFCN : Band-3 - from your Phone
Device Argument : Clock source from external GPS-DO
```
Now, run the srsENB as follows:
```bash
➜ srsLTE git:(master) ✗ cd srsenb/
➜ srsenb git:(master) ✗ sudo ../build/srsenb/src/srsenb ./enb.conf
linux; GNU C++ version 6.2.0 20161027; Boost_106200; UHD_003.009.005-0-unknow
--- Software Radio Systems LTE eNodeB ---
Reading configuration file ./enb.conf...
-- Loading firmware image: /usr/share/uhd/images/usrp_b200_fw.hex...
Opening USRP with args: "",master_clock_rate=30.72e6
-- Detected Device: B200
-- Loading FPGA image: /usr/share/uhd/images/usrp_b200_fpga.bin... done
-- Operating over USB 3.
-- Detecting internal GPSDO.... 'No GPSDO found'
-- Initialize CODEC control...
-- Initialize Radio control...
-- Performing register loopback test... pass
-- Performing CODEC loopback test... pass
-- Asking for clock rate 30.720000 MHz...
-- Actually got clock rate 30.720000 MHz.
-- Performing timer loopback test... pass
Setting frequency: DL=1845.0 Mhz, UL=1750.0 MHz
Setting Sampling frequency 11.52 MHz
==== eNodeB started ===
Type <t> to view trace
```
If you see the `No GPSDO found`, please exit the program with Ctrl-C.
The following console output is the correct result of srsENB.
```bash
linux; GNU C++ version 6.2.0 20161027; Boost_106200; UHD_003.009.005-0-unknow
--- Software Radio Systems LTE eNodeB ---
Reading configuration file ./enb.conf...
Opening USRP with args: "",master_clock_rate=30.72e6
-- Detected Device: B200
-- Operating over USB 3.
-- Initialize CODEC control...
-- Initialize Radio control...
-- Performing register loopback test... pass
-- Performing CODEC loopback test... pass
-- Asking for clock rate 30.720000 MHz...
-- Actually got clock rate 30.720000 MHz.
-- Performing timer loopback test... pass
Setting frequency: DL=1845.0 Mhz, UL=1750.0 MHz
Setting Sampling frequency 11.52 MHz
==== eNodeB started ===
Type <t> to view trace
```
### Turn on your eNodeB and Phone
---
- You can see actual traffic through wireshark -- [[srsenb.pcapng]]({{ site.url }}{{ site.baseurl }}/assets/pcapng/srsenb.pcapng).
- You can view the log at `/var/log/nextepc/*.log`.

View File

@ -0,0 +1,20 @@
{% if page.comments != false and jekyll.environment == "production" %}
<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url = '{{ page.url | absolute_url }}';
this.page.identifier = '{{ page.url | absolute_url }}';
};
(function() {
var d = document, s = d.createElement('script');
s.src = 'https://{{ site.disqus.shortname }}.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
{% endif %}

View File

@ -0,0 +1,42 @@
<footer id="site-footer">
<div class="container">
<div class="h5 pt-4">{{ site.title | escape }}</div>
<div class="row">
<div class="col col-lg-3">
<ul class="list-unstyled">
<li class="text-secondary">
{% if site.author %}
{{ site.author | escape }}
{% else %}
{{ site.title | escape }}
{% endif %}
</li>
{% if site.email %}
<li><a href="mailto:{{ site.email }}">{{ site.email }}</a></li>
<li><i><font size="2">(Please do not mail me directly for technical support. Instead, use <a href="https://github.com/{{ site.github_username }}/nextepc/issues">GitHub Issues</a>.)</font></i></li>
{% endif %}
</ul>
</div>
{% if site.footer_icons %}
<div class="col-6 col-lg-3">
<ul class="list-unstyled">
{% for footer_icon in site.footer_icons %}
<li>
<a href="{{ footer_icon.url }}">
{% if footer_icon.icon %}
{% capture icon %}{% include {{footer_icon.icon}} %}{% endcapture %}
<span class="align-middle text-secondary pr-2">{{ icon | strip }}</span>{% endif %}<span>{{ footer_icon.username }}</span>
</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
<div class="col-12 col-lg">
<p class="text-secondary text-justify">{{ site.description | escape }}</p>
</div>
</div>
</div>
</footer>

View File

@ -0,0 +1,10 @@
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
</script>

View File

23
docs/_includes/head.html Normal file
View File

@ -0,0 +1,23 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link rel="stylesheet" href="{{ "/assets/css/main.css" | relative_url }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ "/feed.xml" | relative_url }}">
<link rel="shortcut icon" href="{{ "/assets/favicon.ico" | relative_url }}">
{% if page.head_inline %}
{{ page.head_inline }}
{% endif %}
{% if jekyll.environment == 'production' and site.google_analytics %}
{% include google-analytics.html %}
{% endif %}
{% seo %}
{% include head-includes.html %}
</head>

View File

@ -0,0 +1,24 @@
<header id="nav-header" class="border-dark border-left-0 border-right-0">
<div id="nav-container" class="container position-relative d-flex justify-content-between align-items-center">
{% assign default_paths = site.pages | map: "path" %}
{% assign page_paths = site.header_pages | default: default_paths %}
<a class="h4 m-0 text-dark" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>
{% if page_paths %}
<nav id="nav-menu-container" class="text-right navbar-light">
<input type="checkbox" id="nav-trigger" class="d-none"/>
<label for="nav-trigger" id="nav-trigger-label" class="m-2 d-inline-block d-md-none navbar-toggler-icon">
</label>
<div id="nav-menu" class="d-none d-md-block">
{% for path in page_paths %}
{% assign my_page = site.pages | where: "path", path | first %}
{% if my_page.title %}
<a class="text-dark ml-3 ml-md-0 p-2 d-block d-md-inline-block" href="{{ my_page.url | relative_url }}">{{ my_page.title | escape }}</a>
{% endif %}
{% endfor %}
</div>
</nav>
{% endif %}
</div>
</header>

View File

@ -0,0 +1,4 @@
<svg viewBox="0 0 16 16" width="16px" height="16px" xmlns="http://www.w3.org/2000/svg">
<title>GitHub</title>
<path fill="currentColor" d="M7.999,0.431c-4.285,0-7.76,3.474-7.76,7.761 c0,3.428,2.223,6.337,5.307,7.363c0.388,0.071,0.53-0.168,0.53-0.374c0-0.184-0.007-0.672-0.01-1.32 c-2.159,0.469-2.614-1.04-2.614-1.04c-0.353-0.896-0.862-1.135-0.862-1.135c-0.705-0.481,0.053-0.472,0.053-0.472 c0.779,0.055,1.189,0.8,1.189,0.8c0.692,1.186,1.816,0.843,2.258,0.645c0.071-0.502,0.271-0.843,0.493-1.037 C4.86,11.425,3.049,10.76,3.049,7.786c0-0.847,0.302-1.54,0.799-2.082C3.768,5.507,3.501,4.718,3.924,3.65 c0,0,0.652-0.209,2.134,0.796C6.677,4.273,7.34,4.187,8,4.184c0.659,0.003,1.323,0.089,1.943,0.261 c1.482-1.004,2.132-0.796,2.132-0.796c0.423,1.068,0.157,1.857,0.077,2.054c0.497,0.542,0.798,1.235,0.798,2.082 c0,2.981-1.814,3.637-3.543,3.829c0.279,0.24,0.527,0.713,0.527,1.437c0,1.037-0.01,1.874-0.01,2.129 c0,0.208,0.14,0.449,0.534,0.373c3.081-1.028,5.302-3.935,5.302-7.362C15.76,3.906,12.285,0.431,7.999,0.431z"/>
</svg>

After

Width:  |  Height:  |  Size: 1017 B

View File

@ -0,0 +1,39 @@
---
layout: page
---
{{ content }}
{% for post in site.posts %}
{% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
{% if forloop.first %}
<h2 class="mt-0 h4">{{ year }}</h2>
<table class="ml-4">
{% elsif year != prev_year %}
</table>
<h2 class="h4">{{ year }}</h2>
<table class="ml-4">
{% endif %}
{% assign date_format = site.minima_reboot.date_format_short | default: "%b %-d" %}
<tr>
<td class="text-right align-top text-truncate"><time class="text-secondary" datetime="{{ post.date | date:"%Y-%m-%d" }}">{{ post.date | date: date_format }}</time></td>
<td class="text-center align-top px-1">|</td>
<td class="text-left align-top"><a href="{{ post.url | prepend: site.baseurl }}">{{ post.title | escape }}</a></td>
</tr>
{% if forloop.last %}
</table>
{% endif %}
{% capture prev_year %}{{ year }}{% endcapture %}
{% endfor %}
<div class="pt-3"></div>
{% if site.plugins contains "jekyll-feed" %}
<a href="{{ "/feed.xml" | relative_url }}"><div id="rss-icon" class="mb-2"></div></a>
{% endif %}

View File

@ -0,0 +1,10 @@
---
# Jekyll layout that compresses HTML
# v3.0.4
# http://jch.penibelst.de/
# © 20142015 Anatol Broder
# MIT License
---
{% capture _LINE_FEED %}
{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %}

View File

@ -0,0 +1,23 @@
---
layout: compress
---
<!DOCTYPE html>
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
{% include head.html %}
<body>
{% include header.html %}
<main aria-label="Content">
<div class="container">
{{ content }}
</div>
</main>
{% include footer.html %}
</body>
</html>

52
docs/_layouts/home.html Normal file
View File

@ -0,0 +1,52 @@
---
layout: default
---
<header class="pt-3 mb-3">
{{ content }}
</header>
<div id="content">
{% if site.paginate %}
{% assign posts = paginator.posts %}
{% else %}
{% assign posts = site.posts %}
{% endif %}
<ul class="list-unstyled m-0">
{% assign date_format = site.minima_reboot.date_format | default: "%b %-d, %Y" %}
{% for post in posts %}
<li class="py-2">
<span class="text-secondary">{{ post.date | date: date_format }}</span>
<h1 class="mt-1 mb-3 h3">
<a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
</h1>
<div class="text-justify">
{{ post.excerpt }}
</div>
</li>
{% endfor %}
</ul>
{% if site.paginate %}
<nav class="py-1" aria-label="Blog page navigation">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path | relative_url }}">&laquo; Previous</a>
{% endif %}
Page: {{ paginator.page }} of {{ paginator.total_pages }}
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | relative_url }}">Next &raquo;</a>
{% endif %}
</nav>
{% endif %}
{% if site.plugins contains "jekyll-feed" %}
<a href="{{ "/feed.xml" | relative_url }}"><div id="rss-icon" class="mb-2"></div></a>
{% endif %}
</div>

14
docs/_layouts/page.html Normal file
View File

@ -0,0 +1,14 @@
---
layout: default
---
<article>
<header class="pt-4 pb-3">
<h1>{{ page.title | escape }}</h1>
</header>
<div id="content">
{{ content }}
</div>
</article>

33
docs/_layouts/post.html Normal file
View File

@ -0,0 +1,33 @@
---
layout: default
---
<article itemscope itemtype="http://schema.org/BlogPosting">
<header class="pt-4 pb-3">
<h1 itemprop="name headline">{{ page.title | escape }}</h1>
<p class="text-secondary">
{% if page.author %}
{% if page.author_url %}
<a href="{{ page.author_url }}">
{% endif %}
<span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>
{% if page.author_url %}
</a>
{% endif %}
&bull;
{% endif %}
<time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
{% assign date_format = site.minima_reboot.date_format | default: "%b %-d, %Y" %}
{{ page.date | date: date_format }}
</time>
</p>
</header>
<div class="text-justify" itemprop="articleBody" id="content">
{{ content }}
</div>
{% if site.disqus.shortname %}
{% include disqus_comments.html %}
{% endif %}
</article>

25
docs/_pages/404.html Normal file
View File

@ -0,0 +1,25 @@
---
layout: default
permalink: /404.html
---
<style type="text/css" media="screen">
.container {
margin: 10px auto;
max-width: 600px;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>
<div class="container">
<h1>404</h1>
<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
</div>

29
docs/_pages/about.md Normal file
View File

@ -0,0 +1,29 @@
---
layout: page
title: About
permalink: /about/
---
NextEPC is a C-language Open Source implementation of the 3GPP Evolved Packet Core, i.e. the core network of an LTE network.
#### Supported Features
---
- LTE release 14 complient
- AES, Snow3G, ZUC algorithms for encryption
- Support of USIM cards using Milenage
- Multiple PDN support
- S1/X2 Handover
- IPv6 support
- Supports several IMS servers with Rx interface.
#### Known Limitations
---
- No OCS/OFCS
- No NB-IoT
- No eMBMS
- No CS Fallback and SRVCC
- No Roaming
- No Emergency Call
- No ePDG Gateway

21
docs/_pages/docs.md Normal file
View File

@ -0,0 +1,21 @@
---
layout: page
title: Documentation
permalink: /docs/
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
---
- User's Guide 2
- [Quickstart](guide/01-quickstart)
- [Building nextepc from Sources](guide/02-building-nextepc-from-sources)
- Tutorials
- [Your First LTE](tutorial/01-your-first-lte)
- Platform Specific Notes
- [Debian/Ubuntu](platform/01-debian-ubuntu)
- [CentOS](platform/02-centos)
- [Fedora](platform/03-fedora)
- [FreeBSD](platform/04-freebsd)
- [MacOSX](platform/05-macosx)
- [Ubuntu(Trusty)](platform/06-ubuntu-trusty)

293
docs/_pages/faq.md Normal file
View File

@ -0,0 +1,293 @@
---
layout: page
title: FAQ
permalink: /faq/
---
#### How to connect MongoDB server
If you do not start MongoDB, you will get the following error:
```bash
➜ nextepc git:(master) ✗ ./test/testepc
04/09 15:42:34.817: [core] ERROR: Failed to conect to server [mongodb://localhost/nextepc] (context.c:326)
04/09 15:42:34.817: [core] ERROR: app_initialize() failed (basic/abts-main.c:91)
s1ap_message_test : -04/09 15:42:34.830: [s1ap] ERROR: Failed to decode S1AP-PDU[-1] (s1ap_encoder.c:41)
04/09 15:42:34.830: [core] FATAL: ogs_log_vprintf: Assertion `domain' failed. (ogs-log.c:347)
```
You can start MongoDB using systemctl.
```bash
$ sudo systemctl start mongodb
```
#### Failing to run `./nextepc-epcd`
You might be getting the following error after running `./nextepc-epcd`.
```bash
➜ nextepc git:(master) ./nextepc-epcd
04/09 15:41:02.600: [core] INFO: NextEPC daemon start (main.c:169)
04/09 15:41:02.601: [core] ERROR: CHECK PERMISSION of Installation Directory... (application.c:144)
04/09 15:41:02.601: [core] ERROR: Cannot create PID file:`/home/acetcom/Documents/git/open5gs/nextepc/install/var/run/nextepc-epcd/pid` (application.c:145)
04/09 15:41:02.601: [core] WARNING: log_pid: should not be reached. (application.c:146)
/home/acetcom/Documents/git/open5gs/nextepc/lib/ogslib/src/core/.libs/libogscore-1.0.so.0(ogs_abort+0x2b)[0x7f9d5d26d71b]
/home/acetcom/Documents/git/open5gs/nextepc/.libs/nextepc-epcd(+0x9606)[0x563a4ba23606]
/home/acetcom/Documents/git/open5gs/nextepc/.libs/nextepc-epcd(+0x8640)[0x563a4ba22640]
/home/acetcom/Documents/git/open5gs/nextepc/.libs/nextepc-epcd(+0x81f3)[0x563a4ba221f3]
[1] 9635 abort (core dumped) ./nextepc-epcd
```
You should perform **the installation process**.
```bash
$ make install
```
#### I have some error when running `./test/testepc`
Did you see the following error after executing `testepc`?
```bash
➜ nextepc git:(master) ✗ ./test/testepc
s1ap_message_test : SUCCESS
nas_message_test : SUCCESS
gtp_message_test : SUCCESS
security_test : SUCCESS
s1setup_test : SUCCESS
attach_test : -Line 134: Condition is false, but expected true
\04/09 15:49:09.285: [esm] FATAL: esm_handle_pdn_connectivity_request: Assertion `SECURITY_CONTEXT_IS_VALID(mme_ue)' failed. (esm_handler.c:29)
/home/acetcom/Documents/git/open5gs/nextepc/lib/ogslib/src/core/.libs/libogscore-1.0.so.0(ogs_abort+0x2b)[0x7f608518271b]
/home/acetcom/Documents/git/open5gs/nextepc/test/.libs/testepc(+0x92121)[0x55dc9e274121]
/home/acetcom/Documents/git/open5gs/nextepc/test/.libs/testepc(+0x4f5b9)[0x55dc9e2315b9]
```
Remove all subscriber information using MongoDB Client
```
$ mongo
> db.subscribers.find() ### Check the test subscriber
> db.subscribers.drop() ### Remove all subscriber
> db.subscribers.find() ### Check that all subscribers are empty
```
Kill all processes.
```bash
$ ps -ef | grep testepc
$ ps -ef | grep nextepc
$ sudo pkill -9 testepc
$ sudo pkill -9 nextepc-epcd ...
```
Execute `testepc`
```bash
$ ./test/testepc
```
#### My eNB does not support IPv6.
Your eNodeB don't have to support IPv6.
If the sgw.gtpu configuration does not have an IPv6 address, the eNodeB can use IPv4 to connect to the MME and SGW. If the sgw.gtpu setting has an IPv6 address, you can disable the IPv6 address as shown below.
```yaml
parameter:
no_ipv6: true
```
**Note:** This parameter `no_ipv6` is only applied to EPC Elements such as MME, SGW, and so on. The parameter `no_ipv6` does not affect to UE. So, IPv6-enabled UE can connect to NextEPC LTE network.
{: .notice--warning}
#### Unable to add new user by WebUI
It might be a CSRF token mismatch error.
Please, delete corresponding cookies, cache, session data etc.
#### Change Domain from localdomain to anything else
You should configure the domain name on your computer. Otherwise, freeDiameter raise an error.
#### How many of UEs can NextEPC support?
See the [lib/base/types.h](https://github.com/{{ site.github_username }}/nextepc/blob/master/lib/base/types.h).
```
#define MAX_NUM_OF_ENB 128
#define MAX_NUM_OF_UE 128
#define MAX_NUM_OF_SESS 4
#define MAX_NUM_OF_BEARER 4
#define MAX_NUM_OF_TUNNEL 3 /* Num of Tunnel per Bearer */
#define MAX_NUM_OF_PF 16 /* Num of Packet Filter per Bearer */
#define MAX_POOL_OF_UE (MAX_NUM_OF_ENB * MAX_NUM_OF_UE)
#define MAX_POOL_OF_SESS (MAX_POOL_OF_UE * MAX_NUM_OF_SESS)
#define MAX_POOL_OF_BEARER (MAX_POOL_OF_SESS * MAX_NUM_OF_BEARER)
#define MAX_POOL_OF_TUNNEL (MAX_POOL_OF_BEARER * MAX_NUM_OF_TUNNEL)
#define MAX_POOL_OF_PF (MAX_POOL_OF_BEARER * MAX_NUM_OF_PF)
#define MAX_POOL_OF_DIAMETER_SESS (MAX_POOL_OF_UE * MAX_NUM_OF_SESS)
```
Currently, the number of UE is limited to `128*128`.
#### What is the Default Configuration?
- Network
```
* MME
S1AP: listen on all address avaiable in system
GTP-C: listen on the first IP address in system
DIAMETER: 127.0.0.2 (No TLS)
* SGW
GTP-C: 127.0.0.2
GTP-U: listen on the first IP address in system
* PGW
GTP-C: Both 127.0.0.3 and [::1]
GTP-U: Both 127.0.0.3 and [::1]
DIAMETER: 127.0.0.3 (No TLS)
* HSS
DIAMETER: 127.0.0.4 (No TLS)
* PCRF
DIAMETER: 127.0.0.5 (No TLS)
```
- GUMMEI, PLMN and TAC
```
* GUMMEI
PLMN ID - MNC: 001, MCC: 01
MME Group : 2
MME Code : 1
* TAI
PLMN ID - MNC: 001, MCC: 01
TAC : 12345
```
- Security
```
* Integrity : EIA1 - Snow 3G
* Ciphering : EEA0 - Nothing
```
- UE Network
```
* IPv4 : 45.45.0.1/16
* IPv6 : cafe::1/64
```
- DNS
```
* IPv4
Primary : 8.8.8.8
Secondary : 8.8.4.4
* IPv6
Primary : 2001:4860:4860::8888
Secondary : 2001:4860:4860::8844
```
#### The parsing errors are caused by tab spaces in the configuration files.
YAML forbids tabs. You should use space instead of tab in NextEPC configuration file.
```markdown
YAML FAQ: Why does YAML forbid tabs?
Tabs have been outlawed since they are treated differently by different editors and tools. And since indentation is so critical to proper interpretation of YAML, this issue is just too tricky to even attempt. Indeed Guido van Rossum of Python has acknowledged that allowing TABs in Python source is a headache for many people and that were he to design Python again, he would forbid them.
```
#### High CPU usage on idle
This issue will not occur after v0.4.x version.
#### Cross compilation setup
By default, NextEPC is designed to support the Embedding System. To do so, we introduced pool-based memory management. Unfortunately, we have not tested NextEPC in an embedded environment. I tried to compile on the ARM architecture using Docker and run it with QEMU for your reference.
- We'll use Debian Docker Environment.
```bash
$ git clone -r https://github.com/acetcom/nextepc
$ cd nextepc/docker
$ DIST=debian docker-compose run dev
```
- In Docker Container
```bash
acetcom@nextepc-dev:~$ sudo dpkg --add-architecture armel
acetcom@nextepc-dev:~$ sudo apt-get install libsctp-dev:armel libyaml-dev:armel libgnutls28-dev:armel libgcrypt-dev:armel libssl-dev:armel libmongoc-dev:armel libbson-dev:armel
acetcom@nextepc-dev:~$ sudo apt-get install crossbuild-essential-armel
acetcom@nextepc-dev:~$ sudo apt-get install qemu
acetcom@nextepc-dev:~$ mkdir git
acetcom@nextepc-dev:~$ cd git/
acetcom@nextepc-dev:~/git$ git clone https://github.com/acetcom/nextepc
acetcom@nextepc-dev:~/git$ cd nextepc/
acetcom@nextepc-dev:~/git/nextepc$ autoreconf -if;./configure --prefix=`pwd`/install --host=arm-linux-gnueabi;make -j 2
acetcom@nextepc-dev:~/git/nextepc$ make install
acetcom@nextepc-dev:~/git/nextepc$ qemu-arm .libs/nextepc-mmed
NextEPC daemon v0.3.10 - Oct 4 2018 13:24:24
[10/04 13:38:06.329] WARN: pid file /home/acetcom/git/nextepc/install/var/run/nextepc-mmed/pid overwritten -- Unclean shutdown of previous NextEPC run? (application.c:113)
PID[55780] : '/home/acetcom/git/nextepc/install/var/run/nextepc-mmed/pid'
File Logging : '/home/acetcom/git/nextepc/install/var/log/nextepc/nextepc.log'
qemu: Unsupported syscall: 345
qemu: Unsupported syscall: 345
qemu: Unsupported syscall: 345
qemu: Unsupported syscall: 345
qemu: Unsupported syscall: 345
qemu: Unsupported syscall: 345
qemu: Unsupported syscall: 345
qemu: Unsupported syscall: 345
MongoDB URI : 'mongodb://mongodb/nextepc'
Configuration : '/home/acetcom/git/nextepc/install/etc/nextepc/nextepc.conf'
[10/04 13:38:06.400] MME try to initialize
Unknown host QEMU_IFLA type: 40
Unknown host QEMU_IFLA type: 41
Unknown host QEMU_IFLA type: 40
Unknown host QEMU_IFLA type: 41
Unknown QEMU_IFLA_INFO_KIND ipip
Unknown host QEMU_IFLA type: 40
Unknown host QEMU_IFLA type: 41
Unknown QEMU_IFLA_INFO_KIND ip6tnl
Unknown host QEMU_IFLA type: 40
Unknown host QEMU_IFLA type: 41
Unknown host QEMU_IFLA type: 40
Unknown host QEMU_IFLA type: 41
Unknown host QEMU_IFLA type: 40
Unknown host QEMU_IFLA type: 41
Unknown host QEMU_IFLA type: 40
Unknown host QEMU_IFLA type: 41
Unknown QEMU_IFLA_INFO_KIND ipip
Unknown host QEMU_IFLA type: 40
Unknown host QEMU_IFLA type: 41
Unknown QEMU_IFLA_INFO_KIND ip6tnl
Unknown host QEMU_IFLA type: 40
Unknown host QEMU_IFLA type: 41
Unknown host QEMU_IFLA type: 40
Unknown host QEMU_IFLA type: 41
[10/04 13:38:08.693] gtp_server() [172.20.0.2]:2123
[10/04 13:38:08.696] gtp_client() [127.0.0.2]:2123
Unsupported setsockopt level=132 optname=11
[10/04 13:38:08.697] ERRR: Unable to subscribe to SCTP events: (92:Protocol not available) (unix/sctp.c:291)
[10/04 13:38:08.699] ASSERT: !(rv == CORE_OK). (unix/sctp.c:33)
[10/04 13:38:08.700] ERRR: sctp_server() [172.20.0.2]:36412 failed(92:Protocol not available) (unix/sctp.c:98)
[10/04 13:38:08.701] ASSERT: !(rv == CORE_OK). (s1ap_sctp.c:35)
[10/04 13:38:08.702] ASSERT: !(rv == CORE_OK). (s1ap_path.c:53)
[10/04 13:38:08.703] ASSERT: !(rv == CORE_OK). (s1ap_path.c:28)
[10/04 13:38:08.704] ERRR: Can't establish S1AP path (mme_sm.c:63)
[10/04 13:38:08.708] MME initialize...done
[10/04 13:38:08.710] INFO: NextEPC daemon start (main.c:157)
```
The SCTP module is not included in the QEMU kernel. I believe that if the Linux kernel installed on your target platform contains an SCTP module, it will work normally.
{: .notice--warning}

5
docs/_pages/github.md Normal file
View File

@ -0,0 +1,5 @@
---
title: GitHub
redirect_to:
- https://github.com/open5gs/nextepc
---

5
docs/_pages/home.md Normal file
View File

@ -0,0 +1,5 @@
---
layout: allposts
list_title: News
permalink: /
---

View File

@ -0,0 +1,9 @@
---
title: "Programming started."
date: 2017-02-01 19:48:49 +0900
categories:
- Release
tags:
- News
- Release
---

View File

@ -0,0 +1,11 @@
---
title: "First version released."
date: 2017-10-09 11:03:15 +0900
categories:
- Release
tags:
- News
- Release
---
- Assets -- [v0.1.0.tar.gz](https://github.com/acetcom/nextepc/archive/v0.1.0.tar.gz)

View File

@ -0,0 +1,12 @@
---
title: "v0.1.1 - Fix the bug related to Mongo C Driver"
date: 2017-10-11 15:46:45 +0900
categories:
- Release
tags:
- News
- Release
---
- Fix the bug related to Mongo C Driver. [[More Info](https://github.com/acetcom/nextepc/commit/4245502ae287df9c457621b3f4cccb519c4d4878)]
- Assets -- [v0.1.1.tar.gz](https://github.com/acetcom/nextepc/archive/v0.1.1.tar.gz)

View File

@ -0,0 +1,14 @@
---
title: "v0.2.0 - Package Publish, Support More OS"
date: 2017-11-02 17:21:21 +0900
categories:
- Release
tags:
- News
- Release
---
- Publish Debian/Ubuntu Package
- Support FreeBSD and Mac OS X"
- Assets -- [v0.2.0.tar.gz](https://github.com/acetcom/nextepc/archive/v0.2.0.tar.gz)

View File

@ -0,0 +1,14 @@
---
title: "v0.3.0 - IPv6 Support, Change Configuration File Format"
date: 2017-12-18 20:57:47 +0900
categories:
- Release
tags:
- News
- Release
---
- IPv6 Support (Linux Only)
- Change Configuration File (JSON -> YAML)
- Assets -- [v0.3.0.tar.gz](https://github.com/acetcom/nextepc/archive/v0.3.0.tar.gz)

View File

@ -0,0 +1,12 @@
---
title: "v0.3.1 - Bug Fixes"
date: 2017-12-31 22:20:39 +0900
categories:
- Release
tags:
- News
- Release
---
- Add Authentication Synch Failure ([#11](https://github.com/acetcom/nextepc/issues/11)) -- [eric80s](https://github.com/eric80s)
- Assets -- [v0.3.1.tar.gz](https://github.com/acetcom/nextepc/archive/v0.3.1.tar.gz)

View File

@ -0,0 +1,20 @@
---
title: "v0.3.3 - Docker Support"
date: 2018-02-13 04:50:34 +0900
categories:
- Release
tags:
- News
- Release
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
---
#### New
- Docker support ([#16](https://github.com/acetcom/nextepc/issues/16)) -- [amilenovic](https://github.com/amilenovic)
#### Bug fixes
- Fix the BUG for MAC failure of authentication failure -- [#17](https://github.com/acetcom/nextepc/issues/17) from [razaborg](https://github.com/razaborg)
- Fix the BUG for EPS attach type of Attach accept -- [#12](https://github.com/acetcom/nextepc/issues/12) from [pcminitech](https://github.com/pcminitech)
Download -- [v0.3.3.tar.gz](https://github.com/acetcom/nextepc/archive/v0.3.3.tar.gz)
{: .notice--info}

View File

@ -0,0 +1,20 @@
---
title: "v0.3.5 - Support Network Name"
date: 2018-03-06 12:43:34 +0900
categories:
- Release
tags:
- News
- Release
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
---
#### New
- Support Network Name ([#22](https://github.com/acetcom/nextepc/pull/22)) -- [medeiros405](https://github.com/medeiros405)
#### Bug fixes
- Fix the BUG for security capabilities mismatch ([#27](https://github.com/acetcom/nextepc/issues/27)) -- [wayne43290](https://github.com/wayne43290)
- Fix the BUG that SGW process is dead during paging process ([#18](https://github.com/acetcom/nextepc/issues/18)) -- [jackson040407](https://github.com/jackson040407)
Download -- [v0.3.5.tar.gz](https://github.com/acetcom/nextepc/archive/v0.3.5.tar.gz)
{: .notice--info}

View File

@ -0,0 +1,15 @@
---
title: "v0.3.6 - More S1AP Message"
date: 2018-03-21 08:05:56 +0900
categories:
- Release
tags:
- News
- Release
---
- Support eNB/MME Configuration Transfer, Error Indication ([#29](https://github.com/acetcom/nextepc/issues/29)) -- [wayne43290](https://github.com/wayne43290)
- Increase SCTP recv buffer : 2048->8192 ([#35](https://github.com/acetcom/nextepc/issues/35)) -- [EugeneBogush](https://github.com/EugeneBogush)
Download -- [v0.3.6.tar.gz](https://github.com/acetcom/nextepc/archive/v0.3.6.tar.gz)
{: .notice--info}

View File

@ -0,0 +1,12 @@
---
title: "v0.3.7 - S1AP supports Release 14.4.0"
date: 2018-04-14 15:04:04 +0900
categories:
- Release
tags:
- News
- Release
---
Download -- [v0.3.7.tar.gz](https://github.com/acetcom/nextepc/archive/v0.3.7.tar.gz)
{: .notice--info}

View File

@ -0,0 +1,23 @@
---
title: "v0.3.9 - Support NAS encryption"
date: 2018-06-03 01:42:05 +0000
categories:
- Release
tags:
- News
- Release
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
---
#### New
- Support NAS encryption(EEA1/EEA2/EEA3)
#### Bug fixes
- Confirm with 36.412 requirement of SCTP stream id ([#54](https://github.com/acetcom/nextepc/issues/54)) -- [brchiu](https://github.com/brchiu)
- Fix to set correct timezone in UE ([#61](https://github.com/acetcom/nextepc/pull/61)) -- [medeiros405](https://github.com/medeiros405)
- Fix to change MME's integrity order ([#64](https://github.com/acetcom/nextepc/issues/64)) -- [kewinrausch](https://github.com/kewinrausch)
- Fix the bug for tracking area update ([#29](https://github.com/acetcom/nextepc/issues/29)) -- [wayne43290](https://github.com/wayne43290)
- Fix the bug for indirect tunnel ([#29](https://github.com/acetcom/nextepc/issues/29)) -- [wayne43290](https://github.com/wayne43290)
Download -- [v0.3.9.tar.gz](https://github.com/acetcom/nextepc/archive/v0.3.9.tar.gz)
{: .notice--info}

View File

@ -0,0 +1,21 @@
---
title: "v0.3.10 - Bug Fixes"
date: 2018-08-17 04:28:50 +0000
categories:
- Release
tags:
- News
- Release
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
---
#### Bug fixes
- Renew freeDiameter Certificate ([#93](https://github.com/acetcom/nextepc/issues/93), [#94](https://github.com/acetcom/nextepc/issues/94)) -- [Ravi-t](https://github.com/Ravi-t), [hchenji](https://github.com/hchenji)
- Fix TLV uint32 bug ([#73](https://github.com/acetcom/nextepc/pull/73)) -- [giuliol](https://github.com/giuliol)
- Add TRACE for IP address of connected UEs ([#71](https://github.com/acetcom/nextepc/issues/71)) -- [pgupta408](https://github.com/Ravi-t)
- Show reason string for YAML parser error ([#40](https://github.com/acetcom/nextepc/issues/40)) -- [Raw1mage](https://github.com/Raw1mage)
- Fix compile error for GCC 8.1
- Fix compile error for Mongo-C-Driver 1.11
Download -- [v0.3.10.tar.gz](https://github.com/acetcom/nextepc/archive/v0.3.10.tar.gz)
{: .notice--info}

View File

@ -0,0 +1,28 @@
---
title: "v0.3.11 - First version in 2019"
date: 2019-04-27 10:30:00 +0900
categories:
- Release
tags:
- News
- Release
head_inline: "<style> ul { padding-bottom: 1em; } </style>"
---
#### Enhancements
- Support 4-bytes RES in NAS Auth ([#147](https://github.com/acetcom/nextepc/issues/147)) -- [Ranjjiitsingh](https://github.com/Ranjjiitsingh)
- Add SGW selection mode ([#100](https://github.com/acetcom/nextepc/pull/100)) -- [TerryAlu](https://github.com/TerryAlu)
#### Bug fixes
- Increase packet memory buffer ([#161](https://github.com/acetcom/nextepc/issues/161)) -- [mathieuxilan](https://github.com/mathieuxilan)
- Fix setting END-ID to 0 ([#156](https://github.com/acetcom/nextepc/issues/156)) -- [hypercloud2017](https://github.com/hypercloud2017)
- Fix incorrect timezone in NAS & GTP ([#140](https://github.com/acetcom/nextepc/issues/140)) -- [EugeneBogush](https://github.com/EugeneBogush)
#### Miscellaneous
- nas_message.py: Fix copy+paste error([#159](https://github.com/acetcom/nextepc/issues/159)) -- [laf0rge](https://github.com/laf0rge)
- Fix missing 'break' statement ([#129](https://github.com/acetcom/nextepc/pull/129)) -- [EugeneBogush](https://github.com/EugeneBogush)
- Add missing C namespace ([#109](https://github.com/acetcom/nextepc/pull/109)) -- [brchiu](https://github.com/brchiu)
- Refine EXIT routine for daemon process
Download -- [v0.3.11.tar.gz](https://github.com/acetcom/nextepc/archive/v0.3.11.tar.gz)
{: .notice--info}

View File

@ -0,0 +1,6 @@
@charset "utf-8";
@import
"minima-reboot/layout",
"minima-reboot/syntax-highlighting"
;

View File

@ -0,0 +1,73 @@
$layout-color-border: #e9ecef !default;
$layout-color-background: #fdfdfd !default;
$layout-color-syntax-highlighting-background: #f8f9fa !default;
$layout-responsive-nav-cutoff: 768px !default;
body {
background-color: $layout-color-background;
}
#nav-header {
border-top: 5px solid !important;
border-bottom: 1px solid $layout-color-border !important;
}
#nav-container {
height: 3.5rem;
}
#nav-menu-container {
@media (max-width: $layout-responsive-nav-cutoff - 1) {
position: absolute;
z-index: 100;
top: 0.4375rem;
right: 1rem;
border: 1px solid $layout-color-border;
border-radius: .25rem;
background-color: $layout-color-background;
}
}
#nav-trigger-label {
height: 1.5rem;
width: 1.5rem;
cursor: pointer;
}
#nav-trigger:checked ~ #nav-menu {
display: block !important;
}
#content {
h1, h2, h3, h4 {
margin-top: 2rem;
margin-bottom: 1rem;
text-align: left;
}
blockquote {
border-left: 4px solid $layout-color-border;
padding-left: 1rem;
font-style: italic
}
.footnotes {
text-align: left;
}
#rss-icon {
height: 1.5rem;
width: 1.5rem;
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='rgb(134, 142, 150)' d='M119.9,336.1c-30.8,0-55.9,25.1-55.9,55.8c0,30.8,25.1,55.6,55.9,55.6c30.9,0,55.9-24.9,55.9-55.6,C175.8,361.2,150.8,336.1,119.9,336.1z'/%3E%3Cpath fill='rgb(134, 142, 150)' d='M64,192v79.9c48,0,94.1,14.2,128,48.1c33.9,33.9,48,79.9,48,128h80C320,308.1,204,192,64,192z'/%3E%3Cpath fill='rgb(134, 142, 150)' d='M64,64v79.9c171,0,303.9,133,303.9,304.1H448C448,236.3,276,64,64,64z'/%3E%3C/svg%3E")
}
}
#site-footer {
border-top: 1px solid $layout-color-border;
}
.highlight pre {
border: 1px solid $layout-color-border;
border-radius: .25rem;
background-color: $layout-color-syntax-highlighting-background;
padding: 0.75rem;
margin-bottom: 1rem;
white-space: pre-wrap;
}

View File

@ -0,0 +1,61 @@
.highlight {
.c { color: #998; font-style: italic } // Comment
.err { color: #a61717; background-color: #e3d2d2 } // Error
.k { font-weight: bold } // Keyword
.o { font-weight: bold } // Operator
.cm { color: #998; font-style: italic } // Comment.Multiline
.cp { color: #999; font-weight: bold } // Comment.Preproc
.c1 { color: #998; font-style: italic } // Comment.Single
.cs { color: #999; font-weight: bold; font-style: italic } // Comment.Special
.gd { color: #000; background-color: #fdd } // Generic.Deleted
.gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific
.ge { font-style: italic } // Generic.Emph
.gr { color: #a00 } // Generic.Error
.gh { color: #999 } // Generic.Heading
.gi { color: #000; background-color: #dfd } // Generic.Inserted
.gi .x { color: #000; background-color: #afa } // Generic.Inserted.Specific
.go { color: #888 } // Generic.Output
.gp { color: #555 } // Generic.Prompt
.gs { font-weight: bold } // Generic.Strong
.gu { color: #aaa } // Generic.Subheading
.gt { color: #a00 } // Generic.Traceback
.kc { font-weight: bold } // Keyword.Constant
.kd { font-weight: bold } // Keyword.Declaration
.kp { font-weight: bold } // Keyword.Pseudo
.kr { font-weight: bold } // Keyword.Reserved
.kt { color: #458; font-weight: bold } // Keyword.Type
.m { color: #099 } // Literal.Number
.s { color: #d14 } // Literal.String
.na { color: #008080 } // Name.Attribute
.nb { color: #0086B3 } // Name.Builtin
.nc { color: #458; font-weight: bold } // Name.Class
.no { color: #008080 } // Name.Constant
.ni { color: #800080 } // Name.Entity
.ne { color: #900; font-weight: bold } // Name.Exception
.nf { color: #900; font-weight: bold } // Name.Function
.nn { color: #555 } // Name.Namespace
.nt { color: #000080 } // Name.Tag
.nv { color: #008080 } // Name.Variable
.ow { font-weight: bold } // Operator.Word
.w { color: #bbb } // Text.Whitespace
.mf { color: #099 } // Literal.Number.Float
.mh { color: #099 } // Literal.Number.Hex
.mi { color: #099 } // Literal.Number.Integer
.mo { color: #099 } // Literal.Number.Oct
.sb { color: #d14 } // Literal.String.Backtick
.sc { color: #d14 } // Literal.String.Char
.sd { color: #d14 } // Literal.String.Doc
.s2 { color: #d14 } // Literal.String.Double
.se { color: #d14 } // Literal.String.Escape
.sh { color: #d14 } // Literal.String.Heredoc
.si { color: #d14 } // Literal.String.Interpol
.sx { color: #d14 } // Literal.String.Other
.sr { color: #009926 } // Literal.String.Regex
.s1 { color: #d14 } // Literal.String.Single
.ss { color: #990073 } // Literal.String.Symbol
.bp { color: #999 } // Name.Builtin.Pseudo
.vc { color: #008080 } // Name.Variable.Class
.vg { color: #008080 } // Name.Variable.Global
.vi { color: #008080 } // Name.Variable.Instance
.il { color: #099 } // Literal.Number.Integer.Long
}

View File

@ -0,0 +1,11 @@
/*!
* Minimal Mistakes Jekyll Theme 4.15.2 by Michael Rose
* Copyright 2013-2019 Michael Rose - mademistakes.com | @mmistakes
* Licensed under MIT (https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE)
*/
/* Variables */
@import "minimal-mistakes/variables";
/* Components */
@import "minimal-mistakes/notices";

View File

@ -0,0 +1,100 @@
/* ==========================================================================
NOTICE TEXT BLOCKS
========================================================================== */
/**
* Default Kramdown usage (no indents!):
* <div class="notice" markdown="1">
* #### Headline for the Notice
* Text for the notice
* </div>
*/
@mixin notice($notice-color) {
margin: 1em 0 !important; /* override*/
padding: 1em;
color: $dark-gray;
font-family: $global-font-family;
font-size: $type-size-6 !important;
text-indent: initial; /* override*/
background-color: mix(#fff, $notice-color, 90%);
border-radius: $border-radius;
box-shadow: 0 1px 1px rgba($notice-color, 0.25);
h4 {
margin-top: 0 !important; /* override*/
margin-bottom: 0.75em;
}
@at-root .page__content #{&} h4 {
/* using at-root to override .page-content h4 font size*/
margin-bottom: 0;
font-size: 1em;
}
p {
&:last-child {
margin-bottom: 0 !important; /* override*/
}
}
h4 + p {
/* remove space above paragraphs that appear directly after notice headline*/
margin-top: 0;
padding-top: 0;
}
a {
color: $notice-color;
&:hover {
color: mix(#000, $notice-color, 40%);
}
}
code {
background-color: mix(#fff, $notice-color, 95%)
}
ul {
&:last-child {
margin-bottom: 0; /* override*/
}
}
}
/* Default notice */
.notice {
@include notice($light-gray);
}
/* Primary notice */
.notice--primary {
@include notice($primary-color);
}
/* Info notice */
.notice--info {
@include notice($info-color);
}
/* Warning notice */
.notice--warning {
@include notice($warning-color);
}
/* Success notice */
.notice--success {
@include notice($success-color);
}
/* Danger notice */
.notice--danger {
@include notice($danger-color);
}

View File

@ -0,0 +1,159 @@
/* ==========================================================================
Variables
========================================================================== */
/*
Typography
========================================================================== */
$doc-font-size: 16 !default;
/* paragraph indention */
$paragraph-indent: false !default; // true, false (default)
$indent-var: 1.3em !default;
/* system typefaces */
$serif: Georgia, Times, serif !default;
$sans-serif: -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI",
"Helvetica Neue", "Lucida Grande", Arial, sans-serif !default;
$monospace: Monaco, Consolas, "Lucida Console", monospace !default;
/* sans serif typefaces */
$sans-serif-narrow: $sans-serif !default;
$helvetica: Helvetica, "Helvetica Neue", Arial, sans-serif !default;
/* serif typefaces */
$georgia: Georgia, serif !default;
$times: Times, serif !default;
$bodoni: "Bodoni MT", serif !default;
$calisto: "Calisto MT", serif !default;
$garamond: Garamond, serif !default;
$global-font-family: $sans-serif !default;
$header-font-family: $sans-serif !default;
$caption-font-family: $serif !default;
/* type scale */
$type-size-1: 2.441em !default; // ~39.056px
$type-size-2: 1.953em !default; // ~31.248px
$type-size-3: 1.563em !default; // ~25.008px
$type-size-4: 1.25em !default; // ~20px
$type-size-5: 1em !default; // ~16px
$type-size-6: 0.9em !default; // ~12px
$type-size-7: 0.6875em !default; // ~11px
$type-size-8: 0.625em !default; // ~10px
/*
Colors
========================================================================== */
$gray: #7a8288 !default;
$dark-gray: mix(#000, $gray, 40%) !default;
$darker-gray: mix(#000, $gray, 60%) !default;
$light-gray: mix(#fff, $gray, 50%) !default;
$lighter-gray: mix(#fff, $gray, 90%) !default;
$background-color: #fff !default;
$code-background-color: #fafafa !default;
$code-background-color-dark: $light-gray !default;
$text-color: $dark-gray !default;
$muted-text-color: mix(#fff, $text-color, 35%) !default;
$border-color: $lighter-gray !default;
$form-background-color: $lighter-gray !default;
$footer-background-color: $lighter-gray !default;
$primary-color: #6f777d !default;
$success-color: #3fa63f !default;
$warning-color: #d67f05 !default;
$danger-color: #ee5f5b !default;
$info-color: #3b9cba !default;
$focus-color: $primary-color !default;
$active-color: mix(#fff, $primary-color, 80%) !default;
/* YIQ color contrast */
$yiq-contrasted-dark-default: $dark-gray !default;
$yiq-contrasted-light-default: #fff !default;
$yiq-contrasted-threshold: 175 !default;
$yiq-debug: false !default;
/* brands */
$behance-color: #1769ff !default;
$bitbucket-color: #205081 !default;
$dribbble-color: #ea4c89 !default;
$facebook-color: #3b5998 !default;
$flickr-color: #ff0084 !default;
$foursquare-color: #0072b1 !default;
$github-color: #171516 !default;
$gitlab-color: #e24329 !default;
$instagram-color: #517fa4 !default;
$lastfm-color: #d51007 !default;
$linkedin-color: #007bb6 !default;
$mastodon-color: #2b90d9 !default;
$pinterest-color: #cb2027 !default;
$reddit-color: #ff4500 !default;
$rss-color: #fa9b39 !default;
$soundcloud-color: #ff3300 !default;
$stackoverflow-color: #fe7a15 !default;
$tumblr-color: #32506d !default;
$twitter-color: #55acee !default;
$vimeo-color: #1ab7ea !default;
$vine-color: #00bf8f !default;
$youtube-color: #bb0000 !default;
$xing-color: #006567 !default;
/* links */
$link-color: mix(#000, $info-color, 15%) !default;
$link-color-hover: mix(#000, $link-color, 25%) !default;
$link-color-visited: mix(#fff, $link-color, 15%) !default;
$masthead-link-color: $primary-color !default;
$masthead-link-color-hover: mix(#000, $primary-color, 25%) !default;
$navicon-link-color-hover: mix(#fff, $primary-color, 75%) !default;
/* syntax highlighting (base16) */
$base00: #263238 !default;
$base01: #2e3c43 !default;
$base02: #314549 !default;
$base03: #546e7a !default;
$base04: #b2ccd6 !default;
$base05: #eeffff !default;
$base06: #eeffff !default;
$base07: #ffffff !default;
$base08: #f07178 !default;
$base09: #f78c6c !default;
$base0a: #ffcb6b !default;
$base0b: #c3e88d !default;
$base0c: #89ddff !default;
$base0d: #82aaff !default;
$base0e: #c792ea !default;
$base0f: #ff5370 !default;
/*
Breakpoints
========================================================================== */
$small: 600px !default;
$medium: 768px !default;
$medium-wide: 900px !default;
$large: 1024px !default;
$x-large: 1280px !default;
/*
Grid
========================================================================== */
$right-sidebar-width-narrow: 200px !default;
$right-sidebar-width: 300px !default;
$right-sidebar-width-wide: 400px !default;
/*
Other
========================================================================== */
$border-radius: 4px !default;
$box-shadow: 0 1px 1px rgba(0, 0, 0, 0.125) !default;
$nav-height: 2em !default;
$nav-toggle-height: 2rem !default;
$navicon-width: 1.5rem !default;
$navicon-height: 0.25rem !default;
$global-transition: all 0.2s ease-in-out !default;
$intro-transition: intro 0.3s both !default;

View File

@ -0,0 +1,5 @@
---
---
@import "minima-reboot";
@import "minimal-mistakes";

BIN
docs/assets/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Binary file not shown.

151
docs/assets/webui/install Normal file
View File

@ -0,0 +1,151 @@
#!/bin/bash
# Refer to Node.js install script
#
# Run as root or insert `sudo -E` before `bash`:
#
# curl -sL http://nextepc.org/static/setup_3.x | bash -
# or
# wget -qO- http://nextepc.org/static/setup_3.x | bash -
#
PACKAGE="nextepc"
VERSION="0.3.9"
print_status() {
echo
echo "## $1"
echo
}
if test -t 1; then # if terminal
ncolors=$(which tput > /dev/null && tput colors) # supports color
if test -n "$ncolors" && test $ncolors -ge 8; then
termcols=$(tput cols)
bold="$(tput bold)"
underline="$(tput smul)"
standout="$(tput smso)"
normal="$(tput sgr0)"
black="$(tput setaf 0)"
red="$(tput setaf 1)"
green="$(tput setaf 2)"
yellow="$(tput setaf 3)"
blue="$(tput setaf 4)"
magenta="$(tput setaf 5)"
cyan="$(tput setaf 6)"
white="$(tput setaf 7)"
fi
fi
print_bold() {
title="$1"
text="$2"
echo
echo "${red}================================================================================${normal}"
echo "${red}================================================================================${normal}"
echo
echo -e " ${bold}${yellow}${title}${normal}"
echo
echo -en " ${text}"
echo
echo "${red}================================================================================${normal}"
echo "${red}================================================================================${normal}"
}
bail() {
echo 'Error executing command, exiting'
exit 1
}
exec_cmd_nobail() {
echo "+ $1"
bash -c "$1"
}
exec_cmd() {
exec_cmd_nobail "$1" || bail
}
uninstall() {
exec_cmd_nobail "deb-systemd-invoke stop nextepc-webui"
exec_cmd_nobail "systemctl disable nextepc-webui"
exec_cmd_nobail "rm -f /lib/systemd/system/${PACKAGE}-webui.service"
exec_cmd_nobail "systemctl daemon-reload"
exec_cmd "rm -rf ./${PACKAGE}-${VERSION}"
exec_cmd "rm -rf /usr/lib/node_modules/${PACKAGE}"
}
install() {
PRE_INSTALL_PKGS=""
if [ ! -x /usr/bin/mongod ]; then
PRE_INSTALL_PKGS="${PRE_INSTALL_PKGS} mongodb"
fi
if [ ! -x /usr/bin/node ] && [ ! -x /usr/bin/wget ]; then
PRE_INSTALL_PKGS="${PRE_INSTALL_PKGS} nodejs"
fi
if [ ! -x /usr/bin/curl ] && [ ! -x /usr/bin/wget ]; then
PRE_INSTALL_PKGS="${PRE_INSTALL_PKGS} curl"
fi
print_status "Populating apt-get cache..."
exec_cmd 'apt-get update'
if [ "X${PRE_INSTALL_PKGS}" != "X" ]; then
print_status "Installing packages required for setup:${PRE_INSTALL_PKGS}..."
# This next command needs to be redirected to /dev/null or the script will bork
# in some environments
exec_cmd "apt-get install -y${PRE_INSTALL_PKGS} > /dev/null 2>&1"
fi
uninstall
print_status "Download the NextEPC Source Code (v${VERSION})..."
if [ -x /usr/bin/curl ]; then
exec_cmd "curl -sLf 'https://github.com/acetcom/${PACKAGE}/archive/v${VERSION}.tar.gz' | tar zxf -"
RC=$?
else
exec_cmd "wget -qO- /dev/null 'https://github.com/acetcom/${PACKAGE}/archive/v${VERSION}.tar.gz' | tar zxf -"
RC=$?
fi
print_status "Build the NextEPC WebUI..."
exec_cmd "cd ./${PACKAGE}-${VERSION}/webui && npm install && npm run build"
print_status "Install the NextEPC WebUI..."
exec_cmd "mv ./${PACKAGE}-${VERSION}/webui /usr/lib/node_modules/${PACKAGE}"
exec_cmd_nobail "chown -R nextepc:nextepc /usr/lib/node_modules/${PACKAGE}"
exec_cmd "cat << EOF > /lib/systemd/system/nextepc-webui.service
[Unit]
Description=NextEPC WebUI
BindTo=mongodb.service
After=networking.service mongodb.service
[Service]
Type=simple
WorkingDirectory=/usr/lib/node_modules/nextepc
Environment=NODE_ENV=production
ExecStart=/usr/bin/node server/index.js
Restart=always
RestartSec=2
[Install]
WantedBy=multi-user.target
EOF"
exec_cmd_nobail "systemctl daemon-reload"
exec_cmd "systemctl enable nextepc-webui"
exec_cmd "deb-systemd-invoke start nextepc-webui"
exec_cmd "rm -rf ./${PACKAGE}-${VERSION}"
}
## Defer setup until we have the complete script
install

View File

@ -0,0 +1,27 @@
#!/bin/bash
# Refer to Node.js install script
#
# Run as root or insert `sudo -E` before `bash`:
#
# curl -sL http://nextepc.org/static/uninstall_webui.sh | bash -
# or
# wget -qO- http://nextepc.org/static/uninstall_webui.shx | bash -
#
exec_cmd_nobail() {
echo "+ $1"
bash -c "$1"
}
uninstall() {
exec_cmd_nobail "deb-systemd-invoke stop nextepc-webui"
exec_cmd_nobail "systemctl disable nextepc-webui"
exec_cmd_nobail "rm -f /lib/systemd/system/nextepc-webui.service"
exec_cmd_nobail "rm -rf /usr/lib/node_modules/nextepc"
exec_cmd_nobail "systemctl daemon-reload"
}
## Defer setup until we have the complete script
uninstall