Project

General

Profile

OpenBSC GPRS » History » Revision 3

Revision 2 (tnt, 02/19/2016 10:47 PM) → Revision 3/37 (tnt, 02/19/2016 10:47 PM)

[[PageOutline]] 

 = OpenBSC GPRS/EDGE Setup page = 

 == Pre-requisites == 

  * A nano BTS with GPRS or EDGE support. BS-11 are not supported (yet?) 
  * A compiled GGSN from OpenGGSN ( http://sourceforge.net/projects/ggsn/ ) 
  * A working and up-to-date OpenBSC (see [wiki:Building_OpenBSC]) 
    * You will need to (re-)build it after having installed OpenGGSN so that the `libgtp` libgtp is detected and the SGSN binary `osmo-sgsn` osmo-sgsn built. 

 == Setup == 

 First a little picture to illustrate the different elements and their interactions : 

 [[Image(gprs.png)]] 

 === OpenBSC configuration === 

 The first step is to configure OpenBSC for gprs support. Add this to the `network/bts` node in `openbsc.cfg`: {{{ 
      phys_chan_config PDCH 
 }}} 

 {{{ 
 
   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.0.128 
 }}} 

 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. 

 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 : 
 {{{ 
 phys_chan_config PDCH 
 }}} 


 === Osmocom SGSN configuration === 

 {{{ 
 ! 
 ! Osmocom SGSN configuration 
 ! 
 ! 
 line vty 
  no login 
 ! 
 sgsn 
  gtp local-ip 192.168.1.128 
  ggsn 0 remote-ip 192.168.1.129 
  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.0.128 
  encapsulation udp local-port 23000 
  encapsulation framerelay-gre enabled 0 
 ! 
 bssgp 
 ! 
 }}} 

 === OpenGGSN configuration === 

 {{{ 
 # TAG: listen 
 # Specifies the local IP address to listen to 
 listen 192.168.1.129 
 }}} 

 {{{ 
 # TAG: dynip 
 # Dynamic IP address pool. 
 # Used for allocation of dynamic IP address when address is not given 
 # by HLR. 
 # If this option is not given then the net option is used as a substitute. 
 dynip 192.168.254.0/24 

 # TAG: pcodns1/pcodns2 
 # Protocol configuration option domain name system server 1 & 2. 
 pcodns1 208.67.222.222 
 pcodns2 208.67.220.220 
 }}} 

 === Network configuration === 

 You will also need to configure some networking rules to allow connectivity from `tun0`. Look up linux networking/nat howtos on google. 
 The basic setup for testing only in a safe environment would be : 

 {{{ 
 bash# echo 1 > /proc/sys/net/ipv4/ip_forward 
 bash# iptables -A POSTROUTING -s 192.168.254.0/24 -t nat -o eth0 -j MASQUERADE 
 }}}  

 (replace `eth0` by the interface providing your machine connectivity) 

 == Running == 

 # FIXME 

Add picture from clipboard (Maximum size: 48.8 MB)