Hello,
I am trying to set up an OpenBSC based GSM network. The GSM part was
easy and relatively quick to do, but I have a problem with GPRS. I
have read the documentation for OpenSGSN
(
http://openbsc.osmocom.org/trac/wiki/) and OpenGGSN (man page). After
a couple of days searching for more information and trying whatever
came to my mind, GPRS still does not work.
BTS is ip.access nanoBTS, using IP address 192.168.2.3 (was set up
like that, I got it second hand). It is connected to eth1
(192.168.2.1). The PC is running osmo-nitb, osmo-sgsn and ggsn
(started in reverse order). Interface eth0 is internet connection
(behind NAT).
**********
bash-4.1# ifconfig
eth0 Link encap:Ethernet HWaddr 00:22:15:99:86:2E
inet addr:192.168.110.34 Bcast:192.168.110.255 Mask:255.255.255.0
inet6 addr: fe80::222:15ff:fe99:862e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:22233 errors:0 dropped:1314 overruns:0 frame:0
TX packets:4200 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4119511 (3.9 Mb) TX bytes:514598 (502.5 Kb)
Interrupt:20 Memory:f9fc0000-f9fe0000
eth1 Link encap:Ethernet HWaddr 00:E0:7D:D6:7D:2D
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:7dff:fed6:7d2d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7311 errors:0 dropped:0 overruns:0 frame:0
TX packets:7211 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:630759 (615.9 Kb) TX bytes:445274 (434.8 Kb)
Interrupt:17 Base address:0xe800
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:480 (480.0 b) TX bytes:480 (480.0 b)
lo:1 Link encap:Local Loopback
inet addr:192.168.3.2 Mask:255.255.255.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
lo:2 Link encap:Local Loopback
inet addr:192.168.3.3 Mask:255.255.255.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
tun0 Link encap:UNSPEC HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:192.168.254.1 P-t-P:192.168.254.1 Mask:255.255.255.0
UP POINTOPOINT RUNNING MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
**********
bash-4.1# cat /proc/sys/net/ipv4/ip_forward
1
**********
I have also added a rule to iptables:
iptables -A POSTROUTING -s 192.168.254.0/24 -t nat -o eth0 -j MASQUERADE
**********
Here are my configuration files:
**********
GPRS section of nitb.conf:
**********
gprs mode gprs
gprs routing area 0
gprs cell bvci 2
gprs nsei 101
gprs nsvc 0 nsvci 101
gprs nsvc 0 local udp port 23000
gprs nsvc 0 remote udp port 23000
gprs nsvc 0 remote ip 192.168.2.1
**********
sgsn.conf:
**********
!
! Osmocom SGSN configuration
!
line vty
no login
!
sgsn
gtp local-ip 192.168.3.2
ggsn 0 remote-ip 192.168.3.3
ggsn 0 gtp-version 1
!
ns
timer tns-block 3
timer tns-block-retries 3
timer tns-reset 3
timer tns-reset-retries 3
timer tns-test 30
timer tns-alive 3
timer tns-alive-retries 10
encapsulation udp local-ip 192.168.2.1
encapsulation udp local-port 23000
encapsulation framerelay-gre enabled 0
!
bssgp
!
**********
ggsn.conf:
**********
pidfile /var/run/ggsn.pid
statedir /var/lib/ggsn/
listen 192.168.3.3
net 192.168.254.0/24
dynip 192.168.254.0/24
timelimit 0
I am using Wireshark with patches from openbsc git applied. GSM calls
and SMS work fine. BTS is able to connect to SGSN, as can be seen from
the output:
**********
rado@openbsc:~$ osmo-sgsn -c sgsn.conf
<0011> gprs_ns.c:151 NSVCI=65534 Creating NS-VC
<0011> gprs_ns.c:151 NSVCI=65535 Creating NS-VC
<0011> gprs_ns.c:738 Creating NS-VC for BSS at 192.168.2.3:23000
<0011> gprs_ns.c:620 NSEI=65535 Rx NS RESET (NSVCI=0, cause=O&M intervention)
<0011> gprs_ns.c:488 NSEI=101 Tx NS RESET ACK (NSVCI=101)
<0011> gprs_ns.c:797 NSEI=101 Rx NS UNBLOCK
<0012> gprs_bssgp.c:246 BSSGP BVCI=0 Rx RESET cause=Transmission
capacity modified
<0012> gprs_bssgp.c:246 BSSGP BVCI=2 Rx RESET cause=O&M intervention
<0012> gprs_bssgp.c:269 Cell 230-10-1209-0 CI 2984 on BVCI 2
<0012> gprs_bssgp.c:322 BSSGP BVCI=2 Rx BVC-UNBLOCK
<0012> gprs_bssgp.c:462 BSSGP BVCI=2 Rx Flow Control BVC
**********
When trying to use GPRS from mobile phone:
**********
<0012> gprs_bssgp.c:346 BSSGP TLLI=0x7ed21cb5 Rx UPLINK-UNITDATA
<0013> gprs_llc.c:478 LLC SAPI=1 C FCS=0x17cd30CMD=UI DATA
<0013> gprs_llc.c:741 LLC RX: unknown TLLI 0x7ed21cb5, creating LLME
on the fly
<0012> gprs_bssgp.c:346 BSSGP TLLI=0x7ed21cb5 Rx UPLINK-UNITDATA
<0013> gprs_llc.c:478 LLC SAPI=1 C FCS=0x17cd32CMD=UI DATA
<0012> gprs_bssgp.c:346 BSSGP TLLI=0x7ed21cb5 Rx UPLINK-UNITDATA
<0013> gprs_llc.c:478 LLC SAPI=1 C FCS=0x17cd4cCMD=UI DATA
and so on until phone timeouts.
The problem is in my opinion between SGSN and GGSN, as no data is
transferred through the tunnel (or the lo interface). But I checked
the settings multiple times and tried other configurations (alias for
eth1).
Openbsc, openggsn, libosmocore, libosmo-abis are all compiled from git
repositories.
I do not understand what I am doing wrong and I am out of options. So
I am asking for help. Thank you for your time.
Rado Krkos