Student Projects in Computer Networking: Simulation versus Coding Leann M. Christianson Kevin A. Brown Cal State East Bay
Dec 21, 2015
Student Projects in Computer Networking: Simulation versus
Coding
Leann M. Christianson
Kevin A. Brown
Cal State East Bay
Introduction
Computer networking is an integral part of computer science education
Network protocols involve many entities Creating practical and compelling student
assignments in networking is challenging
Cal State East Bay
Challenges…
Protocols differ in how they respond to corruption, errors, and loss, and replication of results difficult
Algorithm performance may only be apparent under high load, negatively impacting other users of the network
Cal State East Bay
Challenges (cont’d)…
The differences in the performance of transport algorithms may only be apparent if the transmitter and receiver nodes are separated by large distances or if a large number of machines are linked to the network
Routing algorithms require communication with tens to hundreds of other nodes
Cal State East Bay
Challenges (cont’d)…
Security concerns within a university may make it difficult to provide access to live servers with which to interact
Super-user access may be needed to use commands that report on network performance
Much network code is at the kernel-level requiring recompilation of the kernel in order to modify
Cal State East Bay
NetworkingAlgorithms are complex
It is beneficial to provide more than a description and explanation
Students learn by experimentation The ability to experiment may be provided in
(at least) two ways
Cal State East Bay
ExperimentationTwo Methods
Provide a simulation environment Allow the students to implement the algorithm
themselves and run it on real machines
Cal State East Bay
Coding Benefits
Computer Science is similar to engineering– Computer Scientists need experience applying
what they learn by building workable modules or programs that implement a key concept
– Coding skills enhance career opportunities
Cal State East Bay
Coding Issues
Dedicated equipment is needed – For security – Multiple nodes at great distances must be available
Testing – Difficult to duplicate conditions such that all students see
identical results– Inducing errors, loss and excess delay is difficult even with a
traffic generator – Internet traffic, error, and loss patterns are not reproducible
Cal State East Bay
Simulation Software Benefits
Allows for rapid configuration - WANs, LANs, intermediary, and host nodes
Protocols can be easily interchanged and tested Large distances and multiple nodes can be simulated Errors, losses, and delay rates can be defined to
follow a chosen distribution pattern Results are reproducible Dedicated equipment and super user access not
required Long time periods can be simulated quickly
Cal State East Bay
Simulation Software Issues
Requires investment of class time Simulation model may not accurately reflect real traffic
patterns May be difficult to reproduce a particular event as some
simulation applications do not allow the user to modify all simulation entities
Students will not gain experience writing actual networking code and interacting with live standards-based servers
Cost, support, and license management must be considered
Cal State East Bay
Simulation SoftwareOPNET
University Program provides– Free IT Guru software for each student– Runs on Windows XP– Unix version for university– www.opnet.com
Cal State East Bay
Cal State East Bay
Example 1TCP vs UDP packet delay
Simulate client/server communication over an IP network
Observe the effect of packet size on delay for both TCP and UDP transport layer protocols for file transfer
OPNET: FTP client and server
Cal State East Bay
Cal State East Bay
TCP vs UDP Results
Simulation can be rerun with different packet sizes
Results can be graphed for easy comparison TCP packet delay is longer than UDP packet
delay due to the added complexity of the protocol
Delay to process each TCP packet increases with packet size
TCP vs UDPFTP: Packet Delay
Cal State East Bay
Cal State East Bay
TCP vs UDP Simulation Benefits
Students can easily change parameters such as link speed, packet size, and background traffic load and observe how these affect their initial results
A variety of background application traffic (web, database, or email) can be chosen
Easy to view and compare results graphically
Cal State East Bay
TCP vs UDP Simulation Disadvantages
Students do not gain valuable coding and testing experience
Cal State East Bay
TCP vs UDP Coding
Write a client and server program that sends a small packet back and forth via a TCP socket 10,000 times
Run program 100 times, noting the round trip time for a round of 10,000 sends
Graph delay times Repeat with a pair of programs using UDP
sockets
Cal State East Bay
TCP vs UDP Coding Benefits
Provides experience with socket programming– Often a first for CS majors
Allows students experience with the software lifecycle
– develop, run, test, and document results
Cal State East Bay
TCP vs UDP Coding Disadvantages
Difficult to generate a consistent level of background traffic
Inability to control the actions of other users competing for network resources
Programming languages (C++ or Java) and operating systems (Unix or Windows) will affect delay times
Takes additional time to import results to Excel and create graphs
Example 2Routing Convergence Time
Convergence is the time it takes for routes between network nodes to stabilize after start up or after a link has gone down
Common routing algorithms such as Open Shortest Path First (OSPF), the Routing Information Protocol (RIP), or others can be used
Cal State East Bay
RIP Routing ConvergenceSimulation
Create a network of router nodes configured to use a particular routing algorithm (RIP)
Evaluate the routing tables created by the routing algorithm and trace a path between two nodes.
Break a link and run the simulation again Determine the routing table convergence time
after a link is broken
Cal State East Bay
OPNET: Routing Convergence
Cal State East Bay
Routing Table: node 0 after 8 sec
Cal State East Bay
RoutingSimulation Benefits
Rapid and easy configuration Routing tables are automatically created Can “break” links and rerun the simulation
easily Simulation runs quickly
Cal State East Bay
Routing ConvergenceSimulation Disadvantages
Students do not gain experience implementing a routing algorithm on their own
Difficult to calculate the exact convergence time due to timing of simulation events
Some routing protocols are not offered
Cal State East Bay
Routing ConvergenceCoding
Provide an input file with nodes, distances, and weights for initial topology
Implement a routing algorithm on the topology and run the program until convergence
Output routing tables after convergence Write an additional program to trace routes
through the tables
Cal State East Bay
Routing ConvergenceBenefits
Substantial assignment provides a great coding experience
Allows students experience with the software lifecycle– develop, run, test, and document results
Students who complete the project successfully understand convergence and the way the routing protocol works
Cal State East Bay
Routing ConvergenceDisadvantages
Problem is complex and requires a large time investment
Students get bogged down with the coding details and lose sight of the purpose of the assignment
Many give up or fail to write programs that generate correct results
Cal State East Bay
Conclusions
Simulation software allows more concentration on the performance of the protocol and allows for an easier visualization of results
Students are more apt to “play” with their simulations and experiment beyond the bounds of the assignment
Cal State East Bay
Conclusions
Programming, though viewed by the students as more difficult, allows them to practice and gain skills that will be useful in their future careers
The authors feel that a balance of both programming and simulation activities is the best practice
Cal State East Bay
THANK YOU!
OPNET Lab Manuals – Brown & Christianson, Lab Manual for Data and Computer
Communications 7/E by William Stallings,Prentice Hall, 2005– Christianson & Brown, Lab Manual for Business Data
Communications 5/E by William Stallings, Prentice Hall, 2005 – Brown & Christianson, The Networking and Data
Communications Laboratory Manual, Labs 5-8, edited by Frances Grodzinsky, Prentice Hall, http://www.prenhall.com/grodzinsky.
Cal State East Bay