osmo-ggsn/README

301 lines
10 KiB
Plaintext
Raw Normal View History

2002-12-16 13:33:51 +00:00
*** QuickStart ***
REQUIREMENTS
2003-01-05 18:36:33 +00:00
Linux
2002-12-16 13:33:51 +00:00
OpenGGSN was developed and tested using Redhat 7.1 and Redhat
7.2. It should run also on other Linux distributions as well as
FreeBSD and Solaris, but this is untested. Please tell me of any
testing results.
Tun
Both ggsn and sgsnemu uses the tun package. You need at least tun
version 1.1. See http://vtun.sourceforge.net/tun/ for instructions on
2003-01-05 18:36:33 +00:00
installation. Tun is included in the kernel from early version 2.4, so
you will not normally need to install it. For Redhat 7.1, 7.2 and 8.0
you do however need to do the following:
2003-01-05 18:36:33 +00:00
mkdir /dev/net
mknod /dev/net/tun c 10 200
Add this line to /etc/modules.conf: alias char-major-10-200 tun
2003-01-05 18:36:33 +00:00
depmod -a
2002-12-16 13:33:51 +00:00
2003-01-05 18:36:33 +00:00
COMPILATION and INSTALLATION
2002-12-16 13:33:51 +00:00
1 ./configure
2003-01-29 10:24:10 +00:00
2 make
3 make install
You need to be root in order to install the package, but not in order
to compile.
2002-12-16 13:33:51 +00:00
RUNNING
sgsnemu
Edit the configuration file sgsnemu.conf found under
2003-01-05 18:36:33 +00:00
openggsn/examples. Use sgsnemu -h for a list of available options.
Start the emulator as root using the command:
2002-12-16 13:33:51 +00:00
2003-01-29 10:24:10 +00:00
sgsnemu -c examples/sgsnemu.conf -l 10.20.30.50 -r 10.20.30.40 --createif
2002-12-16 13:33:51 +00:00
This will cause the sgsn emulator to bind to local address 10.20.30.50
and connect to the ggsn found at 10.20.30.40. It will first send off
an ECHO_REQUEST message. After this it will attempt to establish a pdp
2002-12-16 13:33:51 +00:00
context. If successful it will create a local interface and set up
routing. Now you should be able to ping through the connection. Use a
network analysator such as ethereal to monitor the traffic.
ggsn
2003-01-05 18:36:33 +00:00
Edit the configuration file ggsn.conf found under
openggsn/examples. Use sgsnemu -h for a list of available options.
Start the ggsn as root using the command:
2003-01-05 18:36:33 +00:00
ggsn --fg -c examples/ggsn.conf -l 10.20.30.40 --statedir .
2002-12-16 13:33:51 +00:00
This will run the ggsn in foreground using the local interface
10.20.30.40. Of cause you can use sgsnemu to test the GGSN.
SUPPORT
If you have any questions drop me a line at jj@openggsn.org.
2002-12-16 13:33:51 +00:00
*** Features ***
OpenGGSN is an open source implementation of GPRS Support Nodes
(GSNs). It implements the GPRS tunneling protocol (GTP) version 0.
OpenGGSN provides 3 components:
* gtplib
* ggsn
* sgsnemu
gtplib
2003-01-05 18:36:33 +00:00
This library contains all functionality relating to the GTP
2002-12-16 13:33:51 +00:00
protocol. Use this libraty if you want to implement your own
GSN. Currently gtplib supports GTPv0. At the moment no interface
documentation is available for download.
2002-12-16 13:33:51 +00:00
ggsn
2003-01-05 18:36:33 +00:00
The ggsn implements a Gateway GPRS Support Node. The GGSN is a small
application which is provided in order to test and demonstrate the use
of gtplib. It is fully compliant to the 3GPP standards, but lacks
important functionality such as charging and management. Use this
2002-12-16 13:33:51 +00:00
application as a starting point if you want to build your own GGSN
with your own fancy VPN, management and charging functionality.
2003-01-05 18:36:33 +00:00
sgsnemu
This application emulates a Serving GPRS Support Node (SGSN). sgsnemu
enables you to test your 3GPP core network without the need to invest
2002-12-16 13:33:51 +00:00
in a 3G radio access network. An important application of sgsnemu is
the testing of roaming connectivity through a GPRS roaming exchange.
2003-01-05 18:36:33 +00:00
2003-01-29 10:24:10 +00:00
*** Performance ***
Two experiments were performed in order to test the performance of
sgsnemu and ggsn. The ggsn used a 550 MHz Athlon with 384 MB of
RAM. sgsnemu used a 1 GHz Athlon with 256 MB of RAM. Both machines had
100 Mb/s NICs and were connected through a Netgear FS105 switch. Both
tests were performed by sending ICMP echo packets from the ggsn to
sgsnemu.
89.4 Mb/s IP downlink throughput when sending 10001 ICMP ping packets
with a payload of 1000 bytes. Transfer time 0.9 sec, no packets lost.
17,1 Mb/s IP downlink throughput when sending 10001 ICMP ping packets with
a payload of 100 bytes. Transfer time 0.6 sec, no packets lost.
2002-12-16 13:33:51 +00:00
*** Required software ***
TUN (http://vtun.sourceforge.net/tun/)
2002-12-16 13:33:51 +00:00
Both ggsn and sgsnemu uses the tun package. You need at least tun
2003-01-05 18:36:33 +00:00
version 1.1. See the above web page for instructions on
installation. Tun is included in the kernel from early version 2.4, so
you will not normally need to install it. For Redhat 7.1, 7.2 and 8.0
you do however need to do the following:
2003-01-05 18:36:33 +00:00
mkdir /dev/net
mknod /dev/net/tun c 10 200
Add the following line to /etc/modules.conf: alias char-major-10-200 tun
depmod -a
2002-12-16 13:33:51 +00:00
GENGETOPT (http://www.gnu.org/software/gengetopt/gengetopt.html)
2002-12-16 13:33:51 +00:00
Gengetopt is required if you want to change the options defined in the
cmdline.ggo source file. You need at least gengetopt version 2.8. If
you are just going to compile the programs you don't need gengetopt.
2002-12-16 13:33:51 +00:00
2003-01-05 18:36:33 +00:00
To use gengetopt for the ggsn do the following:
2002-12-16 13:33:51 +00:00
cd ggsn
2003-01-05 18:36:33 +00:00
gengetopt < cmdline.ggo --conf-parser
2002-12-16 13:33:51 +00:00
2003-01-05 18:36:33 +00:00
To use gengetopt for the sgsnemu do the following:
2002-12-16 13:33:51 +00:00
cd sgsnemu
2003-01-05 18:36:33 +00:00
gengetopt < cmdline.ggo --conf-parser
2002-12-16 13:33:51 +00:00
*** Compilation and Installation ***
SETTING UP AUTOTOOLS
You do not need to perform this step if you are only going to compile
the package:
2003-01-29 10:24:10 +00:00
0 Get version from somewhere: Script to extract version from configure.in
1 Copy the latest config.guess and config.sub from ftp://ftp.gnu.org/gnu/config
2003-01-29 10:24:10 +00:00
2 Run autoscan and copy configure.scan to configure.in
3 Add/edit the following lines in configure.in:
AC_INIT(openggsn, 0.52, jj@openggsn.org)
AC_CONFIG_SRCDIR([gtp/gtp.c])
AM_CONFIG_HEADER([config.h])
AC_PROG_LIBTOOL
AM_PROG_LIBTOOL
AM_INIT_AUTOMAKE()
4 libtoolize --automake --copy
(ads copy of ltmain.sh)
5 aclocal
6 autoheader
2003-01-29 10:24:10 +00:00
7 automake --add-missing --copy
(Ads copy of mkinstalldirs missing, install-sh, depcomp)
8 automake
9 autoconf
The above will initialise the project to the current version of
autotools (As installed in RedHat 8.0). See
http://sources.redhat.com/autobook/autobook/autobook_25.html#SEC25
for details on autotools.
COMPILATION AND INSTALLATION
1 ./configure
2 make clean
3 cd gtp
4 make
5 make install (as root)
6 cd ..
(Step 3 to 6 you only need to run the first time to install libgtp)
7 make
8 make install (as root)
9 Add /usr/local/lib to /etc/ld.so.conf
10 run ldconfig
(Step 9 and 10 are not required as path to libgtp is included in Makefile)
2002-12-16 13:33:51 +00:00
*** Running ggsn ***
Use ggsn -h for a list of available options. All options available on
the command line can also be given in a configuration file. See
examples/ggsn.conf for the format of this file.
2002-12-16 13:33:51 +00:00
2003-01-29 10:24:10 +00:00
Remember to enable routing: echo 1 > /proc/sys/net/ipv4/ip_forward
2002-12-16 13:33:51 +00:00
*** Running sgsnemu ***
Use sgsnemu -h for a list of available options. All options available
on the command line can also be given in a configuration file. See
examples/sgsnemu.conf for the format of this file.
If you want to test a GRX roaming connection you will need to do the
following:
1) Install sgsnemu on a Linux Box. See under installation above.
2) Connect your Linux box with sgsnemu installed to the GPRS core
network. Use the same LAN switch as the one your SGSN is connected
to. You also need a free IP address that can be used by sgsnemu.
3) You need to configure networking in terms of interface address,
subnet mask and default route. See the Linux Networking HOWTO for
details.
4) Launch sgsnemu with something like:
sgsnemu --fg --listen 10.20.30.50 --remote 10.20.30.40 --dns 10.20.38.51 --timelimit 10 --contexts 0
sgsnemu will print something like the following on the screen:
Using DNS server: 10.20.38.51 (10.20.38.51)
Local IP address is: 10.20.30.50 (10.20.30.50)
Remote IP address is: 10.20.30.40 (10.20.30.40)
IMSI is: 240011234567890 (0x98765432110042)
Using APN: internet
Using MSISDN: 46702123456
Initialising GTP library
OpenGGSN[1823]: GTP: gtp_newgsn() started
Done initialising GTP library
Sending off echo request
Waiting for response from ggsn........
Received echo response. Cause value: 0
This is quite good. It means that you managed to send off an echo
request to a remote GGSN, and it was friendly enough to answer you. If
you did not get an echo response it means that something is wrong
either with your setup OR with the GRX connection OR with your roaming
partners connection.
If the above went well you might want to try to establish a PDP
2003-01-29 10:24:10 +00:00
context to the remote GGSN. Note that you should be careful when
establishing PDP contexts using sgsnemu as each established PDP
context will result in a Charge Detail Record (CDR) being generated by
the GGSN. You should use real IMSI and MSISDN from a valid test SIM
card. Otherwise some poor customer might get charged for your
testing. Also note that you are establishing a connection to the Gi
2003-01-29 10:24:10 +00:00
network, so please be carefull not to route internet traffic onto the
GPRS core network! Assuming you know what you are doing:
2003-01-29 10:24:10 +00:00
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 --createif
sgsnemu will print something like the following on the screen:
Using DNS server: 10.20.38.51 (10.20.38.51)
Local IP address is: 10.20.30.50 (10.20.30.50)
Remote IP address is: 10.20.30.40 (10.20.30.40)
IMSI is: 240011234567890 (0x98765432110042)
Using APN: internet
Using MSISDN: 46702123456
Initialising GTP library
OpenGGSN[1838]: GTP: gtp_newgsn() started
Done initialising GTP library
Sending off echo request
Setting up PDP context #0
Waiting for response from ggsn........
Received echo response. Cause value: 0
Received create PDP context response. Cause value: 128
Setting up interface and routing
/sbin/ifconfig tun0 192.168.0.1
/sbin/route add -net 192.168.0.0 netmask 255.255.255.0 gw 192.168.0.1
Now a context is established to the remote GGSN. The IP address of the
context is 192.168.0.1. If you specified the correct --net and --mask
you should be able to ping a known address on the Gi network of the
roaming partner. You should even be able to do web browsing through
the PDP context.
Note however that you probably need to adjust your routing tables, so
that you make sure that all GRX traffic is routed to the GPRS core
network and everything else through the PDP context. The proper way to
do this is to use policy routing. Also note that you are effectively
connecting the same computer to both the Gn and Gi network, so please
be carefull not to route internet traffic onto the GPRS core network
and please protect yourself against hackers! For this reason it is
advised to always use --contexts 0 when testing a live network.
After --timelimit seconds the PDP context is disconnected with the
following messages from sgsnemu:
Disconnecting PDP context #0
Received delete PDP context response. Cause value: 128
Deleting tun interface
2002-12-16 13:33:51 +00:00