Project

General

Profile

OpenBSC GPRS » History » Version 3

tnt, 02/19/2016 10:47 PM
OpenBSC detail config

1 1 tnt
[[PageOutline]]
2
3
= OpenBSC GPRS/EDGE Setup page =
4
5
== Pre-requisites ==
6
7
 * A nano BTS with GPRS or EDGE support. BS-11 are not supported (yet?)
8
 * A compiled GGSN from OpenGGSN ( http://sourceforge.net/projects/ggsn/ )
9 2 tnt
 * A working and up-to-date OpenBSC (see [wiki:Building_OpenBSC])
10 3 tnt
   * You will need to (re-)build it after having installed OpenGGSN so that the `libgtp` is detected and the SGSN binary `osmo-sgsn` built.
11 1 tnt
12
== Setup ==
13
14 3 tnt
First a little picture to illustrate the different elements and their interactions :
15
16 1 tnt
[[Image(gprs.png)]]
17
18
=== OpenBSC configuration ===
19
20 3 tnt
The first step is to configure OpenBSC for gprs support. Add this to the `network/bts` node in `openbsc.cfg`:
21 1 tnt
{{{
22 3 tnt
gprs mode gprs
23
gprs routing area 0
24
gprs cell bvci 2
25
gprs nsei 101
26
gprs nsvc 0 nsvci 101
27
gprs nsvc 0 local udp port 23000
28
gprs nsvc 0 remote udp port 23000
29
gprs nsvc 0 remote ip 192.168.0.128
30 1 tnt
}}}
31
32 3 tnt
The `gprs nsvc 0 remote` entries `192.168.0.128:23000` is the IP/port of the machine running the SGSN as seen from the BTS. It will be sent by OpenBSC to the BTS in the configration phase and the BTS will connect back to the SGSN.
33
34
The second step is to allocate some timeslots to packet data. For this, just change the 1 or more `network/bts/trx/timeslot` nodes using :
35 2 tnt
{{{
36 3 tnt
phys_chan_config PDCH
37 2 tnt
}}}
38
39 1 tnt
40
=== Osmocom SGSN configuration ===
41 2 tnt
42
{{{
43
!
44
! Osmocom SGSN configuration
45
!
46
!
47
line vty
48
 no login
49
!
50
sgsn
51
 gtp local-ip 192.168.1.128
52
 ggsn 0 remote-ip 192.168.1.129
53
 ggsn 0 gtp-version 1
54
!
55
ns
56
 timer tns-block 3
57
 timer tns-block-retries 3
58
 timer tns-reset 3
59
 timer tns-reset-retries 3
60
 timer tns-test 30
61
 timer tns-alive 3
62
 timer tns-alive-retries 10
63
 encapsulation udp local-ip 192.168.0.128
64
 encapsulation udp local-port 23000
65
 encapsulation framerelay-gre enabled 0
66
!
67
bssgp
68
!
69
}}}
70 1 tnt
71 2 tnt
=== OpenGGSN configuration ===
72
73
{{{
74
# TAG: listen
75
# Specifies the local IP address to listen to
76
listen 192.168.1.129
77
}}}
78
79
{{{
80
# TAG: dynip
81
# Dynamic IP address pool.
82
# Used for allocation of dynamic IP address when address is not given
83
# by HLR.
84
# If this option is not given then the net option is used as a substitute.
85
dynip 192.168.254.0/24
86
87
# TAG: pcodns1/pcodns2
88
# Protocol configuration option domain name system server 1 & 2.
89
pcodns1 208.67.222.222
90
pcodns2 208.67.220.220
91
}}}
92
93
=== Network configuration ===
94
95
You will also need to configure some networking rules to allow connectivity from `tun0`. Look up linux networking/nat howtos on google.
96
The basic setup for testing only in a safe environment would be :
97
98
{{{
99
bash# echo 1 > /proc/sys/net/ipv4/ip_forward
100
bash# iptables -A POSTROUTING -s 192.168.254.0/24 -t nat -o eth0 -j MASQUERADE
101
}}} 
102
103
(replace `eth0` by the interface providing your machine connectivity)
104
105
== Running ==
106
107 1 tnt
# FIXME
Add picture from clipboard (Maximum size: 48.8 MB)