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 2 laforge
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 3 laforge
9 3 laforge
The source code is maintained in the osmcoom git at http://git.osmocom.org/openggsn/
10 3 laforge
11 3 laforge
h2. Binary packages
12 1 laforge
13 1 laforge
OpenGGSN packages are created as part of the Osmocom nightly debian builds, see [[cellular-infrastructure:NightlyBuilds]]
14 4 laforge
15 4 laforge
h2. Support / mailing lists
16 4 laforge
17 4 laforge
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 18 wirelesss
23 18 wirelesss
* Debian 4.9.1-1~exp1 - Debian's latest experimental build 
24 18 wirelesss
* Ubuntu 16.10 kernel 4.8
25 18 wirelesss
* OpenSUSE Tumbleweed (stable) 4.8 (.12)
26 18 wirelesss
* Fedora 25 kernel 4.8 
27 18 wirelesss
28 18 wirelesss
Following two Debian kernels do not activate GTP kernel module during build: 4.8.0 and 4.9.0.
29 18 wirelesss
30 18 wirelesss
*It is expected that complete openbsc project and related dependencies are pre-installed.*
31 18 wirelesss
32 18 wirelesss
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 5 wirelesss
36 5 wirelesss
* Installing dependencies and build library @libgtpnl@
37 5 wirelesss
38 6 wirelesss
You can install those packages with:
39 5 wirelesss
40 5 wirelesss
<pre>
41 5 wirelesss
sudo apt install libtalloc-dev libpcsclite libmnl-dev
42 5 wirelesss
</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 6 wirelesss
48 5 wirelesss
* libgtpnl
49 5 wirelesss
50 5 wirelesss
<pre>
51 5 wirelesss
  sudo make install
52 5 wirelesss
  sudo ldconfig
53 5 wirelesss
</pre>
54 5 wirelesss
55 5 wirelesss
* libosmocore 
56 5 wirelesss
* openggsn
57 5 wirelesss
58 5 wirelesss
<pre>
59 1 laforge
./configure --enable-gtp-linux
60 8 wirelesss
make 
61 8 wirelesss
sudo make install
62 8 wirelesss
sudo ldconfig
63 5 wirelesss
</pre>
64 5 wirelesss
65 14 wirelesss
Following message is shown at end of the command: @ ./configure --enable-gtp-linux@ 
66 5 wirelesss
67 5 wirelesss
<pre>
68 5 wirelesss
openggsn Configuration:
69 5 wirelesss
  GTP Linux kernel support:			yes
70 6 wirelesss
</pre>
71 6 wirelesss
72 6 wirelesss
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 7 wirelesss
In order to find out whether gtp.ko module is available we can enter following command:
77 1 laforge
78 7 wirelesss
<pre>
79 7 wirelesss
find /lib/modules/`uname -r` -name gtp.ko
80 7 wirelesss
</pre>
81 7 wirelesss
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 1 laforge
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 11 wirelesss
lsmod | grep gtp
94 11 wirelesss
</pre>
95 7 wirelesss
96 17 wirelesss
then more information about gtp and related udp tunnel can be obtained:
97 7 wirelesss
98 7 wirelesss
<pre>
99 7 wirelesss
gtp                    28672  0
100 7 wirelesss
udp_tunnel             16384  1 gtp
101 1 laforge
</pre>
102 1 laforge
103 1 laforge
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 1 laforge
sudo ./gtp-tunnel list
111 1 laforge
112 16 wirelesss
</pre>
113 16 wirelesss
114 16 wirelesss
Output will be similar to:
115 16 wirelesss
<pre>
116 16 wirelesss
117 15 wirelesss
version 1 tei 1/0 ms_addr 192.168.0.2 sgsn_addr 127.0.0.2
118 15 wirelesss
119 1 laforge
</pre>
120 13 wirelesss
121 13 wirelesss
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 13 wirelesss
125 13 wirelesss
Next two cases shall be considered as an indication whether gtp kernel module is active:
126 13 wirelesss
127 13 wirelesss
** If gtp kernel module is active then we can see the strace output just when PDP context activation or deactivation is done.
128 13 wirelesss
129 13 wirelesss
** If gtp kernel module is not active then we can see the strace output constantly running on the screen. 
130 13 wirelesss
131 13 wirelesss
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 1 laforge
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 13 wirelesss
141 1 laforge
<pre>
142 13 wirelesss
conf: ggsn.conf
143 13 wirelesss
fg: 1
144 13 wirelesss
debug: 1
145 13 wirelesss
qos: 0x0b921f
146 13 wirelesss
apn: internet
147 13 wirelesss
net: 192.168.0.0/24
148 13 wirelesss
pidfile: /var/run/ggsn.pid
149 13 wirelesss
statedir: /var/lib/ggsn/
150 13 wirelesss
gtp_linux: 1
151 13 wirelesss
timelimit: 0
152 13 wirelesss
cmdline_parser_configfile
153 13 wirelesss
listen: 127.0.0.1
154 13 wirelesss
conf: ggsn.conf
155 13 wirelesss
fg: 1
156 13 wirelesss
debug: 1
157 13 wirelesss
qos: 0x0b921f
158 13 wirelesss
apn: internet
159 13 wirelesss
net: 192.168.0.0/24
160 13 wirelesss
pidfile: /var/run/ggsn.pid
161 13 wirelesss
statedir: /var/lib/ggsn/
162 13 wirelesss
gtp-linux: 1
163 13 wirelesss
timelimit: 0
164 13 wirelesss
<000c> gtp.c:701 GTP: gtp_newgsn() started
165 13 wirelesss
<0002> gtp-kernel.c:123 Using the GTP kernel mode (genl ID is 27)
166 13 wirelesss
167 13 wirelesss
<0002> gtp-kernel.c:156 GTP kernel configured
168 13 wirelesss
169 13 wirelesss
<000b> control_if.c:693 CTRL at 127.0.0.1 4257
170 1 laforge
</pre>
171 1 laforge
172 13 wirelesss
osmosgsn can be started with: 
173 1 laforge
174 13 wirelesss
<pre>
175 13 wirelesss
sudo osmo-sgsn -c sgsn.cfg    
176 13 wirelesss
</pre>
177 13 wirelesss
178 1 laforge
- d option is also available ins osmo-sgsn command. 
179 13 wirelesss
180 13 wirelesss
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)