aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--NEWS40
-rw-r--r--README271
-rw-r--r--configure.in16
4 files changed, 219 insertions, 121 deletions
diff --git a/ChangeLog b/ChangeLog
index 138109a..6953a7d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,19 @@
+2003-07-07: Jens Jakobsen <jj@openggsn.org>
+ Added spec.in file for building binary RPM packages. Now openggsn
+ will install binaries, man pages as well as scripts.
+
+ Added ggsn and sgsnemu man pages
+
+ Added ggsn Sys V init script
+
+ Added bootstrap script for autotools automation
+
+
2003-04-11: Jens Jakobsen <jj@openggsn.org>
Added -ggdb to gtp, sgsnemu and ggsn makefiles in order to include
debugging information.
- Added ippool.c and ippool.h to ggsn. This allow for generic
+ Added ippool.c and ippool.h to ggsn. This allows for generic
allocation of dynamic ip addresses based on a <net>/<mask>
description of ip address space. The same files are also used in
sgsnemu, but only for hashing IP addresses. At the same time the
diff --git a/NEWS b/NEWS
index 76e2095..2a0aee1 100644
--- a/NEWS
+++ b/NEWS
@@ -1,21 +1,33 @@
+OPENGGSN NEWS
+=============
+
OpenGGSN - Gateway GPRS Support Node
-Copyright (C) 2002 Mondru AB.
+Copyright (C) 2002, 2003 Mondru AB.
+
+Version 0.6
+===========
-Version 0.6b
+ * Improved README file.
+ * Now uses ioctl instead of ifconfig and route in ggsn and sgsnemu.
+ * Absolute path to gtp library in ggsn/Makefile.am and ggsn/Makefile.am
+ * Compiles with gengetopt 2.8 (Thanks to Lorenzo Bettini <bettini@gnu.org>)
+ * sgsnemu is now able to handle several contexts and allocate
+ interface IP addresses for each context.
+ * ggsn now supports protocol configuration option DNS
+ addresses. This allow mobile stations to set up DNS based on
+ information configured in the ggsn.
+ * Ping facility in sgsnemu allow testing without the need to route
+ packets through the tun interface.
+ * Man pages for ggsn and sgsnemu.
+ * Sys 5 init script.
+ * Spec file for building binary RPM packages.
+ * If not --createif exit after "ping" or "echo" finishes
+ * If sgsnemu echo failure, exit with code != 0
- * Improved README file.
- * Absolute path to ifconfig and route in ggsn and sgsnemu
- * Absolute path to gtp library in ggsn/Makefile.am and ggsn/Makefile.am
- * Compiles with gengetopt 2.8 (Thanks to Lorenzo Bettini
- <lorenzo.bettini@penteres.it>)
- * sgsnemu is now able to handle several contexts and allocate
- interface IP addresses for each context.
- * ggsn now support protocol configuration option DNS
- addresses. This allow mobile stations to set up DNS based on
- information configured in the ggsn.
Version 0.5
+===========
- * Initial release. See README file for installation and usage
- instructions.
+ * Initial release. See README file for installation and usage
+ instructions.
diff --git a/README b/README
index 4a20c00..f633cbc 100644
--- a/README
+++ b/README
@@ -1,82 +1,102 @@
-*** QuickStart ***
+OPENGGSN README
+===============
-REQUIREMENTS
-Linux OpenGGSN was developed and tested using Redhat 7.1, 7.2 and
-8.0. 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.
+QuickStart
+==========
-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
-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:
-mkdir /dev/net
-mknod /dev/net/tun c 10 200
-Add this line to /etc/modules.conf: alias char-major-10-200 tun
-depmod -a
+
+Requirements
+------------
+
+*Linux*
+OpenGGSN was developed and tested using Redhat 8.0 and 9.0. 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*
+The tun driver is required for proper operation of openggsn. For linux
+kernels later than 2.4.7 the driver is typically included, but need
+to be configured for automatic loading:
+
+1. Add the following line to /etc/modules.conf: alias char-major-10-200 tun
+2. depmod -a
+
+
+Installation from binary
+------------------------
+
+rpm -i openggsn-<version>.rpm
+
+This will install binaries, man pages, configuration files as well as
+a Sys V init script for the ggsn.
-COMPILATION and INSTALLATION
+Installation from source
+------------------------
-1 ./configure
-2 make
-3 make install
+1. ./configure
+2. make
+3. make install
You need to be root in order to install the package, but not in order
to compile.
-RUNNING
-sgsnemu
-Edit the configuration file sgsnemu.conf found under
-openggsn/examples. Use sgsnemu -h for a list of available options.
+Running
+-------
+
+*sgsnemu*
Start the emulator as root using the command:
- sgsnemu -c examples/sgsnemu.conf -l 10.20.30.50 -r 10.20.30.40 --createif
+ sgsnemu -l 10.0.0.50 -r 10.0.0.40 --createif --defaultroute
-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
+This will cause the sgsn emulator to bind to local address 10.0.0.50
+and connect to the ggsn found at 10.0.0.40. It will first send off an
+ECHO_REQUEST message. After this it will attempt to establish a pdp
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
-Edit the configuration file ggsn.conf found under
-openggsn/examples. Use sgsnemu -h for a list of available options.
+sgsnemu -h will show a list of available options. "-c sgsnemu.conf"
+use sgsnemu.conf as a configuration file. A sample file is provided in
+examples/sgsnemu.conf.
+
+*ggsn*
+Edit the configuration file ggsn.conf found under openggsn/examples.
Start the ggsn as root using the command:
- ggsn --fg -c examples/ggsn.conf -l 10.20.30.40 --statedir .
+ggsn --fg -c examples/ggsn.conf -l 10.0.0.40 --statedir .
This will run the ggsn in foreground using the local interface
-10.20.30.40. If you don't have a GSM network available for testing you
+10.0.0.40. If you don't have a GSM network available for testing you
can use sgsnemu to test the GGSN.
-SUPPORT
+Support
+-------
+
If you have any questions drop me a line at jj@openggsn.org.
-*** Features ***
+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
+ * ggsn
+ * sgsnemu
-gtplib
+*gtplib*
This library contains all functionality relating to the GTP
protocol. Use this library if you want to implement your own
GSN. Currently gtplib supports GTPv0. At the moment no interface
documentation is available for download.
-ggsn
+*ggsn*
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
@@ -84,14 +104,15 @@ important functionality such as charging and management. Use this
application as a starting point if you want to build your own GGSN
with your own fancy VPN, management and charging functionality.
-sgsnemu
+*sgsnemu*
This application emulates a Serving GPRS Support Node (SGSN). sgsnemu
enables you to test your 3GPP core network without the need to invest
in a 3G radio access network. An important application of sgsnemu is
the testing of roaming connectivity through a GPRS roaming exchange.
-*** Performance ***
+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
@@ -110,22 +131,26 @@ payload of 1000 bytes. Transfer time 1.15 sec, no packets lost.
payload of 100 bytes. Transfer time 0.84 sec, no packets lost.
-*** Required software ***
+Required software
+=================
-TUN (http://vtun.sourceforge.net/tun/)
+Tun
+---
Both ggsn and sgsnemu uses the tun package. You need at least tun
-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:
-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
+version 1.1. With Linux tun is normally included from kernel version
+2.4.7. To configure automatic loading:
+
+1. Add the following line to /etc/modules.conf: alias char-major-10-200 tun
+2. depmod -a
+Alternatively you can execute "modprobe tun" on the commandline.
-GENGETOPT (http://www.gnu.org/software/gengetopt/gengetopt.html)
+For other platforms and general information about tun see
+http://vtun.sourceforge.net/tun/
+
+Gengetopt
+---------
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
@@ -139,32 +164,38 @@ To use gengetopt for the sgsnemu do the following:
cd sgsnemu
gengetopt < cmdline.ggo --conf-parser
+For more information about gengetopt see
+http://www.gnu.org/software/gengetopt/gengetopt.html
+
-*** Compilation and Installation ***
+Compilation and Installation
+============================
-SETTING UP AUTOTOOLS
+
+Setting up autotools
+--------------------
You do not need to perform this step if you are only going to compile
the package:
-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
-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
+1. Get version from somewhere: Script to extract version from configure.in
+2. Copy the latest config.guess and config.sub from ftp://ftp.gnu.org/gnu/config
+3. Run autoscan and copy configure.scan to configure.in
+4. 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()
+5. libtoolize --automake --copy
(ads copy of ltmain.sh)
-5 aclocal
-6 autoheader
-7 automake --add-missing --copy
+6. aclocal
+7. autoheader
+8. automake --add-missing --copy
(Ads copy of mkinstalldirs missing, install-sh, depcomp)
-8 automake
-9 autoconf
+9. automake
+10. autoconf
The above will initialise the project to the current version of
autotools (As installed in RedHat 8.0). See
@@ -172,23 +203,43 @@ http://sources.redhat.com/autobook/autobook/autobook_25.html#SEC25
for details on autotools.
-COMPILATION AND INSTALLATION
+Compilation and installation
+----------------------------
- 1 ./configure
- 2 make clean
- 3 cd gtp
- 4 make
- 5 make install (as root)
- 6 cd ..
+ 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)
+ 7. make
+ 8. make install (as root)
+ 9. Add /usr/local/lib to /etc/ld.so.conf
+10. run ldconfig
+
+(Steps 9 and 10 are not required as path to libgtp is included in Makefile)
+Documentation can be converted to html by issuing:
-*** Running ggsn ***
+ 1. txt2html -pm -tf README > README.html
+ 2. txt2html -pm -tf NEWS > NEWS.html
+ 3. txt2html -pm -tf ChangeLog > ChangeLog.html
+ 4. man2htm ggsn.8 > ggsn.html
+ 5. man2htm sgsnemu.8 > sgsnemu.html
+
+
+Installation from binary
+------------------------
+
+1. rpm -i openggsn-<version>.rpm
+
+This will install binaries, man pages, configuration files as well as
+a Sys V init script for the ggsn.
+
+
+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
@@ -196,7 +247,7 @@ examples/ggsn.conf for the format of this file.
Start the ggsn as root using the command:
- ggsn -c examples/ggsn.conf --fg -l 10.20.30.40 --net 192.168.0.0/24 --dynip 192.168.0.0/24
+ ggsn -c examples/ggsn.conf --fg -l 10.0.0.40 --net 192.168.0.0/24 --dynip 192.168.0.0/24
First a tun network interface will be created. In the above example
the network interface address is 192.168.0.0 and the mask is
@@ -205,7 +256,7 @@ ifconfig.
After tun has been successfully established the ggsn will wait for GTP
create PDP context requests on the local interface
-10.20.30.40. Currently all requests are accepted, and no password,
+10.0.0.40. Currently all requests are accepted, and no password,
username or APN validation is performed.
When receiving a create PDP context request a dynamic IP address will
@@ -220,9 +271,18 @@ external network routing needs to be set up. If private addresses are
used you need to configure network address translation. See the Linux
Networking HOWTO for details.
-Remember to enable routing: echo 1 > /proc/sys/net/ipv4/ip_forward
+Remember to enable routing:
+
+echo 1 > /proc/sys/net/ipv4/ip_forward
+
+If you installed using a binary RPM package it is possible to start
+ggsn by using the Sys 5 script:
+
+/etc/init.d/ggsn start
+
-*** Running sgsnemu ***
+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
@@ -231,25 +291,24 @@ 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
+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,
+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:
-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 --listen 10.0.0.50 --remote 10.0.0.40 --dns 10.20.38.51 --timelimit 10 --contexts 0
sgsnemu will print something like the following on the screen:
+<PRE>
+
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)
+ Local IP address is: 10.0.0.50 (10.0.0.50)
+ Remote IP address is: 10.0.0.40 (10.0.0.40)
IMSI is: 240011234567890 (0x98765432110042)
Using APN: internet
Using MSISDN: 46702123456
@@ -263,6 +322,8 @@ sgsnemu will print something like the following on the screen:
Received echo response. Cause value: 0
+</PRE>
+
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
@@ -279,13 +340,15 @@ testing. Also note that you are establishing a connection to the Gi
network, so please be carefull not to route internet traffic onto the
GPRS core network! Assuming you know what you are doing:
- 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 --createif --defaultroute
+ sgsnemu --listen 10.0.0.50 --remote 10.0.0.40 --dns 10.20.38.51 --timelimit 10 --contexts 1 --apn internet --imsi 240011234567890 --msisdn 46702123456 --createif --defaultroute
sgsnemu will print something like the following on the screen:
+<PRE>
+
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)
+ Local IP address is: 10.0.0.50 (10.0.0.50)
+ Remote IP address is: 10.0.0.40 (10.0.0.40)
IMSI is: 240011234567890 (0x98765432110042)
Using APN: internet
Using MSISDN: 46702123456
@@ -304,6 +367,7 @@ sgsnemu will print something like the following on the screen:
/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
+</PRE>
Now a context is established to the remote GGSN. The IP address of the
context is 192.168.0.1. You should be able to ping a known address on
@@ -322,7 +386,12 @@ 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:
+
+<PRE>
+
Disconnecting PDP context #0
Received delete PDP context response. Cause value: 128
Deleting tun interface
+</PRE>
+
diff --git a/configure.in b/configure.in
index eab673c..6962ad3 100644
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,5 @@
# Process this file with autoconf to produce a configure script.
-AC_INIT(openggsn, 0.52, jj@openggsn.org)
+AC_INIT(openggsn, 0.60, jj@openggsn.org)
AC_CONFIG_SRCDIR([gtp/gtp.c])
AM_CONFIG_HEADER([config.h])
#AC_CONFIG_HEADER([config.h])
@@ -17,14 +17,19 @@ AC_PROG_RANLIB
AC_PROG_LIBTOOL
AM_PROG_LIBTOOL
+AC_ARG_ENABLE(static-exec,
+ [ --enable-static-exec Enable static linking of executables],
+ [ EXEC_LDFLAGS="-all-static"])
+
+AC_SUBST(EXEC_LDFLAGS)
# Checks for libraries.
# FIXME: Replace `main' with a function in `-le':
-AC_CHECK_LIB([e], [main])
+#AC_CHECK_LIB([e], [main])
# FIXME: Replace `main' with a function in `-lgtp':
-AC_CHECK_LIB([gtp], [main])
+#AC_CHECK_LIB([gtp], [main])
# FIXME: Replace `main' with a function in `-links':
-AC_CHECK_LIB([inks], [main])
+#AC_CHECK_LIB([inks], [main])
# Checks for header files.
AC_HEADER_STDC
@@ -53,5 +58,6 @@ AC_CONFIG_FILES([Makefile
po/Makefile
sgsnemu/Makefile
src/Makefile
- tests/Makefile])
+ tests/Makefile
+ openggsn.spec])
AC_OUTPUT