Project

General

Profile

OsmoGGSN » History » Version 16

wirelesss, 12/30/2016 10:06 AM

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