The cnet network simulator


cnet is a networking simulator which enables experimentation with various data-link layer, network layer, routing and transport layer networking protocols. It has been specifically developed for, and used in, undergraduate computer networking courses by over 2000 students over the last 7 years. cnet is currently supported (has been tested) on the following:

operating and
window systems
XView Motif TclTk ASCII
DEC OSF/1 y y y y
SGI IRIX-5 n y y y
Linux (a.out) y n y y
Solaris 2.x y n y y
SunOS 4.1.x y y y y

with Linux (ELF), MacOS 7.5, and Win-32 as the next targets. We are extremely grateful to the Apple University Consortium for providing a Power Macintosh 7500/100 on which we will further develop cnet in 1996.

Further cnet information:


An introduction to the cnet network simulator

cnet is a network simulator which enables experimentation with data-link, network (routing), transport and session layer protocols. With reference to the OSI/ISO Networking Reference Model, cnet provides the Application and Physical layers. User-written protocols are required to ``fill-in'' any necessary internal layers and, in particular, to overcome the corrupted and lost frames that cnet's Physical Layer randomly introduces. Simulation sizes may range from 2 nodes to a few hundred nodes.

cnet either displays the entire network under XView, Motif or TclTk or runs rather less visually on an ASCII terminal. Under the X-window system, cnet provides a graphical representation of the network under execution and permits a number of attributes of the network to be modified while the simulation is running. Nodes may be selected with the mouse resulting in a sub-window being displayed containing the output and statistics of that node. The node's attributes of message rates and sizes may be modified while the network is running by selecting further buttons. Similarly, the default attributes of all nodes in the network may be simultaneously modified by selecting and changing global attribute buttons. From a menu each node may be forced to reboot, (impolitely) crash, (politely) shutdown and reboot, pause and (hardware) fail.

Selecting a link results in a sub-window being displayed containing statistics for that link. Links are bidirectional, so ``selecting a link'' means clicking on the link near the end of its source. The link-based attributes of costs and probabilities of error may be modified while the network is running by dragging sliders. Similarly, the attributes of all links in the network may be simultaneously modified by selecting and changing global link attributes.

From within your protocols, the current node and link attributes (as possibly modified via the windowing interface) are available to each node in C data structures and variables declared in cnet's header file . These are initialized when each node is rebooted and updated as each node is scheduled for execution. The contents of these data structures are considered as read-only values and not be modified directly by the protocols.

cnet requires network protocols to be written in either the K&R or ANSI-C programming language and supports their execution within a single UNIX process. Protocols are invoked directly by cnet itself - not interpreted. Protocols do not need to contain any windowing code. In addition, different Application and Physical Layers may be provided which exhibit varying statistical characteristics of message generation and data transmission.


Acknowledgments

The following people have generously offered suggestions, pieces of code, and acted a testers, as cnet has developed over the years. A big thanks to them all:

Dr Greg BaurUniversity of Western Kentucky
Prof. John HineUniversity of Wellington, New Zealand
Dr Chris JohnsonThe Australian National University
Dr David LaverellCalvin College, Michigan
Prof. Jeff OndichCarleton College, Minnesota
Dr Chris PudneyThe University of Western Australia
Mike RobinsThe University of Western Australia
Prof. James WilkinsonCollege of Charleston, South Carolina

If you can prove to me that you're a member of academic staff somewhere (business card or FAX on University letterhead), I'll email some more detailed examples to you - ones that may typically be set for student projects.

If you decide to use cnet in the teaching of an undergraduate course, or need some more info on how to, please keep in touch. I'd like to keep a record of sites using cnet and the types of examples and projects being attempted. I'll also be able to keep you informed of updates. Excellent examples, such as those written by Aric Stewart and supervised by Prof. Jeff Ondich, and testimonials are welcome.

References

[McD91]
A Network Specification Language and Execution Environment for Undergraduate Teaching, C.S. McDonald, Proc. of the ACM Computer Science Education Technical Symposium '91, San Antonio, Texas, Mar 1991, pp25-34.
[McD93]
Network Simulation Using User-level Context Switching, C.S. McDonald, Proc. of the Australian UNIX Users' Group Conference '93, Sydney, Sept 1993, pp1-10.


cnet was written and is maintained by Chris McDonald (chris@cs.uwa.edu.au)