Project

General

Profile

OsmoGGSN » History » Version 18

wirelesss, 01/09/2017 04:19 PM

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