Sunday, May 28, 2017

openggsn, testing

***information ***
server ip: 192.168.58.22
client ip: 192.168.58.77


***server: ggsn***
1- installation
$ sudo apt-get install openggsn


2- edit configuration file, /etc/ggsn.conf
debug
pidfile /var/run/ggsn.pid
listen 192.168.58.22

# dhcp pool
dynip 192.168.0.0/24
pcodns1 8.8.8.8
apn internet



3- run it

$ sudo ggsn -c /etc/ggsn.conf 




***on client***

1- installation
$ sudo apt-get install openggsn


2- edit configuration file, /etc/sgsnemu.conf
debug
pidfile ./sgsnemu.pid
statedir ./
dns 8.8.8.8
listen 192.168.58.77
remote 192.168.58.22
apn internet
defaultroute
pinghost 8.8.8.8






3- run it, if you ggsn has internet access, the ping will reply
$ sgsnemu -c /etc/sgsnemu.conf
cmdline_parser_configfile
remote: 192.168.58.22
listen: 192.168.58.77
conf: /etc/sgsnemu.conf
debug: 1
imsi: 240010123456789
qos: 0x0b921f
qose1: 0x9396404074f9ffff
qose2: 0x11
qose3: 0x0101
qose4: 0x4040
charging: 0x800
apn: internet
msisdn: 46702123456
uid: mig
pwd: hemmelig
pidfile: ./sgsnemu.pid
statedir: ./
dns: 8.8.8.8
contexts: 1
timelimit: 0
createif: 0
defaultroute: 1
pinghost: 8.8.8.8
pingrate: 1
pingsize: 56
pingcount: 0
pingquiet: 0
norecovery: 0

Using DNS server:      8.8.8.8 (8.8.8.8)
Local IP address is:   192.168.58.77 (192.168.58.77)
Remote IP address is:  192.168.58.22 (192.168.58.22)
IMSI is:               240010123456789 (0xf987654321010042)
Using NSAPI:           0
Using GTP version:     1
Using APN:             internet
Using selection mode:  1
Using MSISDN:          46702123456
Using ping host:       8.8.8.8 (8.8.8.8)

Initialising GTP library
<000c> gtp.c:700 GTP: gtp_newgsn() started
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
Received create PDP context response. IP address: 192.168.0.7
Create_ping -1
idletime.tv_sec 0, idleTime.tv_usec 999870
1495974462. 82030 84 bytes from 8.8.8.8: icmp_seq=0 time=403.842 ms
idletime.tv_sec 0, idleTime.tv_usec 596095
Create_ping -1301
idletime.tv_sec 0, idleTime.tv_usec 998400
1495974462.792182 84 bytes from 8.8.8.8: icmp_seq=1 time=112.612 ms
idletime.tv_sec 0, idleTime.tv_usec 885967
Create_ping -1427
idletime.tv_sec 0, idleTime.tv_usec 998341
1495974463.821476 84 bytes from 8.8.8.8: icmp_seq=2 time=141.817 ms
idletime.tv_sec 0, idleTime.tv_usec 856672
Create_ping -1442
idletime.tv_sec 0, idleTime.tv_usec 998341
1495974465. 83879 84 bytes from 8.8.8.8: icmp_seq=3 time=404.210 ms
idletime.tv_sec 0, idleTime.tv_usec 594240

No comments:

Post a Comment