Project

General

Profile

Kernel GTP » History » Version 4

laforge, 04/24/2018 05:03 PM
s/starce/strace/

1 3 laforge
h1. OpenGGSN and Linux Kernel accelerated GTP-U
2 2 laforge
3
OpenGGSN 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.
4
5
For more information about the Linux kernel GTP-U code, please see [[linux-kernel-gtp-u:]]
6
7 1 laforge
h2. Building OpenGGSN with kernel which has GTP-U support
8
9
At the time of writing (2017-01-09) of this wiki, below listed distributions have support of GTP kernels :
10
11
* Debian 4.9.1-1~exp1 - Debian's latest experimental build 
12
* Ubuntu 16.10 kernel 4.8
13
* OpenSUSE Tumbleweed (stable) 4.8 (.12)
14
* Fedora 25 kernel 4.8 
15
16
Following two Debian kernels do not activate GTP kernel module during build: 4.8.0 and 4.9.0.
17
18
*It is expected that complete openbsc project and related dependencies are pre-installed.*
19
20
Check if package @libc-ares-dev@ is installed and if not please add it.
21
22
Ubuntu 16.10, kernel 4.8.0-30-generic is used. 
23
24
* Installing dependencies and build library @libgtpnl@
25
26
You can install those packages with:
27
28
<pre>
29
sudo apt install libtalloc-dev libpcsclite libmnl-dev
30
</pre>
31
32
Please follow instructions provided at [[cellular-infrastructure:Build from source]] in order to install following library and projects :
33
34
Information about dependencies between Osmocom projects is given at the above link:
35
36
* libgtpnl
37
38
<pre>
39
  sudo make install
40
  sudo ldconfig
41
</pre>
42
43
* libosmocore 
44
* openggsn
45
46
<pre>
47
./configure --enable-gtp-linux
48
make 
49
sudo make install
50
sudo ldconfig
51
</pre>
52
53
Following message is shown at end of the command: @ ./configure --enable-gtp-linux@ 
54
55
<pre>
56
openggsn Configuration:
57
  GTP Linux kernel support:			yes
58
</pre>
59
60
This means that appropriate header files are available.
61
62
h2. Using OpenGGSN with kernel which has GTP-U support
63
64
In order to find out whether gtp.ko module is available we can enter following command:
65
66
<pre>
67
find /lib/modules/`uname -r` -name gtp.ko
68
</pre>
69
70
Output below shows that gtp.ko module is present:
71
72
<pre>
73
/lib/modules/4.8.0-30-generic/kernel/drivers/net/gtp.ko
74
</pre>
75
76
77
We are loading module gtp from kernel issuing command: <pre>sudo modprobe gtp </pre> 
78
79
when you enter: 
80
<pre>
81
lsmod | grep gtp
82
</pre>
83
84
then more information about gtp and related udp tunnel can be obtained:
85
86
<pre>
87
gtp                    28672  0
88
udp_tunnel             16384  1 gtp
89
</pre>
90
91
92
Some helpful tools are available in: @libgtpnl/tools@
93
94
you can get more details about gtp-tunnel, entering command from the OpenGGSN shell:
95
96
<pre>
97
98
sudo ./gtp-tunnel list
99
100
</pre>
101
102
Output will be similar to:
103
<pre>
104
105
version 1 tei 1/0 ms_addr 192.168.0.2 sgsn_addr 127.0.0.2
106
107
</pre>
108
109
110
111 4 laforge
Furthermore we can use: <pre> sudo strace ggsn --gtp-linux -c ggsn.conf -f -d </pre>  to determine if Ubuntu 16.10, kernel 4.8.0-30 is in use.   
112 1 laforge
113
Next two cases shall be considered as an indication whether gtp kernel module is active:
114
115
** If gtp kernel module is active then we can see the strace output just when PDP context activation or deactivation is done.
116
117
** If gtp kernel module is not active then we can see the strace output constantly running on the screen. 
118
119
120
Note: OpenGGSN is started by: 
121
<pre>
122
sudo  ggsn --gtp-linux -c ggsn.conf -f -d
123
</pre>
124
125
-d option is useful for debugging purposes. 
126
127
Related output should be similar to the one shown below: 
128
129
<pre>
130
conf: ggsn.conf
131
fg: 1
132
debug: 1
133
qos: 0x0b921f
134
apn: internet
135
net: 192.168.0.0/24
136
pidfile: /var/run/ggsn.pid
137
statedir: /var/lib/ggsn/
138
gtp_linux: 1
139
timelimit: 0
140
cmdline_parser_configfile
141
listen: 127.0.0.1
142
conf: ggsn.conf
143
fg: 1
144
debug: 1
145
qos: 0x0b921f
146
apn: internet
147
net: 192.168.0.0/24
148
pidfile: /var/run/ggsn.pid
149
statedir: /var/lib/ggsn/
150
gtp-linux: 1
151
timelimit: 0
152
<000c> gtp.c:701 GTP: gtp_newgsn() started
153
<0002> gtp-kernel.c:123 Using the GTP kernel mode (genl ID is 27)
154
155
<0002> gtp-kernel.c:156 GTP kernel configured
156
157
<000b> control_if.c:693 CTRL at 127.0.0.1 4257
158
</pre>
159
160
osmosgsn can be started with: 
161
162
<pre>
163
sudo osmo-sgsn -c sgsn.cfg    
164
</pre>
165
166
- d option is also available ins osmo-sgsn command. 
167
168
Additional information related to setup of openbsc and GPRS setup is available [[cellular-infrastructure:OpenBSC GPRS]]
169
 
170
For clarity purposes configuration files of openbsc, OpenGGSN, osmosgsn and sysmoBTS are added.
Add picture from clipboard (Maximum size: 48.8 MB)