NetCp- A Project Environment for an Undergraduate Computer Networks Course

NetCp-A Project Environment for an Undergraduate Computer Networks Course
David Finkel Department of Computer Science Worcester Polytechnic Institute Worcester,MA01609
dfinkel@cs.wpi.edu
Surendar Chandra Department of Computer Science
Duke University
Durham,NC27708
surendar@cs.duke.edu
1Introduction
Worcester Polytechnic Institute is a technologically oriented university,with a strong major in computer science.Since the inception of its project-centered WPI Plan in1970[WORC93],both the undergradu-ate curriculum and many individual courses have been based on large-scale projects.This paper describes software to support a large-scale project in an under-graduate Computer Networks course,and our experi-ence using that software.
The idea of basing undergraduate systems courses on large scale projects is well-established.Both the MINIX operating system[TANE87]and the OSP project environment[KIFE91],among others,provide a framework for a project-based undergraduate oper-ating systems course.
The undergraduate Computer Networks course is taken primarily by third-and fourth-year students, mostly computer science and electrical engineering majors.The students have taken a minimum of four previous courses in computer science,including afirst operating systems course,covering roughly Chapters 1-6of[TANE87].Typically,the students have had courses in data structures,file structures,and a second course in operating systems before taking the Com-puter Networks.Thus the students are well-prepared to handle large programming assignments.2Netcp
2.1Introduction
The package we used for our course is called Netcp. Netcp is modeled after the UNIX1command rsh. Netcp copies afile,specified in the command line, to a remote machine.The userfirst runs Netcp as a server on the receiver machine using the command line switch-S before data can be sent.Unlike rsh, Netcp does not worry about user authentication.
Netcp uses the network model developed by the In-ternational Standards Organization(ISO)called th
e ISO OSI(Open Systems Interconnection)Reference Model[TANE89].The ISO model envisions7layers of protocol:
1.Physical layer deals with sending raw bits over
a physical communication medium.
2.Data link layer takes this raw transmission fa-
从政提醒cility and transforms it into a line that appears free of transmission errors.
3.Network layer is concerned with controlling the
operation of a subnet and with routing packets.
4.Transport layer accepts data from Session
layer,splits it up into smaller units if need be, and ensures that all pieces arrive correctly at the other end.
5.Session layer allows users on different machines
to establish connections between them.
6.Presentation layer deals with syntax and se-
佳能s45mantics of information transmitted.
7.Application Layer contains a variety of user
level protocols,such as support for a network vir-tual terminal.
We felt that by working with the data link layer, we would expose the students to the crucial issues involved in understanding computer networks.The data link layer is concerned with converting a phys-ical medium to a form useful for sending messages. The lower layer deals with hardware intricacies and higher layers provide user services to effectively use a network.
Thus,Netcp uses only3layers:the physical layer, the data link layer and a hybrid layer which encapsu-lates all the functions of the higher level layers(net-work,transport,session,presentation and application layers).
The routines for the hybrid layer,the physical layer along with some support routines for the data link
layer were provided in a library to the students.The students’assignment was to provide the remaining functionality of the data link layer to develop a work-ing Netcp.
Netcp provides built-in functionality to set error rates individually on the server and client side,to provide a high enough error rate to test the stu-dents’code’s ability to handle errors.NetCp also pro-vides functions to print useful statistics about the data transfer.Extensive support is provided for dumping binary packets as hexadecimal numbers in any layer. This functionality is very useful in debugging packet loss and error correction routines.
2.2System Requirements
Netcp uses UNIX facilities such as sockets and shared memory for internal communications and syn-chronization.Netcp was used in a cluster of Dec5000, Dec3100,Dec2100running Ultrix4.3and on Sun Sparc IPC running SunOS4.1.1.In addition,Netcp has been ported to Silicon Graphics workstations and HPUX machines.
3Project Ideas
Netcp,as given to the students,provides a stub routine that implements a rudimentary data link layer
to get packets from either the physical or the hybrid layer and send it across to the hybrid or physical layer, respectively.Any of the following functionalities can be added as a student assignment.•Error free channel Transmission errors are a fact of life.The data link layer must take a er-ror prone physical layer and presents a error free channel to the higher layers.Netcp supports a command line option to increase the error rate artificially introduced by the physical layer.With increased error rates,the packets can be com-pletely dropped by the physical layer. Students can develop routines to do simple error checking using standard CRC polynomials such as CRC-12,CRC-16or CRC-CCITT.A success-ful packet should be acknowledged.However,this option requires substantial bit manipulation op-erations and hence a good understanding of C language is required.
•Timeout Control Once a error packet is iden-tified,remedial action needs to be taken.Errors can be detected by the receiver as a CRC mis-match or the sender as a timeout.In either case, a retransmission has to be effected in some way. Students can develop the timer routines for time-out.A simpleflow control mechanism can be de-veloped that operates on a hand shake mode of operation(a packet is sent,and until a acknowl-edgment is received,the sender keeps sending the packet).
•Data Framing In order to provide service to the network layer,the data link layer must use the servic
e provided to it by the physical layer.The physical layer can be constrained to accept packet of a size(say64bytes)which is smaller than the hybrid layer frame size(say128bytes). Students can use either character stuffing or bit stuffing tofit their frames into this64byte bound-ary.
•Flow Control Simple hand shake protocols sup-port very low throughput,especially on a noisy line.In[TANE89],six protocols are presented, which are in increasing order of complexity and provide better throughput.These involve using a sliding windows protocol,piggybacking of ac-knowledgments,using negative acknowledgments, and using a selective repeat or go back n strategy for packet pipelining.
•Protocol Performance At the end of a success-ful run,Netcp displays statistics about the run, such as the time taken in user space,system space etc.Using some of these measures,the students can compare the performance of the variousflow
control protocols.We think that this helps stu-dents in appreciating the importance of perfor-mance models.
4Conclusion
4.1The Projects in our course
The NetCp package was used in our course to sup-port a sequence of two assignments,covering approx-imately thefirst half of the course.The overall goal of the two assignments was to develop an increasingly sophisticated working model of the data link layer.
In both assignments,the overall goal was to transfer files between machines using the NetCp package.
Thefirst assignment concentrated on the is-sues of framing,check sums,and a simple time-out/retransmission protocol.The students were pro-vided with code from NetCp to handle the com-mand to transfer afile,to simulate the upper lay-ers of the protocol(the hybrid layer)and to simu-late the physical layer,as well as functions FromHy-bridLayer,ToHybridLayer,FromPhysicalLayer,and ToPhysicalLayer to receive or send data to the other layers.
The hybrid layer provide a stream of bytes to the student’s data link layer.The student’s program needed to manage the framing and checksums,and then start a timer when a packet was sent to the physical layer.On receiving a packet from the phys-ical layer,the student’s program needed to verify the checksum,take appropriate action if the frame was an acknowledgment,send an acknowledgment if nec-essary,and then pass the data to the hybrid layer. The student’s program als
o had to retransmit packets if a timer expired without an acknowledgment.The students used a send-and-wait protocol,so that after a packet was transmitted,no additional data pack-ets were transmitted until an acknowledgment was re-ceived or the timer expired.The physical layer was configured both to lose packets and to introduce er-rors in packets.
Assignment1ran entirely on a single machine,and no data was actually transmitted across the network. Instead,the simulated physical layer merely passed the data(after appropriately introducing delays and errors)from one copy of the student’s data link layer to another copy.
The second assignment required the students to introduce considerably more complexity into their model data link layer programs.The primary compli-cation was to introduce a sliding window protocol,so that several packets might be sent before an acknowl-edgment was received.This made the management of timers much more complicated.In addition,the students’programs used piggybacking for acknowledg-ments in the second assignment.Under this scheme, when possible,acknowledgments are not sent as sepa-rate packets,but are included in data packets.
4.2Student reaction to the project as-
signments
In past years,one of us has taught a senior-level operating systems course in which the students had a single project that they implemented in stages throughout the term.Student reaction to that project has been strongly favorable,especially from alumni. In fact,the experience with that operating systems course encouraged us to design this computer networks course around a large-scale project.
The project in this computer networks course re-ceived generally favorable comments from the students in the end-of-term course evaluations.However,a sub-stantial number of students were critical about the project.One criticism was that the amount of cod-ing required was too large.The lesson seemed to be that in previous courses,many students were able to complete programming assignments with a minimum of planning–the assignments were small enough to write from scratch.These assignments,however,were significantly larger,and we observed that the success-ful students started early(of course!)and had a clear design for their program before they began to code. Perhaps the presentation of the assignments needs to be modified to encourage or require the students to go through a more formal design process for their assign-ments.
The other major criticism revolved around some students’difficulty in writing program for which parts had already been written by someone else.Again,in previous courses students had typically written t
he en-tire programs by themselves,so this course provided some new experiences for them.We feel that learn-ing to program in an environment in which parts of a program have been written by someone else is an important skill for our students,many of whom an-ticipate careers in software engineering.This obser-vations suggests that we should make some changes in the presentation of the assignments to prepare stu-dents for this challenge.
4.3Availability of the software The NetCp package is available by anonymous ftp from wpi.wpi.edu (130.21
5.24.1)in the directory NetCp.After setting the transfer mode to binary,get the file netcp.tar.Z After retrieving the file,it must be uncompressed and un-tarred.The package in-cludes a file giving instructions on how to compile and use NetCp.Comments from instructors using NetCp would be very much appreciated by the authors.
Add errors
network.
Add errors
network.
Source File
Destination File
Host Machine
Destination Machine
H.L
H.L
D.L    D.L P.L
P.L
代数几何ToPL
FromPL
冬捕
FromPL ToPL ToHL
FromHL FromHL
ToHL Data Ack Nak
128 bytes char stream
File transfer
Statistics
128 bytes
128 bytes
128 bytes
128 bytes same as sent
variable same as sent
variable
Sliding Window Protocol
Window size=8Piggy backed
acknowledgements [Use Protocol 6]Use either
Selective Repeat or Go back ’n’
Sliding Window Protocol
Window size=8Piggy backed
acknowledgements [Use Protocol 6]Use either
Selective Repeat or Go back ’n’
Delay according to line speed. Send frames over Delay according to line speed. Send frames over
Sends data from source file.
Prints out statistics packet.
修正主义apdCopies data sent to destination file.
Sends statistics packet.
Figure 1:Overview of netcp.
References
[KIFE91]M.Kifer and S.A.Smolka,OSP:An En-vironment for Operating System Projects ,Addison-Wesley Publishing Company,Reading,Mass.,1991.[TANE87]A.S.Tanenbaum,Operating Systems De-sign and Implementation ,Prentice-Hall,Inc.,En-glewood Cliffs,New Jersey,1987.[TANE89]A.S.Tanenbaum,Computer Networks ,Prentice-Hall,Inc.,Englewood Cliffs,New Jersey,1989.[WORC93]Worcester Polytechnic Institute,Under-graduate Catalog,1993-94,Worcester,Mass.

本文发布于:2024-09-24 08:23:29,感谢您对本站的认可!

本文链接:https://www.17tex.com/xueshu/137432.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议