OpenFlow on OpenWrt

From OpenFlow Wiki

Jump to: navigation, search

NOTE : This page is deprecated, look here for up-to-date instructions.

Contents

OpenWrt 2.6 Kernel

Special Notes:

  • Current OF package builds control and data plane separately.
  • Kamikaze doesn't enable LuCI by default. Manual configuration is needed.

Add the openflow package to the kamikaze workspace with 2.6 kernel

cd ${WORKING_DIR} 
git clone git://gitosis.stanford.edu/openflow-openwrt.git
cd ${WORKING_DIR}/trunk/package
ln -s ${WORKING_DIR}/openflow-openwrt/openwrt/package/openflow-0.8.9/
find ${WORKING_DIR}/trunk/target/linux/generic-2.6 -iname "patches-*" | xargs -n 1 cp ${WORKING_DIR}/openflow-openwrt/openwrt/patches/691-bridge_export_symbol.patch
cd ${WORKING_DIR}/trunk
mkdir files
cp -a ${WORKING_DIR}/openflow-openwrt/luci/* files

Copy the specific config files to the files/etc/config directory (example for Linksys/Broadcom device) otherwise the whole switch is added as one OpenFlow port.

cp -a ${WORKING_DIR}/openflow-openwrt/configs/brcm47xx/etc/config/* files/etc/config/

Configure the build (example for Linksys WRT54G/GS/GL and WRTSL54GS)

make menuconfig 
  • Choose the kernel version from Target System
    • Linksys WRT54G/GS/GL and WRTSL54GS, choose Broadcom BCM947xx/953xx [2.6]
  • Choose target profile from Target Profile
    • If target is 2.6, Target profile => Generic, Broadcom Wifi(default)
  • Disable the userspace Ethernet Bridge utilities under "Base System" (we don't use the module, so they waste space)
  • Select openflow package under "Network"
  • Select openflow kernel module under "Kernel Module" -> "Network Support"


make kernel_menuconfig
  • Configure the Kernel - Compile the Ethernet Bridge as a M (not * or disabled) under Networking support ---> Networking Options ---> 802.1d Ethernet Bridging


  • Build the image
make

Locate the images and package files (2.6)

  • images
./bin/
  • packages
./bin/packages/< platform >_< uClibc version >/

Switch/VLAN architecture on OpenWRT and OpenFlow Kernel Module

Please have a look into the OpenFlow wiki.