OpenFlow AP with PC Engine OLD

From OpenFlow Wiki

Jump to: navigation, search

This page contains old info about OpenFlow AP.

Contents

Setup and Installation

Configuration

AP Configuration

(1) AP images. You can get NOX Image from [1]

(2) Configuration changes on OpenFlow

  • Disable NOX

Comment out "DEFAUTL_NOX" in /etc/noxbox.conf

#DEFAULT_NOX="./nox_core -i ptcp: pyswitch monitorsui"
  • To change controller IP/TCP port number, modify "CONTROLLER_ADDR" in /etc/noxbox.conf
CONTROLLER_ADDR=xxx.yyy.zzz.uuu:ppp
  • To change OpenFlow interfaces
/etc/noxbox.conf  OPENFLOW_INTERFACES="ath0 ath1 eth0"
  • IP address assignment (it is DHCP by default)

File: /etc/noxbox.conf

    • To use DHCP
ON_IP_ADDR=dhcp
    • To use Static IP
ON_IP_ADDR=192.168.0.1
ON_NETMASK=255.255.255.0
ON_GATEWAY=192.168.0.254
  • SSID

File: ath0: /etc/hostapd/hostapd.ath0.conf

File: ath1: /etc/hostapd/hostapd.ath1.conf

Set "ssid" to your ssid.

  • Hiding SSID, Change WiFi channel

/etc/network/interfaces

iface ath0 inet manual
  ..
  pre-up iwpriv ath0 hide_ssid 1
  pre-up iwconfig ath0 channel 3
  ..

Upgrading to OpenFlow v1.0

Download the v1.0 binaries and updated script from here and read README.txt. The main difference from pre v1.0 to v1.0 is that we use user space reference implementation. The rc scripts need to be updated due to this change. When using dpctl command, please specify "unix:/var/run/dp0" instead of "nl:0". Also please note that, in the user space implementation, the local interface is "tap0" (not "of0").

(1) Expand comipled openflow binaries to /root/current and set correct symbolic link

# cp openflow.v1.0.tar.gz /root/current
# cd /root/current
# tar zxvf openflow.v1.0.tar.gz
# rm openflow
# ln -s openflow.v1.0 openflow
# cd /noxbox/bin
# ln -s /root/current/openflow/udatapath/ofdatapath
# ln -s /root/current/openflow/secchan/ofprotocol

(2) Update start-up rc scripts

# cp openflow_user /etc/init.d
# cp openflow_secchan_user /etc/init.d
# update-rc.d -f openflow remove
# update-rc.d -f openflow_switch remove
# update-rc.d -f openflow_secchan remove
# update-rc.d openflow_user defaults 86 20
# update-rc.d openflow_secchan_user defaults 87 19

(3) Update hostapd configuration file /etc/hostapd/hostapd*.conf change brige interface from of0 to tap0

# bridge=of0
bridge=tap0

(4) reboot (from openflow image)

# /root/bin/reboot-from-openflow.sh

Upgrading OpenFlow

(1) Compile new OpenFlow source code on x86 machine

(2) Replace /root/current/openflow on AP to the complied directory tree

(3) Reboot the AP

Multiple SSIDs

(1) Create multiple virtual interface. For example, two virtual interface vath00 vath01 on physical interface wifi0

wlanconfig vath00 create wlandev wifi0 wlanmode ap 
wlanconfig vath01 create wlandev wifi0 wlanmode ap

(2) You can now treat vath00 and vath01 as a independent interface

(3) Run hostapd on both vath00 and vath01 (you can assign different SSID on each interface).

(4) On the ethernet side, you can create vlan inteface like this

/sbin/vconfig add eth0 0
/sbin/vconfig add eth0 1

Now you have two interface eth0.0 and eth0.1, each has vlan tag 0 and 1 respectively.

(5) You can run multiple OpenFlow instances using any combination of those crated virtual interfaces (eth0.0, eth0.1, vath00, vath01).