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