comprising any combination of wide-area-
networking (WAN), local-area-networking (LAN),
or wireless-local-area-networking (WLAN) links.
Students working in open or closed laboratory
sessions, or professors, wishing to demonstrate
networking concepts in the classroom may develop
or extend a wide variety of network protocols and
employ cnet controls and statistical routines to
gather and evaluate their experiments. cnet has been
selected by William Stallings to complement the
materials in his award winning networking textbook
(Stallings, 2007).
cnet has most recently been extended to support
wireless networking and, in particular, now supports
ad-hoc and mobile networking as characterized by
delay tolerant networking (see section 4). Using
cnet's event-driven framework students may control
the mobility (speed and direction) of hundreds of
mobile nodes, having them move across a physical
landscape and occasionally pausing at defined
landmarks or when other mobile nodes are detected.
cnet permits full control of one or more wireless
antennae on each mobile node and the physical
characteristics, such as transmission frequency,
output power and gain, input sensitivity, and
whether the node's radio card is in a low power
“sleep” mode, may all be controlled, either as fixed
parameters to a single simulation or dynamically for
a location- and power-aware protocol..
Students also have programmatic control over
the propagation of their nodes' wireless signals. For
example, once cnet has considered the physical
properties of each transmission (to determine
strength of arrival over the distance between nodes)
and managed physical layer collisions, student-
written code may further determine the successful
arrival of a signal through obstacles (such as walls),
across different terrain types (such as concrete or
grass), or at certain angles (using omni-directional
antennae).
cnet was first developed as a simulator running
on a variety of Linux and UNIX platforms and
Apple's Mac OS-X. Support has recently been added
for student-written protocols to be cross-compiled
for the Apple iPhone and iPod Touch platforms. The
motivation of this has been so that students may first
design, implement, test, and evaluate wireless
network protocols within the robust simulator, and
then cross-compile their unmodified source code for
execution on the physical, mobile devices. It is
believed that, in combination, the use of both
simulation and actual exercises can dramatically
increase a student's understanding of wireless
networking, particularly the nature of physical errors
and transmissions. Recent developments have been
generously supported by a ACM-SIGCSE Special
Project Grant and through support from Apple Inc.
cnet's full source-code and examples are released
under the GNU Public Licence (GPL).
3 PROTOCOLS ON IPODS
The Apple iPod Touch is a handheld mobile device
with a 670MHz ARM11 processor, 128MB of RAM
in which the operating system and applications
execute, and of flash memory providing a solid-state
disk. The iPod runs a modified version of Apple's
OS-X operating system and provides a multi-touch
GUI for all input. Apple promotes the devices as
music and video players, also capable of executing
approved applications. However, it is possible to
bypass the supported, constrained, environment of
the device and to develop general programs for it,
taking advantage of the IEEE802.11 (Wi-Fi)
networking interface and general TCP/IP protocol
stack (an activity requiring the unsanctioned
“jailbreaking” of the device).
Our school purchased twenty 8GB iPod Touch
devices for experimentation in this networking
project. Our students have long developed their cnet
simulations on their own home or laptop computers,
as well as on our laboratory equipment. For this
project, students were not expected to have
undertaken the difficult task of installing all files
necessary for cross-compilation for the iPods.
Instead, the cnet simulator was modified to accept an
additional command-line argument to request that
students' protocol files be sent to a purpose-written
remote cnet/iPod cross-compiler. The round-trip
between the students' personal machines and the
server was typically only three seconds. The
products of this cross-compilation phase are a
directory of files, forming an application bundle,
including the actual executable application, an XML
configuration, and basic icons. The salient point is
that identical source code is developed and compiled
for protocols exercised by both the simulator and the
iPods.
The Students then loaded this new iPod
application, their developed protocol, on (typically)
six iPods and walked around one floor of our
Computer Science building. Under execution,
students' protocols perform as they did on the
simulator, generating fictitious messages and control
packets forming the implemented protocol, and
responding to screen-based input via cnet's event
buttons or the virtual keyboard. Wireless frames
LINKING SIMULATION AND PRACTICE
259