aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/osmo-gtphub/gtphub-example.txt
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-07-04 23:08:44 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-08-27 03:52:43 +0200
commit218e4b4aa0fc6de842ff820dec8e97d1f083268a (patch)
tree268a6e509270b1c80a36dd1a526da41a9b01a8e0 /doc/examples/osmo-gtphub/gtphub-example.txt
parent5ea6bfce56d6ae7be6d85e05b5e4eaebc94d1005 (diff)
move openbsc/* to repos root
This is the first step in creating this repository from the legacy openbsc.git. Like all other Osmocom repositories, keep the autoconf and automake files in the repository root. openbsc.git has been the sole exception, which ends now. Change-Id: I9c6f2a448d9cb1cc088cf1cf6918b69d7e69b4e7
Diffstat (limited to 'doc/examples/osmo-gtphub/gtphub-example.txt')
-rw-r--r--doc/examples/osmo-gtphub/gtphub-example.txt90
1 files changed, 90 insertions, 0 deletions
diff --git a/doc/examples/osmo-gtphub/gtphub-example.txt b/doc/examples/osmo-gtphub/gtphub-example.txt
new file mode 100644
index 000000000..9c65f925f
--- /dev/null
+++ b/doc/examples/osmo-gtphub/gtphub-example.txt
@@ -0,0 +1,90 @@
+Here is a simple setup to test GTPHub operations. The IP addresses picked will
+work well only on a system that creates local addresses (127.0.0.123) on the
+fly (like linux) -- you may pick of course different IP addresses.
+
+Overview of the example setup:
+
+ sgsnemu gtphub ggsn
+ 127.0.0.1 <--> 127.0.0.3 127.0.0.4 <--> 127.0.0.2
+
+Prerequisites: openggsn.
+
+Have a local directory where you store config files and from which you launch
+the GSNs and the hub (they will store restart counter files in that dir).
+In it, have these config files:
+
+ggsn.conf:
+
+ # GGSN local address
+ listen 127.0.0.2
+
+ # End User Addresses are picked from this range
+ net 10.23.42.0/24
+
+ pcodns1 8.8.8.8
+
+ logfile /tmp/foo
+
+gtphub.conf:
+
+ gtphub
+ bind-to-sgsns 127.0.0.3
+ bind-to-ggsns 127.0.0.4
+ ggsn-proxy 127.0.0.2
+ end
+
+
+(
+You may omit the ggsn-proxy if GRX ares is working, or if you add the GRX
+address and GGSN IP address to /etc/hosts something like:
+
+ 127.0.0.2 internet.mnc070.mcc901.gprs
+
+)
+
+
+Once the config files are in place, start the programs, in separate terminals.
+GGSN and SGSN need to be started with root priviliges to be able to create tun
+interfaces. GTPHub may run as unprivileged user.
+
+The LD_LIBRARY_PATH below may be needed if OpenGGSN installed to /usr/local.
+
+
+1. GGSN:
+
+ sudo -s
+ cd <your-test-dir>
+ LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/ggsn -f -c ./ggsn.conf
+
+2. GTPHub:
+
+ cd <your-test-dir>
+ path/to/openbsc/openbsc/src/gprs/osmo-gtphub -c gtphub.conf #-e 1 #for DEBUG level
+
+3. SGSN tests:
+
+ sudo -s
+ cd <your-test-dir>
+ /usr/local/bin/sgsnemu --createif -l 127.0.0.1 -r 127.0.0.3 --imsi 420001214365100 --contexts=3
+
+Add more SGSNs using different IMSIs and local ports (if the same IMSI is used,
+the GGSN will reuse TEIs and tunnels will be discarded automatically):
+
+ /usr/local/bin/sgsnemu --createif -l 127.0.0.11 -r 127.0.0.3 --imsi 420001214365300 --contexts=3
+
+This shows the basic setup of GTPHub. Testing internet traffic via sgsnemu
+still needs some effort to announce a mobile subscriber or the like (I have
+used a real BTS, osmo-sgsn and a testing SIM in a web phone, instead).
+
+The core capability of GTPHub is to manage more than two GSNs, e.g. an SGSN
+contacting various GGSNs over the single GTPHub link. You would configure the
+SGSN to use one fixed GGSN (sending to gtphub) and gtphub will resolve the
+GGSNs once it has received the messages. So the SGSN may be behind NAT (add
+"sgsn-use-sender" to gtphub.conf) and communicate to various GGSNs over a
+single link to gtphub.
+
+I hope this helps to get you going.
+Any suggestions/patches are welcome!
+
+~Neels
+