Project

General

Profile

Kernel GTP » History » Revision 8

Revision 7 (osmith, 01/28/2021 10:35 AM) → Revision 8/12 (osmith, 02/23/2021 03:25 PM)

h1. OsmoGGSN and Linux Kernel accelerated GTP-U 

 {{>toc}} 

 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. OpenGGSN. 

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

 h2. 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 
 ** Fedora 25 (kernel 4.13 "kconfig":https://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git/diff/fedora/configs/kernel-4.13.16-x86_64.config?h=f25&id=c7f8c6df25a148b887515787667c75e18fa9790d) 
 ** Fedora 26 (kernel 4.15 "kconfig":https://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git/diff/fedora/configs/kernel-4.15.18-x86_64.config?h=f26&id=7b0ed3e9a5d6773dddcc904c1d4e67c1307f02dd) 
 ** Fedora 27 (kernel 4.16 "kconfig":https://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git/tree/fedora/configs/kernel-4.16.4-x86_64.config?h=f27&id=d06904e7457b50b9cfc108667b5b65777a43cc75) 

 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. 

 h3. Installing dependencies and build library @libosmocore@ 

 You can install required dependency packages with: 

 <pre> 
 $ sudo apt install libtalloc-dev libpcsclite-dev 
 </pre> 

 Please follow instructions provided at [[cellular-infrastructure:Build from source]] in order to install libosmocore 


 h3.    Installing dependencies and build library @libgtpnl@ 

 You can install dependencies with: 

 <pre> 
 $ sudo apt install libmnl-dev 
 </pre> 

 Then build libgtpnl like this 
 <pre> 
 $ git clone git://git.osmocom.org/libgtpnl.git 
 $ cd libgtpnl 
 $ autoreconf -fi 
 $ ./configure 
 $ make 
 $ sudo make install 
 $ sudo ldconfig 
 </pre> 

 h3. osmo-ggsn 

 Build OsmoGGSN like this: 

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

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

 <pre> 
 OsmoGGSN Configuration: 
   GTP Linux kernel support: 			 yes 
 </pre> 

 This means that appropriate header files are available. 

 h2. Using OsmoGGSN OpenGGSN with kernel which has GTP-U support 

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

 <pre> 
 $ find /lib/modules/$(uname -r) /lib/modules/`uname -r` -name gtp.ko 
 </pre> 

 Output below shows that gtp.ko module is present: 

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


 We are loading module gtp from kernel issuing command: <pre>sudo modprobe gtp</pre>  

 when you enter:  
 <pre> 
 $ lsmod | grep gtp 
 </pre> 

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

 <pre> 
 gtp                      28672    0 
 udp_tunnel               16384    1 gtp 
 </pre> 


 Some helpful tools are available in: @libgtpnl/tools@ 

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

 <pre> 
 $ sudo ./gtp-tunnel list 
 </pre> 

 Output will be similar to: 
 <pre> 
 version 1 tei 1/0 ms_addr 192.168.0.2 sgsn_addr 127.0.0.2 
 </pre> 

 Note: OsmoGGSN is started by:  
 <pre> 
 $ sudo osmo-ggsn -c osmo-ggsn.cfg 
 </pre> 

 Related output should be similar to the one shown below:  

 <pre> 
 FIXME 
 </pre> 

 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)