Kernel GTP » History » Revision 9
« Previous |
Revision 9/12
(diff)
| Next »
osmith, 03/01/2021 02:57 PM
add example output
OsmoGGSN and Linux Kernel accelerated GTP-U¶
- Table of contents
- 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 OsmoGGSN.
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 OsmoGGSN 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 OsmoGGSN 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.cfg
Related output should be similar to the one shown below:
<0002> ggsn.c:186 APN(internet): Starting <0002> ggsn.c:204 APN(internet): Opening Kernel GTP device tun4 <0002> ggsn.c:215 APN(internet): Skipping APN start <0002> ggsn.c:794 GGSN(ggsn0): Starting GGSN <000d> gtp.c:902 GTP: gtp_newgsn() started at 127.0.0.2 <0002> ggsn.c:830 GGSN(ggsn0): Successfully started <0002> ggsn.c:186 APN(internet): Starting <0002> ggsn.c:204 APN(internet): Opening Kernel GTP device tun4 <0002> gtp-kernel.c:79 Initialized GTP kernel mode (genl ID is 25) <0001> tun.c:217 GTP kernel configured <0002> ggsn.c:236 APN(internet): Setting tun IP address 172.16.222.0/24 <0002> ggsn.c:294 APN(internet): Creating IPv4 pool 172.16.222.0/24 <0002> ggsn.c:168 APN(internet): Blacklist tun IP 172.16.222.0/24 <0002> ggsn.c:325 APN(internet): Successfully started <0005> telnet_interface.c:104 Available via telnet 127.0.0.1 4260 <000c> control_if.c:916 CTRL at 127.0.0.1 4257
You can now start to establish PDP contexts to your new osmo-ggsn instance, from OsmoSGSN, sgsnemu
or third-party SGSNs
Updated by osmith over 3 years ago · 9 revisions