jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 1 | OPENGGSN README |
| 2 | =============== |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 3 | |
jjako | 0ac82a1 | 2003-01-05 18:36:33 +0000 | [diff] [blame] | 4 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 5 | QuickStart |
| 6 | ========== |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 7 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 8 | |
| 9 | Requirements |
| 10 | ------------ |
| 11 | |
| 12 | *Linux* |
jjako | aa0a0ab | 2004-01-10 02:02:04 +0000 | [diff] [blame] | 13 | OpenGGSN was developed and tested using Redhat 8.0 and 9.0 and Solaris |
| 14 | 2.8. It should run also on other Linux distributions as well as |
| 15 | FreeBSD, but this is untested. Please tell me of any |
| 16 | testing results. |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 17 | |
| 18 | *Tun* |
| 19 | The tun driver is required for proper operation of openggsn. For linux |
| 20 | kernels later than 2.4.7 the driver is typically included, but need |
| 21 | to be configured for automatic loading: |
| 22 | |
| 23 | 1. Add the following line to /etc/modules.conf: alias char-major-10-200 tun |
| 24 | 2. depmod -a |
| 25 | |
| 26 | |
| 27 | Installation from binary |
| 28 | ------------------------ |
| 29 | |
| 30 | rpm -i openggsn-<version>.rpm |
| 31 | |
| 32 | This will install binaries, man pages, configuration files as well as |
| 33 | a Sys V init script for the ggsn. |
| 34 | |
| 35 | |
| 36 | Installation from source |
| 37 | ------------------------ |
| 38 | |
| 39 | 1. ./configure |
| 40 | 2. make |
| 41 | 3. make install |
jjako | b306169 | 2003-01-14 17:13:26 +0000 | [diff] [blame] | 42 | |
| 43 | You need to be root in order to install the package, but not in order |
| 44 | to compile. |
| 45 | |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 46 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 47 | Running |
| 48 | ------- |
| 49 | |
| 50 | *sgsnemu* |
jjako | b306169 | 2003-01-14 17:13:26 +0000 | [diff] [blame] | 51 | Start the emulator as root using the command: |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 52 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 53 | sgsnemu -l 10.0.0.50 -r 10.0.0.40 --createif --defaultroute |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 54 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 55 | This will cause the sgsn emulator to bind to local address 10.0.0.50 |
| 56 | and connect to the ggsn found at 10.0.0.40. It will first send off an |
| 57 | ECHO_REQUEST message. After this it will attempt to establish a pdp |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 58 | context. If successful it will create a local interface and set up |
| 59 | routing. Now you should be able to ping through the connection. Use a |
| 60 | network analysator such as ethereal to monitor the traffic. |
| 61 | |
jjako | e3af7a7 | 2003-10-22 09:48:38 +0000 | [diff] [blame] | 62 | sgsnemu -h will show a list of available options. |
| 63 | |
| 64 | sgsnemu -c sgsnemu.conf will use sgsnemu.conf as a configuration |
| 65 | file. A sample file is provided in examples/sgsnemu.conf. |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 66 | |
| 67 | *ggsn* |
| 68 | Edit the configuration file ggsn.conf found under openggsn/examples. |
jjako | b306169 | 2003-01-14 17:13:26 +0000 | [diff] [blame] | 69 | Start the ggsn as root using the command: |
jjako | 0ac82a1 | 2003-01-05 18:36:33 +0000 | [diff] [blame] | 70 | |
jjako | 581c9f0 | 2003-10-22 11:28:20 +0000 | [diff] [blame] | 71 | ggsn --fg -c examples/ggsn.conf -l 10.0.0.40 --statedir ./ |
jjako | 0ac82a1 | 2003-01-05 18:36:33 +0000 | [diff] [blame] | 72 | |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 73 | This will run the ggsn in foreground using the local interface |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 74 | 10.0.0.40. If you don't have a GSM network available for testing you |
jjako | 9944eba | 2003-04-11 10:49:02 +0000 | [diff] [blame] | 75 | can use sgsnemu to test the GGSN. |
jjako | bcbfb41 | 2003-01-06 21:21:03 +0000 | [diff] [blame] | 76 | |
| 77 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 78 | Support |
| 79 | ------- |
| 80 | |
jjako | bcbfb41 | 2003-01-06 21:21:03 +0000 | [diff] [blame] | 81 | If you have any questions drop me a line at jj@openggsn.org. |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 82 | |
| 83 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 84 | Features |
| 85 | ======== |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 86 | |
| 87 | OpenGGSN is an open source implementation of GPRS Support Nodes |
jjako | e3af7a7 | 2003-10-22 09:48:38 +0000 | [diff] [blame] | 88 | (GSNs). It implements the GPRS tunneling protocol (GTP) version 0 and |
| 89 | version 1. |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 90 | |
| 91 | OpenGGSN provides 3 components: |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 92 | * gtplib |
| 93 | * ggsn |
| 94 | * sgsnemu |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 95 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 96 | *gtplib* |
jjako | 0ac82a1 | 2003-01-05 18:36:33 +0000 | [diff] [blame] | 97 | This library contains all functionality relating to the GTP |
jjako | 9944eba | 2003-04-11 10:49:02 +0000 | [diff] [blame] | 98 | protocol. Use this library if you want to implement your own |
jjako | e3af7a7 | 2003-10-22 09:48:38 +0000 | [diff] [blame] | 99 | GSN. gtplib supports both GTPv0 (GSM 09.60) and GTPv1 (3GPP |
| 100 | 29.060). At the moment no interface documentation is available for |
| 101 | download. |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 102 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 103 | *ggsn* |
jjako | 0ac82a1 | 2003-01-05 18:36:33 +0000 | [diff] [blame] | 104 | The ggsn implements a Gateway GPRS Support Node. The GGSN is a small |
| 105 | application which is provided in order to test and demonstrate the use |
| 106 | of gtplib. It is fully compliant to the 3GPP standards, but lacks |
| 107 | important functionality such as charging and management. Use this |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 108 | application as a starting point if you want to build your own GGSN |
| 109 | with your own fancy VPN, management and charging functionality. |
| 110 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 111 | *sgsnemu* |
jjako | 0ac82a1 | 2003-01-05 18:36:33 +0000 | [diff] [blame] | 112 | This application emulates a Serving GPRS Support Node (SGSN). sgsnemu |
jjako | bcbfb41 | 2003-01-06 21:21:03 +0000 | [diff] [blame] | 113 | enables you to test your 3GPP core network without the need to invest |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 114 | in a 3G radio access network. An important application of sgsnemu is |
jjako | e3af7a7 | 2003-10-22 09:48:38 +0000 | [diff] [blame] | 115 | the testing of roaming connectivity through a GPRS roaming |
| 116 | exchange. sgsnemu will first attempt to use GTPv1. If unsuccessful it |
| 117 | will fallback to GTPv0. |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 118 | |
jjako | 0ac82a1 | 2003-01-05 18:36:33 +0000 | [diff] [blame] | 119 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 120 | Performance |
| 121 | =========== |
jjako | 7bac2f8 | 2003-01-29 10:24:10 +0000 | [diff] [blame] | 122 | |
| 123 | Two experiments were performed in order to test the performance of |
| 124 | sgsnemu and ggsn. The ggsn used a 550 MHz Athlon with 384 MB of |
| 125 | RAM. sgsnemu used a 1 GHz Athlon with 256 MB of RAM. Both machines had |
jjako | afb2a97 | 2003-01-29 21:04:13 +0000 | [diff] [blame] | 126 | 100 Mb/s NICs (RTL-8139) and were connected through a crossed patch |
| 127 | cable. Both tests were performed by sending ICMP echo packets from |
| 128 | sgsnemu to the ggsn. |
jjako | 7bac2f8 | 2003-01-29 10:24:10 +0000 | [diff] [blame] | 129 | |
jjako | afb2a97 | 2003-01-29 21:04:13 +0000 | [diff] [blame] | 130 | 89.5 Mb/s IP throughput when sending 10000 ICMP ping packets with a |
| 131 | payload of 1400 bytes. Transfer time 1.27 sec, no packets lost. |
jjako | 7bac2f8 | 2003-01-29 10:24:10 +0000 | [diff] [blame] | 132 | |
jjako | afb2a97 | 2003-01-29 21:04:13 +0000 | [diff] [blame] | 133 | 71.4 Mb/s IP throughput when sending 10000 ICMP ping packets with a |
| 134 | payload of 1000 bytes. Transfer time 1.15 sec, no packets lost. |
| 135 | |
| 136 | 12,1 Mb/s IP throughput when sending 10000 ICMP ping packets with a |
| 137 | payload of 100 bytes. Transfer time 0.84 sec, no packets lost. |
jjako | 7bac2f8 | 2003-01-29 10:24:10 +0000 | [diff] [blame] | 138 | |
| 139 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 140 | Required software |
| 141 | ================= |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 142 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 143 | Tun |
| 144 | --- |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 145 | |
| 146 | Both ggsn and sgsnemu uses the tun package. You need at least tun |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 147 | version 1.1. With Linux tun is normally included from kernel version |
| 148 | 2.4.7. To configure automatic loading: |
jjako | 0ac82a1 | 2003-01-05 18:36:33 +0000 | [diff] [blame] | 149 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 150 | 1. Add the following line to /etc/modules.conf: alias char-major-10-200 tun |
| 151 | 2. depmod -a |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 152 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 153 | Alternatively you can execute "modprobe tun" on the commandline. |
| 154 | |
jjako | aa0a0ab | 2004-01-10 02:02:04 +0000 | [diff] [blame] | 155 | For Solaris the tun driver needs to be installed manually. For general |
| 156 | information about tun see http://vtun.sourceforge.net/tun/ |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 157 | |
| 158 | Gengetopt |
| 159 | --------- |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 160 | |
| 161 | Gengetopt is required if you want to change the options defined in the |
jjako | bcbfb41 | 2003-01-06 21:21:03 +0000 | [diff] [blame] | 162 | cmdline.ggo source file. You need at least gengetopt version 2.8. If |
| 163 | you are just going to compile the programs you don't need gengetopt. |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 164 | |
jjako | 0ac82a1 | 2003-01-05 18:36:33 +0000 | [diff] [blame] | 165 | To use gengetopt for the ggsn do the following: |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 166 | cd ggsn |
jjako | 0ac82a1 | 2003-01-05 18:36:33 +0000 | [diff] [blame] | 167 | gengetopt < cmdline.ggo --conf-parser |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 168 | |
jjako | 0ac82a1 | 2003-01-05 18:36:33 +0000 | [diff] [blame] | 169 | To use gengetopt for the sgsnemu do the following: |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 170 | cd sgsnemu |
jjako | 0ac82a1 | 2003-01-05 18:36:33 +0000 | [diff] [blame] | 171 | gengetopt < cmdline.ggo --conf-parser |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 172 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 173 | For more information about gengetopt see |
| 174 | http://www.gnu.org/software/gengetopt/gengetopt.html |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 175 | |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 176 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 177 | Compilation and Installation |
| 178 | ============================ |
| 179 | |
| 180 | |
| 181 | Setting up autotools |
| 182 | -------------------- |
jjako | b306169 | 2003-01-14 17:13:26 +0000 | [diff] [blame] | 183 | |
| 184 | You do not need to perform this step if you are only going to compile |
| 185 | the package: |
| 186 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 187 | 1. Get version from somewhere: Script to extract version from configure.in |
| 188 | 2. Copy the latest config.guess and config.sub from ftp://ftp.gnu.org/gnu/config |
| 189 | 3. Run autoscan and copy configure.scan to configure.in |
| 190 | 4. Add/edit the following lines in configure.in: |
jjako | e3af7a7 | 2003-10-22 09:48:38 +0000 | [diff] [blame] | 191 | - AC_INIT(openggsn, 0.70, jj@openggsn.org) |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 192 | - AC_CONFIG_SRCDIR([gtp/gtp.c]) |
| 193 | - AM_CONFIG_HEADER([config.h]) |
| 194 | - AC_PROG_LIBTOOL |
| 195 | - AM_PROG_LIBTOOL |
| 196 | - AM_INIT_AUTOMAKE() |
| 197 | 5. libtoolize --automake --copy |
jjako | b306169 | 2003-01-14 17:13:26 +0000 | [diff] [blame] | 198 | (ads copy of ltmain.sh) |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 199 | 6. aclocal |
| 200 | 7. autoheader |
| 201 | 8. automake --add-missing --copy |
jjako | 7bac2f8 | 2003-01-29 10:24:10 +0000 | [diff] [blame] | 202 | (Ads copy of mkinstalldirs missing, install-sh, depcomp) |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 203 | 9. automake |
| 204 | 10. autoconf |
jjako | b306169 | 2003-01-14 17:13:26 +0000 | [diff] [blame] | 205 | |
| 206 | The above will initialise the project to the current version of |
| 207 | autotools (As installed in RedHat 8.0). See |
| 208 | http://sources.redhat.com/autobook/autobook/autobook_25.html#SEC25 |
| 209 | for details on autotools. |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 210 | |
| 211 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 212 | Compilation and installation |
| 213 | ---------------------------- |
jjako | b306169 | 2003-01-14 17:13:26 +0000 | [diff] [blame] | 214 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 215 | 1. ./configure |
| 216 | 2. make clean |
| 217 | 3. cd gtp |
| 218 | 4. make |
| 219 | 5. make install (as root) |
| 220 | 6. cd .. |
jjako | b306169 | 2003-01-14 17:13:26 +0000 | [diff] [blame] | 221 | (Step 3 to 6 you only need to run the first time to install libgtp) |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 222 | 7. make |
| 223 | 8. make install (as root) |
| 224 | 9. Add /usr/local/lib to /etc/ld.so.conf |
| 225 | 10. run ldconfig |
| 226 | |
| 227 | (Steps 9 and 10 are not required as path to libgtp is included in Makefile) |
| 228 | |
| 229 | Documentation can be converted to html by issuing: |
| 230 | |
| 231 | 1. txt2html -pm -tf README > README.html |
| 232 | 2. txt2html -pm -tf NEWS > NEWS.html |
| 233 | 3. txt2html -pm -tf ChangeLog > ChangeLog.html |
| 234 | 4. man2htm ggsn.8 > ggsn.html |
| 235 | 5. man2htm sgsnemu.8 > sgsnemu.html |
jjako | b306169 | 2003-01-14 17:13:26 +0000 | [diff] [blame] | 236 | |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 237 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 238 | Installation from binary |
| 239 | ------------------------ |
| 240 | |
| 241 | 1. rpm -i openggsn-<version>.rpm |
| 242 | |
| 243 | This will install binaries, man pages, configuration files as well as |
| 244 | a Sys V init script for the ggsn. |
| 245 | |
| 246 | |
| 247 | Running ggsn |
| 248 | ============ |
jjako | bcbfb41 | 2003-01-06 21:21:03 +0000 | [diff] [blame] | 249 | |
| 250 | Use ggsn -h for a list of available options. All options available on |
| 251 | the command line can also be given in a configuration file. See |
| 252 | examples/ggsn.conf for the format of this file. |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 253 | |
jjako | afb2a97 | 2003-01-29 21:04:13 +0000 | [diff] [blame] | 254 | Start the ggsn as root using the command: |
| 255 | |
jjako | e3af7a7 | 2003-10-22 09:48:38 +0000 | [diff] [blame] | 256 | ggsn -c examples/ggsn.conf --fg -l 10.0.0.40 --net 192.168.0.0/24 --dynip 192.168.0.0/24 |
jjako | afb2a97 | 2003-01-29 21:04:13 +0000 | [diff] [blame] | 257 | |
| 258 | First a tun network interface will be created. In the above example |
| 259 | the network interface address is 192.168.0.0 and the mask is |
jjako | 9944eba | 2003-04-11 10:49:02 +0000 | [diff] [blame] | 260 | 255.255.255.0. You can check that this interface is up by using |
jjako | afb2a97 | 2003-01-29 21:04:13 +0000 | [diff] [blame] | 261 | ifconfig. |
| 262 | |
| 263 | After tun has been successfully established the ggsn will wait for GTP |
| 264 | create PDP context requests on the local interface |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 265 | 10.0.0.40. Currently all requests are accepted, and no password, |
jjako | 9944eba | 2003-04-11 10:49:02 +0000 | [diff] [blame] | 266 | username or APN validation is performed. |
jjako | afb2a97 | 2003-01-29 21:04:13 +0000 | [diff] [blame] | 267 | |
| 268 | When receiving a create PDP context request a dynamic IP address will |
jjako | 9944eba | 2003-04-11 10:49:02 +0000 | [diff] [blame] | 269 | be allocated from the address pool determined by --dynip. In the above |
| 270 | example the first allocated address will be 192.168.0.1, followed by |
| 271 | 192.168.0.2 and so on. The request is confirmed by sending a create |
| 272 | PDP context response message to the peer (SGSN). |
jjako | afb2a97 | 2003-01-29 21:04:13 +0000 | [diff] [blame] | 273 | |
| 274 | Now IP packets will be forwarded between the tun network interface and |
| 275 | the established GTP tunnel. In order to allow users to access the |
| 276 | external network routing needs to be set up. If private addresses are |
jjako | 9944eba | 2003-04-11 10:49:02 +0000 | [diff] [blame] | 277 | used you need to configure network address translation. See the Linux |
| 278 | Networking HOWTO for details. |
jjako | afb2a97 | 2003-01-29 21:04:13 +0000 | [diff] [blame] | 279 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 280 | Remember to enable routing: |
jjako | 7bac2f8 | 2003-01-29 10:24:10 +0000 | [diff] [blame] | 281 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 282 | echo 1 > /proc/sys/net/ipv4/ip_forward |
| 283 | |
| 284 | If you installed using a binary RPM package it is possible to start |
| 285 | ggsn by using the Sys 5 script: |
| 286 | |
| 287 | /etc/init.d/ggsn start |
| 288 | |
| 289 | |
| 290 | Running sgsnemu |
| 291 | =============== |
jjako | bcbfb41 | 2003-01-06 21:21:03 +0000 | [diff] [blame] | 292 | |
| 293 | Use sgsnemu -h for a list of available options. All options available |
| 294 | on the command line can also be given in a configuration file. See |
| 295 | examples/sgsnemu.conf for the format of this file. |
| 296 | |
| 297 | If you want to test a GRX roaming connection you will need to do the |
| 298 | following: |
| 299 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 300 | 1. Install sgsnemu on a Linux Box. See under installation above. |
| 301 | 2. Connect your Linux box with sgsnemu installed to the GPRS core |
jjako | bcbfb41 | 2003-01-06 21:21:03 +0000 | [diff] [blame] | 302 | network. Use the same LAN switch as the one your SGSN is connected |
| 303 | to. You also need a free IP address that can be used by sgsnemu. |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 304 | 3. You need to configure networking in terms of interface address, |
jjako | bcbfb41 | 2003-01-06 21:21:03 +0000 | [diff] [blame] | 305 | subnet mask and default route. See the Linux Networking HOWTO for |
| 306 | details. |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 307 | 4. Launch sgsnemu with something like: |
jjako | bcbfb41 | 2003-01-06 21:21:03 +0000 | [diff] [blame] | 308 | |
jjako | e3af7a7 | 2003-10-22 09:48:38 +0000 | [diff] [blame] | 309 | sgsnemu --listen 10.0.0.50 --remote 10.0.0.40 --dns 10.20.38.51 --timelimit 10 --contexts 0 |
jjako | bcbfb41 | 2003-01-06 21:21:03 +0000 | [diff] [blame] | 310 | |
| 311 | sgsnemu will print something like the following on the screen: |
| 312 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 313 | <PRE> |
| 314 | |
jjako | bcbfb41 | 2003-01-06 21:21:03 +0000 | [diff] [blame] | 315 | Using DNS server: 10.20.38.51 (10.20.38.51) |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 316 | Local IP address is: 10.0.0.50 (10.0.0.50) |
| 317 | Remote IP address is: 10.0.0.40 (10.0.0.40) |
jjako | bcbfb41 | 2003-01-06 21:21:03 +0000 | [diff] [blame] | 318 | IMSI is: 240011234567890 (0x98765432110042) |
| 319 | Using APN: internet |
| 320 | Using MSISDN: 46702123456 |
| 321 | |
| 322 | Initialising GTP library |
| 323 | OpenGGSN[1823]: GTP: gtp_newgsn() started |
| 324 | Done initialising GTP library |
| 325 | |
| 326 | Sending off echo request |
| 327 | Waiting for response from ggsn........ |
| 328 | |
| 329 | Received echo response. Cause value: 0 |
| 330 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 331 | </PRE> |
| 332 | |
jjako | bcbfb41 | 2003-01-06 21:21:03 +0000 | [diff] [blame] | 333 | This is quite good. It means that you managed to send off an echo |
| 334 | request to a remote GGSN, and it was friendly enough to answer you. If |
| 335 | you did not get an echo response it means that something is wrong |
| 336 | either with your setup OR with the GRX connection OR with your roaming |
| 337 | partners connection. |
| 338 | |
| 339 | If the above went well you might want to try to establish a PDP |
jjako | 7bac2f8 | 2003-01-29 10:24:10 +0000 | [diff] [blame] | 340 | context to the remote GGSN. Note that you should be careful when |
jjako | bcbfb41 | 2003-01-06 21:21:03 +0000 | [diff] [blame] | 341 | establishing PDP contexts using sgsnemu as each established PDP |
| 342 | context will result in a Charge Detail Record (CDR) being generated by |
| 343 | the GGSN. You should use real IMSI and MSISDN from a valid test SIM |
| 344 | card. Otherwise some poor customer might get charged for your |
| 345 | testing. Also note that you are establishing a connection to the Gi |
jjako | 7bac2f8 | 2003-01-29 10:24:10 +0000 | [diff] [blame] | 346 | network, so please be carefull not to route internet traffic onto the |
jjako | bcbfb41 | 2003-01-06 21:21:03 +0000 | [diff] [blame] | 347 | GPRS core network! Assuming you know what you are doing: |
| 348 | |
jjako | e3af7a7 | 2003-10-22 09:48:38 +0000 | [diff] [blame] | 349 | 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 |
jjako | bcbfb41 | 2003-01-06 21:21:03 +0000 | [diff] [blame] | 350 | |
| 351 | sgsnemu will print something like the following on the screen: |
| 352 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 353 | <PRE> |
| 354 | |
jjako | bcbfb41 | 2003-01-06 21:21:03 +0000 | [diff] [blame] | 355 | Using DNS server: 10.20.38.51 (10.20.38.51) |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 356 | Local IP address is: 10.0.0.50 (10.0.0.50) |
| 357 | Remote IP address is: 10.0.0.40 (10.0.0.40) |
jjako | bcbfb41 | 2003-01-06 21:21:03 +0000 | [diff] [blame] | 358 | IMSI is: 240011234567890 (0x98765432110042) |
| 359 | Using APN: internet |
| 360 | Using MSISDN: 46702123456 |
| 361 | |
| 362 | Initialising GTP library |
| 363 | OpenGGSN[1838]: GTP: gtp_newgsn() started |
| 364 | Done initialising GTP library |
| 365 | |
| 366 | Sending off echo request |
| 367 | Setting up PDP context #0 |
| 368 | Waiting for response from ggsn........ |
| 369 | |
| 370 | Received echo response. Cause value: 0 |
| 371 | Received create PDP context response. Cause value: 128 |
| 372 | Setting up interface and routing |
| 373 | /sbin/ifconfig tun0 192.168.0.1 |
| 374 | /sbin/route add -net 192.168.0.0 netmask 255.255.255.0 gw 192.168.0.1 |
| 375 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 376 | </PRE> |
jjako | bcbfb41 | 2003-01-06 21:21:03 +0000 | [diff] [blame] | 377 | |
| 378 | Now a context is established to the remote GGSN. The IP address of the |
jjako | 9944eba | 2003-04-11 10:49:02 +0000 | [diff] [blame] | 379 | context is 192.168.0.1. You should be able to ping a known address on |
| 380 | the Gi network of the roaming partner. You should even be able to do |
| 381 | web browsing through the PDP context. |
jjako | bcbfb41 | 2003-01-06 21:21:03 +0000 | [diff] [blame] | 382 | |
| 383 | Note however that you probably need to adjust your routing tables, so |
| 384 | that you make sure that all GRX traffic is routed to the GPRS core |
| 385 | network and everything else through the PDP context. The proper way to |
| 386 | do this is to use policy routing. Also note that you are effectively |
| 387 | connecting the same computer to both the Gn and Gi network, so please |
| 388 | be carefull not to route internet traffic onto the GPRS core network |
| 389 | and please protect yourself against hackers! For this reason it is |
| 390 | advised to always use --contexts 0 when testing a live network. |
| 391 | |
| 392 | After --timelimit seconds the PDP context is disconnected with the |
| 393 | following messages from sgsnemu: |
| 394 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 395 | |
| 396 | <PRE> |
| 397 | |
jjako | bcbfb41 | 2003-01-06 21:21:03 +0000 | [diff] [blame] | 398 | Disconnecting PDP context #0 |
| 399 | Received delete PDP context response. Cause value: 128 |
| 400 | Deleting tun interface |
jjako | 52c2414 | 2002-12-16 13:33:51 +0000 | [diff] [blame] | 401 | |
jjako | c13c9df | 2003-07-07 15:15:38 +0000 | [diff] [blame] | 402 | </PRE> |
| 403 | |