blob: 9c65f925f93f0e7be194430e4364693016b1801a [file] [log] [blame]
Neels Hofmeyr5c7dcf92015-12-07 10:58:00 +01001Here is a simple setup to test GTPHub operations. The IP addresses picked will
2work well only on a system that creates local addresses (127.0.0.123) on the
3fly (like linux) -- you may pick of course different IP addresses.
4
5Overview of the example setup:
6
7 sgsnemu gtphub ggsn
8 127.0.0.1 <--> 127.0.0.3 127.0.0.4 <--> 127.0.0.2
9
10Prerequisites: openggsn.
11
12Have a local directory where you store config files and from which you launch
13the GSNs and the hub (they will store restart counter files in that dir).
14In it, have these config files:
15
16ggsn.conf:
17
18 # GGSN local address
19 listen 127.0.0.2
20
21 # End User Addresses are picked from this range
22 net 10.23.42.0/24
23
24 pcodns1 8.8.8.8
25
26 logfile /tmp/foo
27
28gtphub.conf:
29
30 gtphub
31 bind-to-sgsns 127.0.0.3
32 bind-to-ggsns 127.0.0.4
33 ggsn-proxy 127.0.0.2
34 end
35
36
37(
38You may omit the ggsn-proxy if GRX ares is working, or if you add the GRX
39address and GGSN IP address to /etc/hosts something like:
40
41 127.0.0.2 internet.mnc070.mcc901.gprs
42
43)
44
45
46Once the config files are in place, start the programs, in separate terminals.
47GGSN and SGSN need to be started with root priviliges to be able to create tun
48interfaces. GTPHub may run as unprivileged user.
49
50The LD_LIBRARY_PATH below may be needed if OpenGGSN installed to /usr/local.
51
52
531. GGSN:
54
55 sudo -s
56 cd <your-test-dir>
57 LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/ggsn -f -c ./ggsn.conf
58
592. GTPHub:
60
61 cd <your-test-dir>
62 path/to/openbsc/openbsc/src/gprs/osmo-gtphub -c gtphub.conf #-e 1 #for DEBUG level
63
Neels Hofmeyr5d5c31a2015-12-07 11:07:22 +0100643. SGSN tests:
Neels Hofmeyr5c7dcf92015-12-07 10:58:00 +010065
66 sudo -s
67 cd <your-test-dir>
Neels Hofmeyr5d5c31a2015-12-07 11:07:22 +010068 /usr/local/bin/sgsnemu --createif -l 127.0.0.1 -r 127.0.0.3 --imsi 420001214365100 --contexts=3
69
70Add more SGSNs using different IMSIs and local ports (if the same IMSI is used,
71the GGSN will reuse TEIs and tunnels will be discarded automatically):
72
73 /usr/local/bin/sgsnemu --createif -l 127.0.0.11 -r 127.0.0.3 --imsi 420001214365300 --contexts=3
Neels Hofmeyr5c7dcf92015-12-07 10:58:00 +010074
75This shows the basic setup of GTPHub. Testing internet traffic via sgsnemu
76still needs some effort to announce a mobile subscriber or the like (I have
77used a real BTS, osmo-sgsn and a testing SIM in a web phone, instead).
78
Neels Hofmeyr5d5c31a2015-12-07 11:07:22 +010079The core capability of GTPHub is to manage more than two GSNs, e.g. an SGSN
80contacting various GGSNs over the single GTPHub link. You would configure the
81SGSN to use one fixed GGSN (sending to gtphub) and gtphub will resolve the
82GGSNs once it has received the messages. So the SGSN may be behind NAT (add
83"sgsn-use-sender" to gtphub.conf) and communicate to various GGSNs over a
84single link to gtphub.
85
Neels Hofmeyr5c7dcf92015-12-07 10:58:00 +010086I hope this helps to get you going.
87Any suggestions/patches are welcome!
88
89~Neels
90