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 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 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 5 wirelesss
25 5 wirelesss
* Installing dependencies and build library @libgtpnl@
26 5 wirelesss
27 6 wirelesss
You can install those packages with:
28 5 wirelesss
29 5 wirelesss
<pre>
30 5 wirelesss
sudo apt install libtalloc-dev libpcsclite libmnl-dev
31 5 wirelesss
</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 6 wirelesss
37 5 wirelesss
* libgtpnl
38 5 wirelesss
39 5 wirelesss
<pre>
40 5 wirelesss
  sudo make install
41 5 wirelesss
  sudo ldconfig
42 5 wirelesss
</pre>
43 5 wirelesss
44 5 wirelesss
* libosmocore 
45 5 wirelesss
* openggsn
46 5 wirelesss
47 5 wirelesss
<pre>
48 1 laforge
./configure --enable-gtp-linux
49 8 wirelesss
make 
50 8 wirelesss
sudo make install
51 8 wirelesss
sudo ldconfig
52 5 wirelesss
</pre>
53 5 wirelesss
54 14 wirelesss
Following message is shown at end of the command: @ ./configure --enable-gtp-linux@ 
55 5 wirelesss
56 5 wirelesss
<pre>
57 5 wirelesss
openggsn Configuration:
58 5 wirelesss
  GTP Linux kernel support:			yes
59 6 wirelesss
</pre>
60 6 wirelesss
61 6 wirelesss
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 7 wirelesss
In order to find out whether gtp.ko module is available we can enter following command:
66 1 laforge
67 7 wirelesss
<pre>
68 7 wirelesss
find /lib/modules/`uname -r` -name gtp.ko
69 7 wirelesss
</pre>
70 7 wirelesss
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 1 laforge
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 11 wirelesss
lsmod | grep gtp
83 11 wirelesss
</pre>
84 7 wirelesss
85 8 wirelesss
give us information about gtp and related udp tunnel:
86 7 wirelesss
87 7 wirelesss
<pre>
88 7 wirelesss
gtp                    28672  0
89 7 wirelesss
udp_tunnel             16384  1 gtp
90 1 laforge
</pre>
91 1 laforge
92 1 laforge
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 1 laforge
sudo ./gtp-tunnel list
100 1 laforge
101 16 wirelesss
</pre>
102 16 wirelesss
103 16 wirelesss
Output will be similar to:
104 16 wirelesss
<pre>
105 16 wirelesss
106 15 wirelesss
version 1 tei 1/0 ms_addr 192.168.0.2 sgsn_addr 127.0.0.2
107 15 wirelesss
108 1 laforge
</pre>
109 13 wirelesss
110 13 wirelesss
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 13 wirelesss
114 13 wirelesss
Next two cases shall be considered as an indication whether gtp kernel module is active:
115 13 wirelesss
116 13 wirelesss
** If gtp kernel module is active then we can see the strace output just when PDP context activation or deactivation is done.
117 13 wirelesss
118 13 wirelesss
** If gtp kernel module is not active then we can see the strace output constantly running on the screen. 
119 13 wirelesss
120 13 wirelesss
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 1 laforge
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 13 wirelesss
130 1 laforge
<pre>
131 13 wirelesss
conf: ggsn.conf
132 13 wirelesss
fg: 1
133 13 wirelesss
debug: 1
134 13 wirelesss
qos: 0x0b921f
135 13 wirelesss
apn: internet
136 13 wirelesss
net: 192.168.0.0/24
137 13 wirelesss
pidfile: /var/run/ggsn.pid
138 13 wirelesss
statedir: /var/lib/ggsn/
139 13 wirelesss
gtp_linux: 1
140 13 wirelesss
timelimit: 0
141 13 wirelesss
cmdline_parser_configfile
142 13 wirelesss
listen: 127.0.0.1
143 13 wirelesss
conf: ggsn.conf
144 13 wirelesss
fg: 1
145 13 wirelesss
debug: 1
146 13 wirelesss
qos: 0x0b921f
147 13 wirelesss
apn: internet
148 13 wirelesss
net: 192.168.0.0/24
149 13 wirelesss
pidfile: /var/run/ggsn.pid
150 13 wirelesss
statedir: /var/lib/ggsn/
151 13 wirelesss
gtp-linux: 1
152 13 wirelesss
timelimit: 0
153 13 wirelesss
<000c> gtp.c:701 GTP: gtp_newgsn() started
154 13 wirelesss
<0002> gtp-kernel.c:123 Using the GTP kernel mode (genl ID is 27)
155 13 wirelesss
156 13 wirelesss
<0002> gtp-kernel.c:156 GTP kernel configured
157 13 wirelesss
158 13 wirelesss
<000b> control_if.c:693 CTRL at 127.0.0.1 4257
159 1 laforge
</pre>
160 1 laforge
161 13 wirelesss
osmosgsn can be started with: 
162 1 laforge
163 13 wirelesss
<pre>
164 13 wirelesss
sudo osmo-sgsn -c sgsn.cfg    
165 13 wirelesss
</pre>
166 13 wirelesss
167 1 laforge
- d option is also available ins osmo-sgsn command. 
168 13 wirelesss
169 13 wirelesss
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)