aboutsummaryrefslogtreecommitdiffstats
path: root/doc/sgsnemu.8
blob: af8f3ff04344086607a92e842af887bb4ffd0a63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
.\" * OpenGGSN - Gateway GPRS Support Node
.\" * Copyright (C) 2002, 2003 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.
.\" * 
.\" * The initial developer of the original code is
.\" * Jens Jakobsen <jj@openggsn.org>
.\" * 
.\" * Contributor(s):
.\" * 
.\" Manual page for ggsn
.\" SH section heading
.\" SS subsection heading
.\" LP paragraph
.\" IP indented paragraph
.\" TP hanging label

.TH sgsnemu 8 "May 2004"
.SH NAME
sgsnemu \- Serving GPRS Support Node Emulator
.SH SYNOPSIS
.B sgsnemu
\-\-help

.B sgsnemu
\-\-version

.B sgsnemu
[
.BI \-\-debug
] [
.BI \-\-conf " file"
] [
.BI \-\-pidfile " file"
] [
.BI \-\-statedir " file" 
] [ 
.BI \-\-dns " host"
] [ 
.BI \-\-listen " host" 
] [
.BI \-\-remote " host"
] [
.BI \-\-contexts " num"
] [
.BI \-\-timelimit " seconds" 
] [
.BI \-\-gtpversion " version"
] [
.BI \-\-apn " apn"
] [
.BI \-\-selmode " selmode"
] [
.BI \-\-imsi " imsi"
] [
.BI \-\-nsapi " nsapi"
] [
.BI \-\-msisdn " msisdn"
] [
.BI \-\-qos " qos"
] [
.BI \-\-charging " charging"
] [
.BI \-\-uid " uid"
] [
.BI \-\-pwd " pwd"
] [
.BI \-\-createif
] [
.BI \-\-net " net" 
] [
.BI \-\-defaultroute
] [
.BI \-\-ipup " script" 
] [
.BI \-\-ipdown " script" 
] [
.BI \-\-pinghost " host"
] [
.BI \-\-pingrate " num"
] [
.BI \-\-pingsize " num"
] [
.BI \-\-pingcount " num"
]
.SH DESCRIPTION
.B sgsnemu
is part of the 
.B OpenGGSN
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.
.B 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.


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

.B sgsnemu
uses the 
.B 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.


.SH OPTIONS
.TP
.BI --help
Print help and exit.

.TP
.BI --version
Print version and exit.

.TP
.BI --debug
Run in debug mode (default = off)

.TP
.BI --conf " file"
Read configuration 
.I 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.

.TP
.BI --pidfile " file"
Filename of process id 
.I file
(default = ./sgsnemu.pid)

.TP
.BI --statedir " path"
.I path
to directory of nonvolatile data (default = ./)

.TP
.BI --dns " host"
DNS server to use for APN lookups. If omitted the default system DNS
configuration will be used.

.TP
.BI --listen " host"
Local interface IP address to use for the Gn/Gp interface. If omitted
.B sgsnemu
will listen to any IP address.

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

.TP
.BI --contexts " num"
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....

.TP
.BI --timelimit " seconds"
Exit 
.B sgsnemu
after 
.I seconds. 
When using the ping facility 
.B sgsnemu
will also exit after
.B --pingcount
packets has been transmitted.

.TP
.BI --gtpversion " version"
.I 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.

.TP
.BI --apn " apn"
.I apn
to use when connecting to the GGSN (default = internet). APN is an
abbreviation of Access Point Name.

.TP
.BI --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.


.TP
.BI --imsi " imsi"
.I imsi
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
.I contexts
option for the the use of the
.I imsi
option with multiple contexts.

.TP
.BI --nsapi " nsapi"
.I nsapi
to use when connecting to the GGSN (default = 0). Must be between 0
and 15.

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

.TP
.BI --qos " qos"
.I qos
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.

.TP
.BI --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.

.TP
.BI --uid " uid"
User ID to send to GGSN as protocol configuration option.

.TP
.BI --pwd " pws"
Password to send to GGSN as protocol configuration option.

.TP
.BI --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
.I net
option.

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

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

.TP
.BI --ipup " script"
Script executed after the tun network interface has been brought up.
Executed with the following parameters: <devicename> <ip address>

.TP
.BI --ipdown " script"
Script executed after the tun network interface has been taken down.
Executed with the following parameters: <devicename> <ip address>

.TP
.BI --pinghost " host"
Ping
.I 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.

.TP
.BI --pingrate " num"
Number of ping requests per second (default = 1)

.TP
.BI --pingsize " num"
The size of each ping requests in octets (default = 56)


.TP
.BI --pingcount " num"
Number of ping requests to send (default = 0). A value of 0 (zero)
indicates infinite.

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


.SH FILES
.I sgsnemu.conf
.RS
The configuration file for
.B sgsnemu.
.RE
.I .sgsnemu.pid
.RS
Process ID file.
.RE
.I ./
.RS
Directory holding nonvolatile data.
.RE

.SH BUGS
Report all bugs to the OpenGGSN bug tracking list at 
.I http://sourceforge.net/projects/sgsnemu/


.SH "SEE ALSO"
.BR ggsn (8)

.SH NOTES 
.LP

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

The TUN/TAP driver is required for proper operation of
.B 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
.B modprobe tun.
For automatic loading the line
.B alias char-major-10-200 tun
can be added to
.B /etc/modules.conf.
For other platforms see
.I http://vtun.sourceforge.net/tun/
for information on how to install and configure the tun driver.

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

.SH 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.

.SH AUTHORS
Jens Jakobsen <jj@openggsn.org>