logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

sgsnemu - Serving GPRS Support Node Emulator

Authors

       Jens Jakobsen <jj@openggsn.org>

                                                    May 2004                                          sgsnemu(8)

Bugs

       Report all bugs to the OsmoGGSN bug tracking list at http://osmocom.org/projects/openggsn/issues

Description

sgsnemu is part of the OsmoGGSN project, and implements a Serving GPRS Support Node (SGSN)  emulator.  It
       can  be  used  for testing Gateway GPRS Support Nodes (GGSNs), GPRS core networks as well as GPRS roaming
       connections.

       The GPRS functionality and protocols has been standardised by the Third  Generation  Partnership  Project
       (3GPP).  According  to  the  3GPP  specifications an SGSN has several interfaces.  sgsnemu implements the
       Gn/Gp interface which is used towards GGSNs.

       The Gn/Gp interface can be seen as the uplink interface of the SGSN. It is used for communicating with  a
       GGSN  which  is typically connected to the Internet. The Gn/Gp interface uses the GPRS tunneling protocol
       (GTP). User data packets (typically IP packets) are tunneled over GTP, which again uses UDP over IP.

       sgsnemu will establish a number of connections to the GGSN. An internal ping facility will transmit  ping
       requests  through the established connections. Alternatively a local network interface can be created. In
       this case sgsnemu  will  forward  packets  between  the  local  network  interface  and  the  established
       connections on the Gn/Gp interface.

       sgsnemu  uses the TUN/TAPdriver for the local interface. A tun network interface is established for each
       connection established to the GGSN.

       Runtime errors are reported using the Osmocom logging framework.

Files

sgsnemu.conf
              The configuration file for sgsnemu..sgsnemu.pid
              Process ID file.
       ./
              Directory holding nonvolatile data.

Name

       sgsnemu - Serving GPRS Support Node Emulator

Notes

       Besides  the long options documented in this man page sgsnemu also accepts a number of short options with
       the same functionality. Use sgsnemu--help for a full list of all the available options.

       The TUN/TAP driver is required for proper operation of sgsnemu.  For linux kernels later than  2.4.7  the
       TUN/TAP  driver  is  included in the kernel, but typically needs to be loaded manually with modprobetun.
       For automatic loading the line aliaschar-major-10-200tun can be added to /etc/modules.conf.  For  other
       platforms  see  http://vtun.sourceforge.net/tun/  for information on how to install and configure the tun
       driver.

       sgsnemu uses the GPRS Tunneling Protocol (GTP) as specified by the Third Generation  Partnership  Project
       (3GPP). 3GPP protocols specifications can be found at http://www.3gpp.org

Options

