2003-04-11 09:40:12 +00:00
|
|
|
# OpenGGSN - Gateway GPRS Support Node
|
2004-09-17 11:30:40 +00:00
|
|
|
# Copyright (C) 2002, 2003, 2004 Mondru AB.
|
2002-12-16 13:33:51 +00:00
|
|
|
#
|
2003-04-11 09:40:12 +00:00
|
|
|
# The contents of this file may be used under the terms of the GNU
|
|
|
|
# General Public License Version 2, provided that the above copyright
|
|
|
|
# notice and this permission notice is included in all copies or
|
|
|
|
# substantial portions of the software.
|
2004-09-17 11:30:40 +00:00
|
|
|
#
|
|
|
|
# Use "gengetopt --conf-parser < cmdline.ggo"
|
|
|
|
# to generate cmdline.c and cmdline.h
|
2002-12-16 13:33:51 +00:00
|
|
|
|
|
|
|
option "fg" f "Run in foreground" flag off
|
|
|
|
option "debug" d "Run in debug mode" flag off
|
|
|
|
|
|
|
|
option "conf" c "Read configuration file" string default="/etc/ggsn.conf" no
|
|
|
|
option "pidfile" - "Filename of process id file" string default="/var/run/ggsn.pid" no
|
|
|
|
option "statedir" - "Directory of nonvolatile data" string default="/var/lib/ggsn/" no
|
|
|
|
|
|
|
|
option "listen" l "Local interface" string no
|
2003-04-11 09:40:12 +00:00
|
|
|
option "net" n "Network" string default="192.168.0.0/24" no
|
|
|
|
option "ipup" - "Script to run after link-up" string no
|
|
|
|
option "ipdown" - "Script to run after link-down" string no
|
|
|
|
|
2003-04-11 11:51:39 +00:00
|
|
|
option "dynip" - "Dynamic IP address pool" string no
|
|
|
|
option "statip" - "Static IP address pool" string no
|
2003-04-11 09:40:12 +00:00
|
|
|
|
|
|
|
option "pcodns1" - "PCO DNS Server 1" string default="0.0.0.0" no
|
|
|
|
option "pcodns2" - "PCO DNS Server 2" string default="0.0.0.0" no
|
2002-12-16 13:33:51 +00:00
|
|
|
|
|
|
|
option "timelimit" - "Exit after timelimit seconds" int default="0" no
|
|
|
|
|
|
|
|
option "apn" a "Access point name" string default="internet" no
|
|
|
|
option "qos" q "Requested quality of service" int default="0x0b921f" no
|
2014-03-23 09:07:26 +00:00
|
|
|
option "logfile" - "Logfile for errors" string no
|
2014-12-04 17:54:58 +00:00
|
|
|
option "loglevel" - "Global log ldevel" string default="error" no
|
ggsn: add support for GTP kernel data encapsulation
This patch adds the -g, --gtpnl=device option that allows you to
enable the GTP kernel tunneling mode in openggsn. You have to specify
the real downlink device that will be used to tunnel traffic, eg.
-g=eth0
This means that the gtp0 device will be created and it will use eth0
as the real device to encapsulate packet coming from the Internet that
are addressed to the MS (so the tunnel devuce encapsulates these IP
packets in GTP packets when traveling to the SGSN).
Alternatively, you can also add this to the ggsn.conf configuration file:
gtpnl eth0
The device has to be the real device that can route packets to the SGSN,
if you select the wrong device, the kernel routing code may not find a
way to reach the SSGN, you've been warned.
Therefore, if this option is set, the operational becomes the following:
1) A gtp0 device is created via rtnetlink and configure the socket
encapsulation infrastructure in the kernel.
2) Whenever a PDP context is created, this adds the necessary tunnel
configuration via genetlink GTP interface.
3) Whenever a PDP context is destroyed, this deletes the tunnel via
genetlink GTP interface.
4) Destroy the gtp0 device if ggsn is stopped, including all of the
existing tunnels.
You require the osmo-ggsn.git tree, which contains the kernel module
gtp.ko and the libgtpnl library that you have to compile and install.
Make sure you have loaded the gtp.ko kernel module before launching
the ggsn daemon using the kernel driver mode, otherwise you will get
a nice "operation not supported" error message ;-).
This patch also adds supports for "ipup" configuration option to invoke
an external script after the gtp0 device has been brought up. Typical
command to add the route to reach the MS behind the GGSN is required,
eg. ip route add 10.0.0.0/8 dev gtp0.
The (horrible) ggsn parser has been manually extended to support the
new configuration option. That code doesn't look nice, but it just
mimics what we already have there for consistency, please don't blame
me for that.
If you want to run in debugging mode, I suggest you to use:
sudo ggsn -c ggsn.conf -f -d
Note that you do have to run openggsn as root to bring up the gtp0
device. You have to see this message that announce that the GTP kernel
mode is enabled.
openggsn[1106]: ggsn.c: 656: Using the GTP kernel mode (genl ID is 25)
This patch also automagically sets up route to reach MS from Internet
just like tun mode does. This is fundamental to get this working,
better don't leave to the admin, he may forget to add this route.
In this patch, I tried to encapsulate this new feature as much as
possible as Harald initially suggested.
To compile this feature, you have to pass --enable-gtp-kernel, ie.
./configire --enable-gtp-kernel
Otherwise, the code to interact with the gtp kernel part is not compiled.
Signed-off-by: Andreas Schultz <aschultz@tpip.net>
2015-11-17 11:22:42 +00:00
|
|
|
|
2016-05-10 16:43:12 +00:00
|
|
|
option "gtp-linux" g "GTP linux kernel support" flag off
|
ggsn: add support for GTP kernel data encapsulation
This patch adds the -g, --gtpnl=device option that allows you to
enable the GTP kernel tunneling mode in openggsn. You have to specify
the real downlink device that will be used to tunnel traffic, eg.
-g=eth0
This means that the gtp0 device will be created and it will use eth0
as the real device to encapsulate packet coming from the Internet that
are addressed to the MS (so the tunnel devuce encapsulates these IP
packets in GTP packets when traveling to the SGSN).
Alternatively, you can also add this to the ggsn.conf configuration file:
gtpnl eth0
The device has to be the real device that can route packets to the SGSN,
if you select the wrong device, the kernel routing code may not find a
way to reach the SSGN, you've been warned.
Therefore, if this option is set, the operational becomes the following:
1) A gtp0 device is created via rtnetlink and configure the socket
encapsulation infrastructure in the kernel.
2) Whenever a PDP context is created, this adds the necessary tunnel
configuration via genetlink GTP interface.
3) Whenever a PDP context is destroyed, this deletes the tunnel via
genetlink GTP interface.
4) Destroy the gtp0 device if ggsn is stopped, including all of the
existing tunnels.
You require the osmo-ggsn.git tree, which contains the kernel module
gtp.ko and the libgtpnl library that you have to compile and install.
Make sure you have loaded the gtp.ko kernel module before launching
the ggsn daemon using the kernel driver mode, otherwise you will get
a nice "operation not supported" error message ;-).
This patch also adds supports for "ipup" configuration option to invoke
an external script after the gtp0 device has been brought up. Typical
command to add the route to reach the MS behind the GGSN is required,
eg. ip route add 10.0.0.0/8 dev gtp0.
The (horrible) ggsn parser has been manually extended to support the
new configuration option. That code doesn't look nice, but it just
mimics what we already have there for consistency, please don't blame
me for that.
If you want to run in debugging mode, I suggest you to use:
sudo ggsn -c ggsn.conf -f -d
Note that you do have to run openggsn as root to bring up the gtp0
device. You have to see this message that announce that the GTP kernel
mode is enabled.
openggsn[1106]: ggsn.c: 656: Using the GTP kernel mode (genl ID is 25)
This patch also automagically sets up route to reach MS from Internet
just like tun mode does. This is fundamental to get this working,
better don't leave to the admin, he may forget to add this route.
In this patch, I tried to encapsulate this new feature as much as
possible as Harald initially suggested.
To compile this feature, you have to pass --enable-gtp-kernel, ie.
./configire --enable-gtp-kernel
Otherwise, the code to interact with the gtp kernel part is not compiled.
Signed-off-by: Andreas Schultz <aschultz@tpip.net>
2015-11-17 11:22:42 +00:00
|
|
|
|