boc-asn is a minimalist WiMAX ASN Gateway. It performs the following functions:
- communicate with Base Stations using the R6 protocol
- interface with a RADIUS server to authenticate Mobile Stations
- act as a DHCP Relay Server, relaying DHCP requests from Mobile Stations to a DHCP Server
Configuration
Let us assume the following configuration:
- DHCP server:
- real IP: 192.168.95.1
- tunnel IP: 10.20.30.1
- ASN gateway:
- real IP: 192.168.95.233
- tunnel IP: 10.20.30.2
The ASN Gateway configuration file asn.conf would look like this:
# Configuration file for the ASN GW. [asn] server=192.168.95.233 # port=2231 router=10.20.30.2 [dhcp] server=10.20.30.1 tunnel=dhcp0 [radius] server=127.0.0.1 secret=testing123 # port=1812
RADIUS setup
You need to install a RADIUS server such as FreeRADIUS, for instance on the same machine as the ASN Gateway.
You need to create entries for each of Mobile Station you want to serve. For instance, for the simulated Mobile Station you would add the following to your /etc/freeradius/users file:
00:11:22:33:44:55 Cleartext-Password := "Password"
DHCP setup
The ASN gateway needs to be connect by some kind of tunnel to the DHCP server, for instance an IPIP tunnel.
On the DHCP server
You must be running a DHCP server such as dnsmasq. You need to make sure it is listening on 10.20.30.1 and has some addresses for this pool:
interface=asn0 dhcp-range=10.20.30.10,10.20.30.199,255.255.255.0,1h
Set up the tunnel to the ASN gateway:
ip tun add asn0 mode ipip local 192.168.95.1 remote 192.168.233 ifconfig asn0 10.20.30.1 netmask 255.255.255.0 up
On the ASN gateway
Set up the tunnel to the DHCP server:
ip tun add dhcp0 mode ipip local 192.168.95.233 remote 192.168.95.1 ifconfig dhcp0 10.20.30.2 netmask 255.255.255.0 up