--help Print help and exit.

       --version
              Print version and exit.

       --debug
              Run in debug mode (default = off)

       --conffile
              Read configuration file where each line corresponds to one  command  line  option,  but  with  the
              leading '--' removed. Command line options override the options given in the configuration file.

       --pidfilefile
              Filename of process id file (default = ./sgsnemu.pid)

       --statedirpathpath to directory of nonvolatile data (default = ./)

       --dnshost
              DNS server to use for APN lookups. If omitted the default system DNS configuration will be used.

       --listenhost
              Local  interface  IP address to use for the Gn/Gp interface. If omitted sgsnemu will listen to any
              IP address.

       --remotehost
              GGSN host to connect to. If DNS is setup correctly it should be possible  to  specify  the  access
              point name (APN) as the remote host.

       --contextsnum
              Number  of  contexts  to  establish. (default = 1). For multiple contexts the the first context is
              established using imsi + 0 and msisdn + 0. The second context is established using imsi  +  1  and
              msisdn + 1. The third....

       --timelimitseconds
              Exit sgsnemu after seconds.  When using the ping facility sgsnemu will also exit after --pingcount
              packets has been transmitted.

       --gtpversionversionversion  of GTP to use when establishing a context (default = 1). If not able to establish a GTPv1
              context sgsnemu will fall back to using GTPv0.

       --apnapnapn to use when connecting to the GGSN (default = internet). APN  is  an  abbreviation  of  Access
              Point Name.

       --selmodeselmode
              Selection  mode to use when connecting to the GGSN (default = 0x01). The encoding of the selection
              mode is as follows: 0: MS or network provided  APN,  subscribed  verified,  1:  MS  provided  APN,
              subscription not verified, 2: Network provided APN, subscription not verified.

       --imsiimsiimsi  to  use  when connecting to the GGSN (default = 240010123456789). IMSI is an abbreviation of
              International Mobile Subscriber Identity. Must be exactly 15 digits. See the contexts  option  for
              the the use of the imsi option with multiple contexts.

       --nsapinsapinsapi to use when connecting to the GGSN (default = 0). Must be between 0 and 15.

       --msisdnmsisdnmsisdn  to  use  when connecting to the GGSN (default = 46702123456). MSISDN is an abbreviation of
              International  Mobile  Integrated  Services  Digital  Network.  Effectively  a  phone  number   in
              international format without the leading 00 or 011. See the contexts option for the the use of the
              msisdn option with multiple contexts.

       --qosqosqos  to use when connecting to the GGSN (default = 0x0b921f). QoS is an abbreviation of Quality of
              Service. See 3GPP specification 09.60 for the format of this string.

       --chargingcharging
              Charging characteristics to use when connecting to the GGSN (default = 0x0800). 0x0800  =  Normal,
              0x0400  = Prepaid, 0x0200 = Flat rate, 0x0100 = Hot billing. See 3GPP specification 32.015 for the
              format of this field.

       --uiduid
              User ID to send to GGSN as protocol configuration option.

       --pwdpws
              Password to send to GGSN as protocol configuration option.

       --createif
              Create a local tun interface. This interface will be used for forwarding packets to and  from  the
              Gn/Gp  interface. Use with caution as the Gn/Gp interface is normally be routed to the Internet by
              the GGSN. Only one interface will be created,  even  if  several  contexts  are  established.  The
              interface  will  be  given  an  IP  address  for  each  established context, or the address can be
              specified with the net option.

       --netnet
              Network address of the local interface. The net option is only valid when the createif  option  is
              used.  The  net  option  is  given in cidr format (net/mask bits). If the net option omitted an IP
              address is allocated for each context established.

       --defaultroute
              Create a defaultroute to the local tun interface.

       --ipupscript
              Script executed after the tun network interface has been brought up.  Executed with the  following
              parameters: <devicename> <ip address>

       --ipdownscript
              Script  executed after the tun network interface has been taken down.  Executed with the following
              parameters: <devicename> <ip address>

       --pinghosthost
              Ping host through the Gn/GP interface. Ping statistics are reported much like done by the original
              ping program. Use this facility for performance test of GGSNs.

       --pingratenum
              Number of ping requests per second (default = 1)

       --pingsizenum
              The size of each ping requests in octets (default = 56)

       --pingcountnum
              Number of ping requests to send (default = 0). A value of 0 (zero) indicates infinite.

       --pingquiet
              Do not print information for each packet received (default  =  off).  Is  quite  useful  for  high
              pingrates.

See Also

ggsn(8)

Synopsis

sgsnemu --help

       sgsnemu --version

       sgsnemu [ --debug ] [ --conffile ] [ --pidfilefile ] [ --statedirfile ] [ --dnshost ] [ --listenhost
       ]  [  --remotehost ] [ --contextsnum ] [ --timelimitseconds ] [ --gtpversionversion ] [ --apnapn ] [
       --selmodeselmode ] [ --imsiimsi ] [ --nsapinsapi ] [ --msisdnmsisdn ] [  --qosqos  ]  [  --chargingcharging  ] [ --uiduid ] [ --pwdpwd ] [ --createif ] [ --netnet ] [ --defaultroute ] [ --ipupscript ]
       [ --ipdownscript ] [ --pinghosthost ] [ --pingratenum ] [ --pingsizenum ] [ --pingcountnum ]

See Also