Small HOWTO on roaming testing in README file
This commit is contained in:
parent
0ac82a12e7
commit
bcbfb41a18
141
README
141
README
|
@ -12,11 +12,11 @@ Tun
|
||||||
Both ggsn and sgsnemu uses the tun package. You need at least tun
|
Both ggsn and sgsnemu uses the tun package. You need at least tun
|
||||||
version 1.1. See http://vtun.sourceforge.net/tun/ for instructions on
|
version 1.1. See http://vtun.sourceforge.net/tun/ for instructions on
|
||||||
installation. Tun is included in the kernel from early version 2.4, so
|
installation. Tun is included in the kernel from early version 2.4, so
|
||||||
you will not normall need to install it. You do however need to do the
|
you will not normally need to install it. For Redhat 7.1 and 7.2 you
|
||||||
following:
|
do however need to do the following:
|
||||||
mkdir /dev/net
|
mkdir /dev/net
|
||||||
mknod /dev/net/tun c 10 200
|
mknod /dev/net/tun c 10 200
|
||||||
Add the following line to /etc/modules.conf: alias char-major-10-200 tun
|
Add this line to /etc/modules.conf: alias char-major-10-200 tun
|
||||||
depmod -a
|
depmod -a
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ make install
|
||||||
Add /usr/local/lib to /etc/ld.so.conf
|
Add /usr/local/lib to /etc/ld.so.conf
|
||||||
Run ldconfig
|
Run ldconfig
|
||||||
|
|
||||||
|
|
||||||
RUNNING
|
RUNNING
|
||||||
|
|
||||||
sgsnemu
|
sgsnemu
|
||||||
|
@ -42,7 +43,7 @@ Start the emulator using the command:
|
||||||
|
|
||||||
This will cause the sgsn emulator to bind to local address 10.20.30.50
|
This will cause the sgsn emulator to bind to local address 10.20.30.50
|
||||||
and connect to the ggsn found at 10.20.30.40. It will first send off
|
and connect to the ggsn found at 10.20.30.40. It will first send off
|
||||||
an ECHO_REQUEST message. After this it will attemt to establish a pdp
|
an ECHO_REQUEST message. After this it will attempt to establish a pdp
|
||||||
context. If successful it will create a local interface and set up
|
context. If successful it will create a local interface and set up
|
||||||
routing. Now you should be able to ping through the connection. Use a
|
routing. Now you should be able to ping through the connection. Use a
|
||||||
network analysator such as ethereal to monitor the traffic.
|
network analysator such as ethereal to monitor the traffic.
|
||||||
|
@ -55,7 +56,11 @@ Start the ggsn using the command:
|
||||||
ggsn --fg -c examples/ggsn.conf -l 10.20.30.40 --statedir .
|
ggsn --fg -c examples/ggsn.conf -l 10.20.30.40 --statedir .
|
||||||
|
|
||||||
This will run the ggsn in foreground using the local interface
|
This will run the ggsn in foreground using the local interface
|
||||||
10.20.30.40
|
10.20.30.40. Of cause you can use sgsnemu to test the GGSN.
|
||||||
|
|
||||||
|
|
||||||
|
SUPPORT
|
||||||
|
If you have any questions drop me a line at jj@openggsn.org.
|
||||||
|
|
||||||
|
|
||||||
*** Features ***
|
*** Features ***
|
||||||
|
@ -71,7 +76,8 @@ OpenGGSN provides 3 components:
|
||||||
gtplib
|
gtplib
|
||||||
This library contains all functionality relating to the GTP
|
This library contains all functionality relating to the GTP
|
||||||
protocol. Use this libraty if you want to implement your own
|
protocol. Use this libraty if you want to implement your own
|
||||||
GSN. Currently gtplib supports GTPv0.
|
GSN. Currently gtplib supports GTPv0. At the moment no interface
|
||||||
|
documentation is available for download.
|
||||||
|
|
||||||
ggsn
|
ggsn
|
||||||
The ggsn implements a Gateway GPRS Support Node. The GGSN is a small
|
The ggsn implements a Gateway GPRS Support Node. The GGSN is a small
|
||||||
|
@ -83,15 +89,14 @@ with your own fancy VPN, management and charging functionality.
|
||||||
|
|
||||||
sgsnemu
|
sgsnemu
|
||||||
This application emulates a Serving GPRS Support Node (SGSN). sgsnemu
|
This application emulates a Serving GPRS Support Node (SGSN). sgsnemu
|
||||||
enable you to test your 3GPP core network without the need to invest
|
enables you to test your 3GPP core network without the need to invest
|
||||||
in a 3G radio access network. An important application of sgsnemu is
|
in a 3G radio access network. An important application of sgsnemu is
|
||||||
the testing of roaming connectivity through a GPRS roaming exchange.
|
the testing of roaming connectivity through a GPRS roaming exchange.
|
||||||
|
|
||||||
|
|
||||||
*** Required software ***
|
*** Required software ***
|
||||||
|
|
||||||
TUN
|
TUN (http://vtun.sourceforge.net/tun/)
|
||||||
http://vtun.sourceforge.net/tun/
|
|
||||||
|
|
||||||
Both ggsn and sgsnemu uses the tun package. You need at least tun
|
Both ggsn and sgsnemu uses the tun package. You need at least tun
|
||||||
version 1.1. See the above web page for instructions on
|
version 1.1. See the above web page for instructions on
|
||||||
|
@ -104,14 +109,11 @@ Add the following line to /etc/modules.conf: alias char-major-10-200 tun
|
||||||
depmod -a
|
depmod -a
|
||||||
|
|
||||||
|
|
||||||
GENGETOPT
|
GENGETOPT (http://www.gnu.org/software/gengetopt/gengetopt.html)
|
||||||
http://www.gnu.org/software/gengetopt/gengetopt.html
|
|
||||||
|
|
||||||
Gengetopt is required if you want to change the options defined in the
|
Gengetopt is required if you want to change the options defined in the
|
||||||
cmdline.ggo source file. You need at least gengetopt version 2.8.
|
cmdline.ggo source file. You need at least gengetopt version 2.8. If
|
||||||
|
you are just going to compile the programs you don't need gengetopt.
|
||||||
If you are just going to compile the programs you don't need
|
|
||||||
gengetopt.
|
|
||||||
|
|
||||||
To use gengetopt for the ggsn do the following:
|
To use gengetopt for the ggsn do the following:
|
||||||
cd ggsn
|
cd ggsn
|
||||||
|
@ -146,8 +148,113 @@ On RedHat add /usr/local/lib to /etc/ld.so.conf
|
||||||
http://www.dwheeler.com/program-library/Program-Library-HOWTO/shared-libraries.html
|
http://www.dwheeler.com/program-library/Program-Library-HOWTO/shared-libraries.html
|
||||||
|
|
||||||
*** Running ggsn ***
|
*** Running ggsn ***
|
||||||
Use ggsn -h for a list of available options.
|
|
||||||
|
Use ggsn -h for a list of available options. All options available on
|
||||||
|
the command line can also be given in a configuration file. See
|
||||||
|
examples/ggsn.conf for the format of this file.
|
||||||
|
|
||||||
*** Running sgsnemu ***
|
*** Running sgsnemu ***
|
||||||
Use sgsnemu -h for a list of available options.
|
|
||||||
|
Use sgsnemu -h for a list of available options. All options available
|
||||||
|
on the command line can also be given in a configuration file. See
|
||||||
|
examples/sgsnemu.conf for the format of this file.
|
||||||
|
|
||||||
|
If you want to test a GRX roaming connection you will need to do the
|
||||||
|
following:
|
||||||
|
|
||||||
|
1) Install sgsnemu on a Linux Box. See under installation above.
|
||||||
|
|
||||||
|
2) Connect your Linux box with sgsnemu installed to the GPRS core
|
||||||
|
network. Use the same LAN switch as the one your SGSN is connected
|
||||||
|
to. You also need a free IP address that can be used by sgsnemu.
|
||||||
|
|
||||||
|
3) You need to configure networking in terms of interface address,
|
||||||
|
subnet mask and default route. See the Linux Networking HOWTO for
|
||||||
|
details.
|
||||||
|
|
||||||
|
4) Launch sgsnemu with something like:
|
||||||
|
|
||||||
|
sgsnemu --fg --listen 10.20.30.50 --remote 10.20.30.40 --dns 10.20.38.51 --timelimit 10 --contexts 0
|
||||||
|
|
||||||
|
sgsnemu will print something like the following on the screen:
|
||||||
|
|
||||||
|
Using DNS server: 10.20.38.51 (10.20.38.51)
|
||||||
|
Local IP address is: 10.20.30.50 (10.20.30.50)
|
||||||
|
Remote IP address is: 10.20.30.40 (10.20.30.40)
|
||||||
|
IMSI is: 240011234567890 (0x98765432110042)
|
||||||
|
Using APN: internet
|
||||||
|
Using MSISDN: 46702123456
|
||||||
|
|
||||||
|
Initialising GTP library
|
||||||
|
OpenGGSN[1823]: GTP: gtp_newgsn() started
|
||||||
|
Done initialising GTP library
|
||||||
|
|
||||||
|
Sending off echo request
|
||||||
|
Waiting for response from ggsn........
|
||||||
|
|
||||||
|
Received echo response. Cause value: 0
|
||||||
|
|
||||||
|
This is quite good. It means that you managed to send off an echo
|
||||||
|
request to a remote GGSN, and it was friendly enough to answer you. If
|
||||||
|
you did not get an echo response it means that something is wrong
|
||||||
|
either with your setup OR with the GRX connection OR with your roaming
|
||||||
|
partners connection.
|
||||||
|
|
||||||
|
If the above went well you might want to try to establish a PDP
|
||||||
|
context to the remote GGSN. Note that you should be carefull when
|
||||||
|
establishing PDP contexts using sgsnemu as each established PDP
|
||||||
|
context will result in a Charge Detail Record (CDR) being generated by
|
||||||
|
the GGSN. You should use real IMSI and MSISDN from a valid test SIM
|
||||||
|
card. Otherwise some poor customer might get charged for your
|
||||||
|
testing. Also note that you are establishing a connection to the Gi
|
||||||
|
netowrk, so please be carefull not to route internet traffic onto the
|
||||||
|
GPRS core network! Assuming you know what you are doing:
|
||||||
|
|
||||||
|
sgsnemu --fg --listen 10.20.30.50 --remote 10.20.30.40 --dns 10.20.38.51 --timelimit 10 --contexts 1 --apn internet --imsi 240011234567890 --msisdn 46702123456 --net 192.168.0.0 --mask 255.255.255.0
|
||||||
|
|
||||||
|
sgsnemu will print something like the following on the screen:
|
||||||
|
|
||||||
|
Using DNS server: 10.20.38.51 (10.20.38.51)
|
||||||
|
Local IP address is: 10.20.30.50 (10.20.30.50)
|
||||||
|
Remote IP address is: 10.20.30.40 (10.20.30.40)
|
||||||
|
IMSI is: 240011234567890 (0x98765432110042)
|
||||||
|
Using APN: internet
|
||||||
|
Using MSISDN: 46702123456
|
||||||
|
|
||||||
|
Initialising GTP library
|
||||||
|
OpenGGSN[1838]: GTP: gtp_newgsn() started
|
||||||
|
Done initialising GTP library
|
||||||
|
|
||||||
|
Sending off echo request
|
||||||
|
Setting up PDP context #0
|
||||||
|
Waiting for response from ggsn........
|
||||||
|
|
||||||
|
Received echo response. Cause value: 0
|
||||||
|
Received create PDP context response. Cause value: 128
|
||||||
|
Setting up interface and routing
|
||||||
|
/sbin/ifconfig tun0 192.168.0.1
|
||||||
|
/sbin/route add -net 192.168.0.0 netmask 255.255.255.0 gw 192.168.0.1
|
||||||
|
|
||||||
|
|
||||||
|
Now a context is established to the remote GGSN. The IP address of the
|
||||||
|
context is 192.168.0.1. If you specified the correct --net and --mask
|
||||||
|
you should be able to ping a known address on the Gi network of the
|
||||||
|
roaming partner. You should even be able to do web browsing through
|
||||||
|
the PDP context.
|
||||||
|
|
||||||
|
Note however that you probably need to adjust your routing tables, so
|
||||||
|
that you make sure that all GRX traffic is routed to the GPRS core
|
||||||
|
network and everything else through the PDP context. The proper way to
|
||||||
|
do this is to use policy routing. Also note that you are effectively
|
||||||
|
connecting the same computer to both the Gn and Gi network, so please
|
||||||
|
be carefull not to route internet traffic onto the GPRS core network
|
||||||
|
and please protect yourself against hackers! For this reason it is
|
||||||
|
advised to always use --contexts 0 when testing a live network.
|
||||||
|
|
||||||
|
After --timelimit seconds the PDP context is disconnected with the
|
||||||
|
following messages from sgsnemu:
|
||||||
|
|
||||||
|
Disconnecting PDP context #0
|
||||||
|
Received delete PDP context response. Cause value: 128
|
||||||
|
Deleting tun interface
|
||||||
|
|
||||||
|
|
Reference in New Issue