blob: d2a412c458e4827a6532ba83c1239ca40120aec6 [file] [log] [blame]
jjako52c24142002-12-16 13:33:51 +00001*** QuickStart ***
2
3REQUIREMENTS
4
jjako0ac82a12003-01-05 18:36:33 +00005Linux
jjako52c24142002-12-16 13:33:51 +00006OpenGGSN was developed and tested using Redhat 7.1 and Redhat
77.2. It should run also on other Linux distributions as well as
8FreeBSD and Solaris, but this is untested. Please tell me of any
9testing results.
10
11Tun
12Both ggsn and sgsnemu uses the tun package. You need at least tun
13version 1.1. See http://vtun.sourceforge.net/tun/ for instructions on
jjako0ac82a12003-01-05 18:36:33 +000014installation. Tun is included in the kernel from early version 2.4, so
jjakob3061692003-01-14 17:13:26 +000015you will not normally need to install it. For Redhat 7.1, 7.2 and 8.0
16you do however need to do the following:
jjako0ac82a12003-01-05 18:36:33 +000017mkdir /dev/net
18mknod /dev/net/tun c 10 200
jjakobcbfb412003-01-06 21:21:03 +000019Add this line to /etc/modules.conf: alias char-major-10-200 tun
jjako0ac82a12003-01-05 18:36:33 +000020depmod -a
jjako52c24142002-12-16 13:33:51 +000021
jjako0ac82a12003-01-05 18:36:33 +000022
23COMPILATION and INSTALLATION
jjako52c24142002-12-16 13:33:51 +000024
jjakob3061692003-01-14 17:13:26 +0000251 ./configure
262 cd gtp
273 make
284 make install
295 cd ..
306 make
317 make install
328 Add /usr/local/lib to /etc/ld.so.conf
339 Run ldconfig
34
35You need to be root in order to install the package, but not in order
36to compile.
37
38Steps 2 to 5 are only needed the first time you install the
39package. Most likely steps 8 and 9 can be omitted as the path to
40libgtp is now included in Makefile.am for sgsnemu and ggsn.
jjakobcbfb412003-01-06 21:21:03 +000041
jjako52c24142002-12-16 13:33:51 +000042RUNNING
43
44sgsnemu
45Edit the configuration file sgsnemu.conf found under
jjako0ac82a12003-01-05 18:36:33 +000046openggsn/examples. Use sgsnemu -h for a list of available options.
jjakob3061692003-01-14 17:13:26 +000047Start the emulator as root using the command:
jjako52c24142002-12-16 13:33:51 +000048
jjako0ac82a12003-01-05 18:36:33 +000049 sgsnemu -c examples/sgsnemu.conf -l 10.20.30.50 -r 10.20.30.40
jjako52c24142002-12-16 13:33:51 +000050
51This will cause the sgsn emulator to bind to local address 10.20.30.50
52and connect to the ggsn found at 10.20.30.40. It will first send off
jjakobcbfb412003-01-06 21:21:03 +000053an ECHO_REQUEST message. After this it will attempt to establish a pdp
jjako52c24142002-12-16 13:33:51 +000054context. If successful it will create a local interface and set up
55routing. Now you should be able to ping through the connection. Use a
56network analysator such as ethereal to monitor the traffic.
57
58ggsn
jjako0ac82a12003-01-05 18:36:33 +000059Edit the configuration file ggsn.conf found under
60openggsn/examples. Use sgsnemu -h for a list of available options.
jjakob3061692003-01-14 17:13:26 +000061Start the ggsn as root using the command:
jjako0ac82a12003-01-05 18:36:33 +000062
63 ggsn --fg -c examples/ggsn.conf -l 10.20.30.40 --statedir .
64
jjako52c24142002-12-16 13:33:51 +000065This will run the ggsn in foreground using the local interface
jjakobcbfb412003-01-06 21:21:03 +00006610.20.30.40. Of cause you can use sgsnemu to test the GGSN.
67
68
69SUPPORT
70If you have any questions drop me a line at jj@openggsn.org.
jjako52c24142002-12-16 13:33:51 +000071
72
73*** Features ***
74
75OpenGGSN is an open source implementation of GPRS Support Nodes
76(GSNs). It implements the GPRS tunneling protocol (GTP) version 0.
77
78OpenGGSN provides 3 components:
79* gtplib
80* ggsn
81* sgsnemu
82
83gtplib
jjako0ac82a12003-01-05 18:36:33 +000084This library contains all functionality relating to the GTP
jjako52c24142002-12-16 13:33:51 +000085protocol. Use this libraty if you want to implement your own
jjakobcbfb412003-01-06 21:21:03 +000086GSN. Currently gtplib supports GTPv0. At the moment no interface
87documentation is available for download.
jjako52c24142002-12-16 13:33:51 +000088
89ggsn
jjako0ac82a12003-01-05 18:36:33 +000090The ggsn implements a Gateway GPRS Support Node. The GGSN is a small
91application which is provided in order to test and demonstrate the use
92of gtplib. It is fully compliant to the 3GPP standards, but lacks
93important functionality such as charging and management. Use this
jjako52c24142002-12-16 13:33:51 +000094application as a starting point if you want to build your own GGSN
95with your own fancy VPN, management and charging functionality.
96
jjako0ac82a12003-01-05 18:36:33 +000097sgsnemu
98This application emulates a Serving GPRS Support Node (SGSN). sgsnemu
jjakobcbfb412003-01-06 21:21:03 +000099enables you to test your 3GPP core network without the need to invest
jjako52c24142002-12-16 13:33:51 +0000100in a 3G radio access network. An important application of sgsnemu is
101the testing of roaming connectivity through a GPRS roaming exchange.
102
jjako0ac82a12003-01-05 18:36:33 +0000103
jjako52c24142002-12-16 13:33:51 +0000104*** Required software ***
105
jjakobcbfb412003-01-06 21:21:03 +0000106TUN (http://vtun.sourceforge.net/tun/)
jjako52c24142002-12-16 13:33:51 +0000107
108Both ggsn and sgsnemu uses the tun package. You need at least tun
jjako0ac82a12003-01-05 18:36:33 +0000109version 1.1. See the above web page for instructions on
110installation. Tun is included in the kernel from early version 2.4, so
jjakob3061692003-01-14 17:13:26 +0000111you will not normally need to install it. For Redhat 7.1, 7.2 and 8.0
112you do however need to do the following:
jjako0ac82a12003-01-05 18:36:33 +0000113mkdir /dev/net
114mknod /dev/net/tun c 10 200
115Add the following line to /etc/modules.conf: alias char-major-10-200 tun
116depmod -a
117
jjako52c24142002-12-16 13:33:51 +0000118
jjakobcbfb412003-01-06 21:21:03 +0000119GENGETOPT (http://www.gnu.org/software/gengetopt/gengetopt.html)
jjako52c24142002-12-16 13:33:51 +0000120
121Gengetopt is required if you want to change the options defined in the
jjakobcbfb412003-01-06 21:21:03 +0000122cmdline.ggo source file. You need at least gengetopt version 2.8. If
123you are just going to compile the programs you don't need gengetopt.
jjako52c24142002-12-16 13:33:51 +0000124
jjako0ac82a12003-01-05 18:36:33 +0000125To use gengetopt for the ggsn do the following:
jjako52c24142002-12-16 13:33:51 +0000126cd ggsn
jjako0ac82a12003-01-05 18:36:33 +0000127gengetopt < cmdline.ggo --conf-parser
jjako52c24142002-12-16 13:33:51 +0000128
jjako0ac82a12003-01-05 18:36:33 +0000129To use gengetopt for the sgsnemu do the following:
jjako52c24142002-12-16 13:33:51 +0000130cd sgsnemu
jjako0ac82a12003-01-05 18:36:33 +0000131gengetopt < cmdline.ggo --conf-parser
jjako52c24142002-12-16 13:33:51 +0000132
jjako52c24142002-12-16 13:33:51 +0000133
134*** Compilation and Installation ***
135
jjakob3061692003-01-14 17:13:26 +0000136SETTING UP AUTOTOOLS
137
138You do not need to perform this step if you are only going to compile
139the package:
140
1410 Get version from somewhere: Script to extract version from configure.ac
1421 Copy the latest config.guess and config.sub from ftp://ftp.gnu.org/gnu/config
1432 Run autoscan and copy configure.scan to configure.ac
1443 Add/edit the following lines in configure.ac:
145 AC_INIT(openggsn, 0.52, jj@openggsn.org)
146 AC_CONFIG_SRCDIR([gtp/gtp.c])
147 AM_CONFIG_HEADER([config.h])
148 AC_PROG_LIBTOOL
149 AM_PROG_LIBTOOL
150 AM_INIT_AUTOMAKE()
1514 libtoolize --automake --copy
152 (ads copy of ltmain.sh)
1535 aclocal
1546 autoheader
1557 automake --add-missing
156 (Ads link to missing, install-sh, depcomp)
1578 automake
1589 autoconf
159
160The above will initialise the project to the current version of
161autotools (As installed in RedHat 8.0). See
162http://sources.redhat.com/autobook/autobook/autobook_25.html#SEC25
163for details on autotools.
jjako52c24142002-12-16 13:33:51 +0000164
165
jjakob3061692003-01-14 17:13:26 +0000166COMPILATION AND INSTALLATION
167
168 1 ./configure
169 2 make clean
170 3 cd gtp
171 4 make
172 5 make install (as root)
173 6 cd ..
174 (Step 3 to 6 you only need to run the first time to install libgtp)
175 7 make
176 8 make install (as root)
177 9 Add /usr/local/lib to /etc/ld.so.conf
17810 run ldconfig
179 (Step 9 and 10 are not required as path to libgtp is included in Makefile)
180
jjako52c24142002-12-16 13:33:51 +0000181
182*** Running ggsn ***
jjakobcbfb412003-01-06 21:21:03 +0000183
184Use ggsn -h for a list of available options. All options available on
185the command line can also be given in a configuration file. See
186examples/ggsn.conf for the format of this file.
jjako52c24142002-12-16 13:33:51 +0000187
188*** Running sgsnemu ***
jjakobcbfb412003-01-06 21:21:03 +0000189
190Use sgsnemu -h for a list of available options. All options available
191on the command line can also be given in a configuration file. See
192examples/sgsnemu.conf for the format of this file.
193
194If you want to test a GRX roaming connection you will need to do the
195following:
196
1971) Install sgsnemu on a Linux Box. See under installation above.
198
1992) Connect your Linux box with sgsnemu installed to the GPRS core
200network. Use the same LAN switch as the one your SGSN is connected
201to. You also need a free IP address that can be used by sgsnemu.
202
2033) You need to configure networking in terms of interface address,
204subnet mask and default route. See the Linux Networking HOWTO for
205details.
206
2074) Launch sgsnemu with something like:
208
209 sgsnemu --fg --listen 10.20.30.50 --remote 10.20.30.40 --dns 10.20.38.51 --timelimit 10 --contexts 0
210
211sgsnemu will print something like the following on the screen:
212
213 Using DNS server: 10.20.38.51 (10.20.38.51)
214 Local IP address is: 10.20.30.50 (10.20.30.50)
215 Remote IP address is: 10.20.30.40 (10.20.30.40)
216 IMSI is: 240011234567890 (0x98765432110042)
217 Using APN: internet
218 Using MSISDN: 46702123456
219
220 Initialising GTP library
221 OpenGGSN[1823]: GTP: gtp_newgsn() started
222 Done initialising GTP library
223
224 Sending off echo request
225 Waiting for response from ggsn........
226
227 Received echo response. Cause value: 0
228
229This is quite good. It means that you managed to send off an echo
230request to a remote GGSN, and it was friendly enough to answer you. If
231you did not get an echo response it means that something is wrong
232either with your setup OR with the GRX connection OR with your roaming
233partners connection.
234
235If the above went well you might want to try to establish a PDP
236context to the remote GGSN. Note that you should be carefull when
237establishing PDP contexts using sgsnemu as each established PDP
238context will result in a Charge Detail Record (CDR) being generated by
239the GGSN. You should use real IMSI and MSISDN from a valid test SIM
240card. Otherwise some poor customer might get charged for your
241testing. Also note that you are establishing a connection to the Gi
242netowrk, so please be carefull not to route internet traffic onto the
243GPRS core network! Assuming you know what you are doing:
244
245 sgsnemu --fg --listen 10.20.30.50 --remote 10.20.30.40 --dns 10.20.38.51 --timelimit 10 --contexts 1 --apn internet --imsi 240011234567890 --msisdn 46702123456 --net 192.168.0.0 --mask 255.255.255.0
246
247sgsnemu will print something like the following on the screen:
248
249 Using DNS server: 10.20.38.51 (10.20.38.51)
250 Local IP address is: 10.20.30.50 (10.20.30.50)
251 Remote IP address is: 10.20.30.40 (10.20.30.40)
252 IMSI is: 240011234567890 (0x98765432110042)
253 Using APN: internet
254 Using MSISDN: 46702123456
255
256 Initialising GTP library
257 OpenGGSN[1838]: GTP: gtp_newgsn() started
258 Done initialising GTP library
259
260 Sending off echo request
261 Setting up PDP context #0
262 Waiting for response from ggsn........
263
264 Received echo response. Cause value: 0
265 Received create PDP context response. Cause value: 128
266 Setting up interface and routing
267 /sbin/ifconfig tun0 192.168.0.1
268 /sbin/route add -net 192.168.0.0 netmask 255.255.255.0 gw 192.168.0.1
269
270
271Now a context is established to the remote GGSN. The IP address of the
272context is 192.168.0.1. If you specified the correct --net and --mask
273you should be able to ping a known address on the Gi network of the
274roaming partner. You should even be able to do web browsing through
275the PDP context.
276
277Note however that you probably need to adjust your routing tables, so
278that you make sure that all GRX traffic is routed to the GPRS core
279network and everything else through the PDP context. The proper way to
280do this is to use policy routing. Also note that you are effectively
281connecting the same computer to both the Gn and Gi network, so please
282be carefull not to route internet traffic onto the GPRS core network
283and please protect yourself against hackers! For this reason it is
284advised to always use --contexts 0 when testing a live network.
285
286After --timelimit seconds the PDP context is disconnected with the
287following messages from sgsnemu:
288
289 Disconnecting PDP context #0
290 Received delete PDP context response. Cause value: 128
291 Deleting tun interface
jjako52c24142002-12-16 13:33:51 +0000292