Project

General

Profile

Kernel GTP » History » Version 1

laforge, 02/23/2017 05:55 PM

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