osmo-ggsn[master]: sgsnemu: created "pinghost" and "createif" modes for mutual ...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Viktor Tsymbalyuk gerrit-no-reply at lists.osmocom.org
Tue Jan 30 14:10:14 UTC 2018


Patch Set 1:

some cli output for understanding

## original
```
ubuntu at test:~/osmo-ggsn$ sudo sgsnemu --listen 10.121.0.18 --remote 93.124.95.120  --contexts 1 --apn internet.ge.beeline.net --imsi 282040234567890  --rai=282.04.0001.0001 --nsapi=5 --qos=34824735 --charging=2 --createif --defaultroute -d --pingcount=3 --pinghost=10.123.0.18
remote: 93.124.95.120
listen: 10.121.0.18
debug: 1
imsi: 282040234567890
qos: 0x213621f
qose1: 0x9396404074f9ffff
qose2: 0x11
qose3: 0x0101
qose4: 0x4040
charging: 0x02
apn: internet.ge.beeline.net
msisdn: 46702123456
uid: mig
pwd: hemmelig
pidfile: ./sgsnemu.pid
statedir: ./
contexts: 1
timelimit: 0
createif: 1
defaultroute: 1
pinghost: 10.123.0.18
pingrate: 1
pingsize: 56
pingcount: 3
pingquiet: 0
norecovery: 0
no-tx-gpdu-seq: 0

Using default DNS server
Local IP address is:   10.121.0.18 (10.121.0.18)
Remote IP address is:  93.124.95.120 (93.124.95.120)
IMSI is:               282040234567890 (0xf098765432040282)
Using NSAPI:           5
Using GTP version:     1
Using APN:             internet
Using selection mode:  1
Using RAI:  282.04.0001.0001
->mcc : 282
->mnc : 04
->LAC: 0001
->RAC : 0001
Using MSISDN:          46702123456
Using ping host:       10.123.0.18 (10.123.0.18)

Initialising GTP library
<000d> gtp.c:757 GTP: gtp_newgsn() started at 10.121.0.18
Setting up interface
Done initialising GTP library

Sending off echo request
Setting up PDP context #0
Waiting for response from ggsn........

idletime.tv_sec 3, idleTime.tv_usec 0
Received echo response
idletime.tv_sec 3, idleTime.tv_usec 0
Received create PDP context response. IP address: 10.16.0.2
Create_ping 0
idletime.tv_sec 0, idleTime.tv_usec 999952
Create_ping -1140
idletime.tv_sec 0, idleTime.tv_usec 998791
idletime.tv_sec 0, idleTime.tv_usec 998218
Create_ping -1039
idletime.tv_sec 10, idleTime.tv_usec 0
idletime.tv_sec 10, idleTime.tv_usec 0
Disconnecting PDP context #0


----10.123.0.18 PING Statistics----
3 packets transmitted in 12.012 seconds, 0 packets received, 100% packet loss
0 packets received in total
0 packets transmitted
idletime.tv_sec 3, idleTime.tv_usec 0
Received delete PDP context response. Cause value: 128
```
#### in tcptdump thereis gtp-u with icmp (requests and replys)

# PATCH
## mutual exclusion
```
ubuntu at test:~/osmo-ggsn$ sudo sgsnemu --listen 10.121.0.18 --remote 93.124.95.120  --contexts 1 --apn internet.ge.beeline.net --imsi 282040234567890  --rai=282.04.0001.0001 --nsapi=5 --qos=34824735 --charging=2  --defaultroute -d --pingcount=3 --pinghost=10.123.0.18    sgsnemu: option --defaultroute conflicts with option --pinghost
sgsnemu: option --defaultroute conflicts with option --pingcount
sgsnemu: '--defaultroute' option depends on option 'createif'
```

## replys calculated
```
ubuntu at test:~/osmo-ggsn$ sudo sgsnemu --listen 10.121.0.18 --remote 93.124.95.120  --contexts 1 --apn internet.ge.beeline.net --imsi 282040234567890  --rai=282.04.0001.0001 --nsapi=5 --qos=34824735 --charging=2  --pingcount=3 --pinghost=10.123.0.18

Using default DNS server
Local IP address is:   10.121.0.18 (10.121.0.18)
Remote IP address is:  93.124.95.120 (93.124.95.120)
IMSI is:               282040234567890 (0xf098765432040282)
Using NSAPI:           5
Using GTP version:     1
Using APN:             internet
Using selection mode:  1
Using RAI:  282.04.0001.0001
->mcc : 282
->mnc : 04
->LAC: 0001
->RAC : 0001
Using MSISDN:          46702123456
Using ping host:       10.123.0.18 (10.123.0.18)

Initialising GTP library
<000d> gtp.c:757 GTP: gtp_newgsn() started at 10.121.0.18
Done initialising GTP library

Sending off echo request
Setting up PDP context #0
Waiting for response from ggsn........

Received echo response
Received create PDP context response. IP address: 10.16.0.1
84 bytes from 10.123.0.18: icmp_seq=1 time=0.665 ms
84 bytes from 10.123.0.18: icmp_seq=2 time=0.647 ms
Disconnecting PDP context #0


----10.123.0.18 PING Statistics----
3 packets transmitted in 12.012 seconds, 2 packets received, 33% packet loss
round-trip (ms)  min/avg/max = 0.647/0.656/0.665

2 packets transmitted
Received delete PDP context response. Cause value: 128
ubuntu at test:~/osmo-ggsn$
```

-- 
To view, visit https://gerrit.osmocom.org/6196
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I196df7838212dcddecd64a64a6cba613b6cfced0
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Owner: Viktor Tsymbalyuk <viktor.tsymbalyuk at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Viktor Tsymbalyuk <viktor.tsymbalyuk at gmail.com>
Gerrit-HasComments: No



More information about the gerrit-log mailing list