sgsnemu(8)
π 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)--conffile β 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 π--pidfilefile β filename of process id file (default =./sgsnemu.pid)--statedirpath β path 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,sgsnemuwill listen to any IP address.--remotehost β 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.--contextsnum β number of contexts to establish (default =1). for multiple contexts, the first context is established usingimsi + 0andmsisdn + 0. the second context is established usingimsi + 1andmsisdn + 1. the thirdβ¦ you get it, it just keeps counting π--timelimitseconds β exitsgsnemuafter seconds. when using the ping facility,sgsnemuwill also exit after--pingcountpackets have been transmitted. two ways out, pick your fave.--gtpversionversion β version of GTP to use when establishing a context (default =1). if not able to establish a GTPv1 context,sgsnemuwill fall back to using GTPv0. it's got a plan B, we love a resilient queen.--apnapn β apn to use when connecting to the GGSN (default =internet). APN is short for 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.--imsiimsi β 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 thecontextsoption for the use of theimsioption with multiple contexts.--nsapinsapi β nsapi to use when connecting to the GGSN (default =0). must be between 0 and 15.--msisdnmsisdn β 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 leading00or011. see thecontextsoption for the use of themsisdnoption with multiple contexts.--qosqos β 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.--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. (yes, bestie, the placeholder really is spelledpwson 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 thenetoption.--netnet β network address of the local interface. thenetoption is only valid when thecreateifoption is used. thenetoption is given in cidr format (net/mask bits). if thenetoption is 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 originalpingprogram. 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 of0(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 forsgsnemu..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 Β©οΈ
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>
π¦ where this page comes from
- debian bookworm: osmo-ggsn 1.9.0-3+b1 Β· GPL-2.0-only
- debian trixie: osmo-ggsn 1.13.0-2 Β· GPL-2.0-only
- ubuntu jammy: osmo-ggsn 1.6.0-2build2 Β· GPL-2.0-only
- ubuntu noble: osmo-ggsn 1.9.0-3.1build1 Β· GPL-2.0-only
- ubuntu questing: osmo-ggsn 1.13.0-2
- ubuntu resolute: osmo-ggsn 1.13.0-2build1 Β· GPL-2.0-only
- ubuntu stonking: osmo-ggsn 1.13.0-2build1 Β· GPL-2.0-only
- Copyright (C) 2002, 2003 Mondru AB
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms