Project

General

Profile

OsmoGGSN and Linux Kernel accelerated GTP-U

OsmoGGSN has support to use the Linux kernel GTP-U code to accelerate the data/user plane while still implementing the control plane (GTP-C) in userspace in OpenGGSN.

For more information about the Linux kernel GTP-U code, please see linux-kernel-gtp-u

Building OsmoGGSN with kernel which has GTP-U support

At the time of writing (2018-04-26) of this wiki, below listed distributions have support of GTP kernels :

  • Debian
    • Debian 9 "stretch" (kernel 4.9.0-6)
    • Debian "unstable"
  • Ubuntu
    • Ubuntu 16.04 "xenial" (kernel 4.8, 4.10, 4.13)
    • Ubuntu 17.10 "artful" (kernel 4.13)
  • OpenSUSE
    • OpenSUSE Tumbleweed (kernel "stable" 4.8, 4.12)
  • Fedora

If you're using any other distribution, or are building your own kernels, please verify that CONFIG_GTP is set to either m or y.

If CONFIG_GTP is not enabled, you cannot use kernel GTP-U!

Check if package libc-ares-dev is installed and if not please add it.

Installing dependencies and build library libosmocore

You can install required dependency packages with:

sudo apt install libtalloc-dev libpcsclite-dev

Please follow instructions provided at Build from source in order to install libosmocore

Installing dependencies and build library libgtpnl

You can install dependencies with:

sudo apt install libmnl-dev

Then build libgtpnl like this

git clone git://git.osmocom.org/libgtpnl.git
cd libgtpnl
autoreconf -fi
./configure
make
sudo make install
sudo ldconfig

osmo-ggsn

Build OsmoGGSN like this:

git clone git://git.osmocom.org/osmo-ggsn.git
cd osmo-ggsn
./configure --enable-gtp-linux
make
sudo make install
sudo ldconfig

Following message is shown at end of the command: ./configure --enable-gtp-linux

OsmoGGSN Configuration:
  GTP Linux kernel support:            yes

This means that appropriate header files are available.

Using OpenGGSN with kernel which has GTP-U support

In order to find out whether gtp.ko module is available we can enter following command:

find /lib/modules/`uname -r` -name gtp.ko

Output below shows that gtp.ko module is present:

/lib/modules/4.8.0-30-generic/kernel/drivers/net/gtp.ko

We are loading module gtp from kernel issuing command:

sudo modprobe gtp

when you enter:

lsmod | grep gtp

then more information about gtp and related udp tunnel can be obtained:

gtp                    28672  0
udp_tunnel             16384  1 gtp

Some helpful tools are available in: libgtpnl/tools

you can get more details about gtp-tunnel, entering command from the OpenGGSN shell:

sudo ./gtp-tunnel list

Output will be similar to:

version 1 tei 1/0 ms_addr 192.168.0.2 sgsn_addr 127.0.0.2

Note: OsmoGGSN is started by:

sudo osmo-ggsn -c osmo-ggsn.conf

Related output should be similar to the one shown below:

FIXME

You can now start to establish PDP contexts to your new osmo-ggsn instance, from OsmoSGSN, sgsnemu or third-party SGSNs

Add picture from clipboard (Maximum size: 48.8 MB)