blob: 83470e810faf4c0bf7488c757eb8c3c481be7200 [file] [log] [blame]
Neels Hofmeyr65d61c32017-11-11 19:36:48 +01001== Running OsmoGGSN
Harald Welte8a1e7b82017-09-06 12:35:04 +02002
3The OsmoGGSN executable (`osmo-ggsn`) offers the following command-line
4arguments:
5
6=== SYNOPSIS
7
8*osmo-ggsn* [-h|-V] [-D] [-c 'CONFIGFILE']
9
10=== OPTIONS
11
12*-h, --help*::
13 Print a short help message about the supported options
14*-V, --version*::
15 Print the compile-time version number of the OsmoBTS program
16*-D, --daemonize*::
17 Fork the process as a daemon into background.
18*-c, --config-file 'CONFIGFILE'*::
19 Specify the file and path name of the configuration file to be
20 used. If none is specified, use `osmo-ggsn.cfg` in the current
21 working directory.
22
Neels Hofmeyr60683752017-11-18 17:37:09 +010023=== Routing
24
25Operating the OpenGGSN tun device naturally creates a network setup with
26multiple interfaces. Consider:
27
28* Typical Linux setups prevent forwarding of packets between separate
29 interfaces by default. To let subscribers reach the internet uplink from the
30 tun device, it may be required to enable IP forwarding.
31
32* Having a locally defined address range assigned to the tun device requires
33 either sensible routing for this address range, or that masquerading is
34 enabled to allow your single uplink IP address to "proxy" for the tun.
35
36These are decisions to be made on a network administration level.
37
38In a trivial case where you have a single box serving GPRS to few subscribers
39on an arbitrary IP address range not known in the larger network, the easiest
40way to enable GPRS uplink would be to enable IP forwarding and masquerading.
41
42To manually enable IPv4 forwarding and masquerading ad-hoc, you can do:
43
44----
45sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
46iptables -t nat -A POSTROUTING -o '*' -j MASQUERADE
47----
48
49(You may want to replace `*` with the network device name, like `-o eth0`)
50
51There are various ways to enable these settings persistently, please refer to
52your distribution's documentation -- e.g. look for @net.ipv4.ip_forward=1@ in
53@/etc/sysctl.d/@, and https://wiki.debian.org/iptables for masquerading.
54
Harald Welte8a1e7b82017-09-06 12:35:04 +020055=== Multiple instances
56
57Running multiple instances of `osmo-ggsn` is possible if all GGSN instances
58are binding to different local IP addresse and all other interfaces (VTY,
59OML) are separated using the appropriate configuration options. The IP based
60interfaces are binding to local host by default. In order to separate the
61processes, the user has to bind those services to specific but different
62IP addresses.
63
64The VTY and the control interface can be bound to IP addresses from the loopback
65address range.
66
67.Example: Binding VTY and control interface to a specific ip-address
68----
69line vty
70 bind 127.0.0.2
71ctrl
72 bind 127.0.0.2
73----
Neels Hofmeyr5f8b3322017-11-12 22:50:00 +010074
75Also make sure to place each instance's GTP bind on a separate IP address (GTP
76uses a port number that is fixed in the GTP specifications, so it will not be
77possible to pick differing ports on the same IP address), like:
78
79----
80ggsn ggsn0
81 gtp bind-ip 127.0.0.2
82----