DIFFUSE for OpenWRT
DIFFUSE for OpenWRT is
a version of DIFFUSE that works on embedded
devices such as home internet gateways. Our
current prototype is based on the DIFFUSE Linux
0.4 distribution running on the Attitude
Adjustment (r29537) version of OpenWRT (an
embedded Linux operating system). DIFFUSE for
OpenWRT allows you to enable automatic and dynamic
QoS for your home network based on
Machine Learning
classification. Get the files
here.
OpenWRT
OpenWRT is a Linux distribution for embedded
devices. It is commonly used to replace the
factory firmware found on residential Internet
routers. By replacing the factory firmware,
users gain access to additional configuration
options and are able to extend the functionality
of the router by installing new software. The OpenWRT SDK
was used to build DIFFUSE binary packages and
DIFFUSE-OpenWRT firmware for the TP-Link
WR-1043ND.
Although we have build and tested DIFFUSE only for
the WR-1043ND, OpenWRT supports
many
home routers and it should be possible to
build DIFFUSE for your platform using our
build image.
The TP-Link 1043ND Home Router
DIFFUSE for OpenWRT was initially built for and
tested
on the
TP-Link
TL-WR1043ND Gigabit Ethernet residential
router. It features one WAN port, four LAN ports
and support for 802.11b/g/n wireless. It is based
on the Qualcomm Atheros AR9132 SoC (MIPS) running
at 400Mhz. There is 8MB of flash storage and 32MB
of system RAM. DIFFUSE binary packages and
firmware images for this router can be found in
the
downloads section.
The OpenWRT page about the WR-1043ND can be found
here.
Why Use DIFFUSE?
Many home networks contain a mixture of traffic
types (online games, video streaming, web
browsing) as well as a mixture of access devices
(PCs, Tablets, Mobile Phones). All these devices
must share a common Internet connection. For
access links such as ADSL and ADSL2+, the upload
bandwidth of the link is often no more than
256Kbit/sec-1.5MBit/sec. Once the uplink link
becomes congested (for instance due to uploading
a video to Youtube, or putting a file into cloud
storage), the performance of delay sensitive
applications (online games, VoIP) can degrade
significatly due to increased latency and
jitter. A home router with DIFFUSE enabled can
identify and prioritise delay-sensitive traffic
dynamically.
See the DIFFUSE introduction
for more information about the benefits of QoS
and the DIFFUSE approach.
Traffic
Prioritisation
A simple use case (explained further in CAIA
Tech Report 120412A) can demonstrate the
benefits of using DIFFUSE for QoS. In this
example we configure the router to automatically
classify traffic flows and then provide
prioritisation for 'high-priority' flows. In the
DIFFUSE architecture,
this configuration can be described as a Classifier Node
plus Action Node (CN+AN).
The access link has an upstream bandwidth of
1Mbps.
In our scenario one user is playing the online
game Return to Castle Wolfenstein: Enemy
Territory (ET), while another user is performing
a bulk TCP upload. The ET traffic represents a
real-time delay-sensitive application, while the
TCP transfer represents a delay-tolerant flow
(TCP is commonly used for delay-tolerant
applications such as P2P filesharing). We
measured the one-way-delay (OWD) of the game
traffic flow (client to server) with and without
DIFFUSE to determine the effect of the upload.
We also measured the overall packet loss.
Figure 1 shows the cdf of the measured OWD.
Without additional traffic the ET flow
experiences very little delay. However
introducing a single TCP upload increases the
median OWD of the ET game flow to 351ms, and
causes a 7% packet loss. A high OWD such as this
would make the game uplayable. With DIFFUSE
enabled the median OWD is reduced to 31ms,
without packet loss. This is a significant
improvement and would allow a user to play Enemy
Territory while the file upload is in progress.
Figure 1:
CDF of measured one-way delay for the online
game flow.
Figure 2 shows the measured OWD for the ET flow
against time when sharing the link with
additional traffic, with and without DIFFUSE
enabled. Without DIFFUSE the game flow packets
are queued and delayed behind the TCP flow as
they exit the router, seen here in the cyclic
pattern of measured OWD values (ranging from
200ms to 500ms) as the upstream queue fills and
empties. TCP will increase its throughput
(congestion window size) until the queue is
filled and packets are dropped. Once packets are
dropped TCP will back-off, reducing the
congestion window. With DIFFUSE enabled not only
is the OWD reduced, the cyclic behaviour has
been smoothed, meaning there is also less jitter
experienced by the game flow.
Figure 2:
Game flow one-way delay over time with TCP cross
traffic. With and without DIFFUSE enabled
Downloads
If you have a
TP-Link WR-1043ND:
- The easiest way to get started is to get the
firmware
image and flash your router with this
new image.
- If you are already running OpenWRT Attitude
Adjustment on your WR-1043ND, get the packages.
If you don't
have a TP-Link WR-1043ND:
- Download one of the VirtualBox
images and use the OpenWRT build tools
to create an image for your router (everything
you need to do this is included).
- If you already have an OpenWRT build
environment then use the DIFFUSE source
code.
DIFFUSE requires a classification
model to run. We have provided a model
that will allow you to prioritise First Person
Shooter games here.
Documentation
- The CAIA
Tech Report 120412A is a
recommended starting reference. It details the
memory usage, CPU performance and network
throughput that can be expected when running
DIFFUSE on the TP-Link WR-1043ND. It also
expands on the use case described above.
- HowTos.
Guides on building/installing OpenWRT and
DIFFUSE. The instructions are specifically for
the TP-Link WR-1034ND but should work for
other routers. Also contains some shell
scripts for automatically setting up DIFFUSE
and a sample classifier model. Direct links to
the guides are also available below:
- Startup
script. A basic shell scripts that
will load a classification model and
configure DIFFUSE (the classification model
is packaged with the startup script).
Firmware
Image and Binary Packages for the TP-Link
WR-1043ND
- Firmware
Image for the TP-Link WR-1043ND.
Includes everything you need to get DIFFUSE
running. Installation instructions can be
found in the Scripts and HowTos.
- Binary
Packages for the TP-Link WR-1043ND.
Tested with OpenWRT Attitude Adjustment
(r29537). Includes all DIFFUSE components.
These are opkg
files that can be installed using OpenWRTs package manager.
Sources
for DIFFUSE components
- Source
Files. Use these to build DIFFUSE
packages for your router or existing OpenWRT
installation. Building the source files
requires the OpenWRT build environment. If you
do not already have the build environment set
up, get one of the Virtual Box VM images below
(the source files are included with these
VMs). You will need a version of OpenWRT that
supports libsctp
(we tested with OpenWRT Attitude Adjustment).
OpenWRT
build environment Virtual Machines
- VirtualBox
Image (Light) (382MB). An Ubuntu Server
10.04 installation that is pre-configured
with the OpenWRT build tools and all the DIFFUSE
source code. A self-contained build
environment that can be used to create new
firmware.
- VirtualBox
Image (Build) (1.4GB). The same as the
Light VM but has everything pre-compiled (CAIA subnet
only).
- Get VirtualBox here.
OpenWRT build environment under FreeBSD
-
Instructions
on configuring
FreeBSD as a build
environment for OpenWRT.
Classification
Models
- Sample
Classifier Model as used this model in
the tech
report. It will enable the
prioritisation of First Person Shooter games.
Project Members
|
This
project has been made possible in part by
a gift from The Cisco University Research
Program Fund, a corporate advised fund of
Silicon Valley Community Foundation. |