sgsnemu(8)

πŸ“¦
version 1.13.0 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– sgsnemu(8) β€” Serving GPRS Support Node Emulator πŸ’–

okay bestie, sit down, hydrate, because this is the System Manager's Manual page for sgsnemu(8) and it's genuinely iconic. it's a whole SGSN emulator in your terminal and i'm obsessed πŸ’…


✨ SYNOPSIS ✨

sgsnemu --help

sgsnemu --version

sgsnemu [ --debug ] [ --conf file ] [ --pidfile file ] [ --statedir file ] [ --dns host ] [ --listen host ] [ --remote host ] [ --contexts num ] [ --timelimit seconds ] [ --gtpversion version ] [ --apn apn ] [ --selmode selmode ] [ --imsi imsi ] [ --nsapi nsapi ] [ --msisdn msisdn ] [ --qos qos ] [ --charging charging ] [ --uid uid ] [ --pwd pwd ] [ --createif ] [ --net net ] [ --defaultroute ] [ --ipup script ] [ --ipdown script ] [ --pinghost host ] [ --pingrate num ] [ --pingsize num ] [ --pingcount num ]

🌸 DESCRIPTION 🌸

sgsnemu is part of the OsmoGGSN project, and it implements a Serving GPRS Support Node (SGSN) emulator. literally what it says on the tin. you use it to test Gateway GPRS Support Nodes (GGSNs), GPRS core networks, and GPRS roaming connections. that's the whole vibe check and it passes 🫢

the GPRS functionality and protocols were standardised by the Third Generation Partnership Project (3GPP) β€” shoutout. per the 3GPP specs, an SGSN has several interfaces. sgsnemu implements the Gn/Gp interface, which is the one used towards GGSNs.

so think of the Gn/Gp interface as the uplink interface of the SGSN. it talks to a GGSN, and that GGSN is typically connected to the Internet. Gn/Gp uses the GPRS tunneling protocol (GTP). user data packets (usually IP packets, bestie) get tunneled over GTP, and GTP itself rides on UDP over IP. layers on layers on layers, it's giving onion πŸ§…

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 that case sgsnemu will forward packets between the local network interface and the established connections on the Gn/Gp interface.

sgsnemu uses the TUN/TAP driver 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. no cap.


✨ OPTIONS ✨

here's the full lineup, no skips, no "oh you probably won't need that one" energy. every single one πŸ’–

  • --help β€” print help and exit. the classic.
  • --version β€” print version and exit.
  • --debug β€” run in debug mode (default = off)
  • --conf file β€” read a 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. yeah, CLI wins, main character energy πŸ‘‘
  • --pidfile file β€” filename of process id file (default = ./sgsnemu.pid)
  • --statedir path β€” path to directory of nonvolatile data (default = ./)
  • --dns host β€” DNS server to use for APN lookups. if omitted, the default system DNS configuration will be used.
  • --listen host β€” local interface IP address to use for the Gn/Gp interface. if omitted, sgsnemu will listen to any IP address.
  • --remote host β€” GGSN host to connect to. if DNS is set up correctly, it should be possible to specify the access point name (APN) as the remote host.
  • --contexts num β€” number of contexts to establish (default = 1). for multiple contexts, the first context is established using imsi + 0 and msisdn + 0. the second context is established using imsi + 1 and msisdn + 1. the third… you get it, it just keeps counting πŸ“ˆ
  • --timelimit seconds β€” exit sgsnemu after seconds. when using the ping facility, sgsnemu will also exit after --pingcount packets have been transmitted. two ways out, pick your fave.
  • --gtpversion version β€” version 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. it's got a plan B, we love a resilient queen.
  • --apn apn β€” apn to use when connecting to the GGSN (default = internet). APN is short for Access Point Name.
  • --selmode selmode β€” 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.
  • --imsi imsi β€” imsi to use when connecting to the GGSN (default = 240010123456789). IMSI is short for International Mobile Subscriber Identity. must be exactly 15 digits, no more no less, she counts. see the contexts option for the use of the imsi option with multiple contexts.
  • --nsapi nsapi β€” nsapi to use when connecting to the GGSN (default = 0). must be between 0 and 15.
  • --msisdn msisdn β€” msisdn to use when connecting to the GGSN (default = 46702123456). MSISDN is short for 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 use of the msisdn option with multiple contexts.
  • --qos qos β€” qos to use when connecting to the GGSN (default = 0x0b921f). QoS is short for Quality of Service. see 3GPP specification 09.60 for the format of this string.
  • --charging charging β€” 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.
  • --uid uid β€” User ID to send to GGSN as protocol configuration option.
  • --pwd pws β€” Password to send to GGSN as protocol configuration option. (yes, bestie, the placeholder really is spelled pws on the page. we keep it exactly as it is, no editing the original, periodt πŸ’…)
  • --createif β€” create a local tun interface. this interface will be used for forwarding packets to and from the Gn/Gp interface. > use with caution β€” the Gn/Gp interface is normally 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.
  • --net net β€” 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 is omitted, an IP address is allocated for each context established.
  • --defaultroute β€” create a defaultroute to the local tun interface.
  • --ipup script β€” script executed after the tun network interface has been brought up. executed with the following parameters: <devicename> <ip address>
  • --ipdown script β€” script executed after the tun network interface has been taken down. executed with the following parameters: <devicename> <ip address>
  • --pinghost host β€” 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. πŸ“
  • --pingrate num β€” number of ping requests per second (default = 1)
  • --pingsize num β€” the size of each ping requests in octets (default = 56)
  • --pingcount num β€” 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. (yes, it's not in the synopsis but it's absolutely real, i see you noticing πŸ‘€)

πŸŽ€ FILES πŸŽ€

  • sgsnemu.conf β€” the configuration file for sgsnemu.
  • .sgsnemu.pid β€” Process ID file.
  • ./ β€” directory holding nonvolatile data.

πŸ’€ BUGS πŸ’€

report all bugs to the OsmoGGSN bug tracking list at http://osmocom.org/projects/openggsn/issues β€” do not suffer in silence, bestie, they want to hear from you.


🌈 SEE ALSO 🌈

  • ggsn(8) β€” its whole counterpart, the other half of the duo 🫢

πŸ’œ 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. iykyk.

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 modprobe tun. for automatic loading, the line alias char-major-10-200 tun 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 protocol specifications can be found at http://www.3gpp.org ✨


Copyright (C) 2002, 2003, 2004 by Mondru AB.

the contents of this file may be used under the terms of the GNU General Public License Version 2, provided that the above copyright notice and this permission notice is included in all copies or substantial portions of the software. read the license, love the license, respect the license 🫢


πŸ‘‘ AUTHORS πŸ‘‘

Jens Jakobsen <jj@openggsn.org> β€” thank you for your service, legend 🌟


<div align="center">

okay that's the whole page, you're officially a Gn/Gp girlie now πŸ’… this was the sgsnemu(8) page from the System Manager's Manual, dated May 2004, and you can find it filed right under sgsnemu(8) in your man pages. go forth and emulate an SGSN responsibly, bestie πŸ’–βœ¨πŸ¦‹

</div>