FTP Server Design Project for ECE 4564 at Virginia Tech, Study Guides, Projects, Research of Electrical and Electronics Engineering

The requirements for a project in ece 4564: network application design at virginia tech, where students are tasked with designing and implementing a concurrent file transfer protocol (ftp) server using c# and the .net framework. The server should support basic ftp operations, be accessible through anonymous connections, and be able to service requests from multiple clients concurrently. The project report and all source files must be submitted as a single zip file.

Typology: Study Guides, Projects, Research

Pre 2010

Uploaded on 12/06/2007

vthokiegrad
vthokiegrad 🇺🇸

17 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ECE 4564
Fall 2007
Project 2 Assignment Page 1 of 4
Virginia Tech
Bradley Department of Electrical and Computer Engineering
ECE 4564: Network Application Design
Fall 2007
Project 2: FTP Server Design
Due: Thursday, Oct. 18, 11:59pm
1. Introduction
The educational objective of this project is to reinforce concepts related to client-server
protocols, server design, and multi-threaded and asynchronous design. The design and
programming objectives of this project are to design, implement, and test a concurrent
File Transfer Protocol (FTP) server. The specification of FTP is contained in RFC 959
(http://www.ietf.org/rfc/rfc0959.txt). The subset of FTP features to design and implement
is described in the next section. This document only specifies the requirements for the
FTP server. You need to refer to FTP’s specification and any other available source for
details about the operation of FTP servers.
1.1 An Overview of FTP
FTP (File Transfer Protocol) is a protocol used to access and transfer data remotely. An
FTP server listens for connections on the standard port number 21 called command
port. FTP uses this port exclusively for sending commands. For example, a client may
send the command “LIST” to request the list of folders and files on the FTP server.
To connect to an FTP server, an FTP client opens up a connection to the FTP server on
the command port. Then, the client tells the FTP server whether to establish an active
or a passive connection. The type of connection chosen by the client determines how
the server responds and on what ports transactions will occur.
Active Connections: If the client chooses to establish an active connection, the
server opens a data connection to the client from port 20 (on the server’s machine)
to a high range port on the client machine. All data from the server is then passed
over this connection.
Passive Connections: A client may ask the FTP server to establish a passive
connection port, which can be on any port higher than 10,000. The server then binds
to this high-numbered port for this particular session and sends that port number
back to the client. The client then opens the newly bound port for the data
connection. Each data request the client makes results in a separate data
connection. Most modern FTP clients attempt to establish a passive connection
when requesting data from servers.
pf3
pf4

Partial preview of the text

Download FTP Server Design Project for ECE 4564 at Virginia Tech and more Study Guides, Projects, Research Electrical and Electronics Engineering in PDF only on Docsity!

Virginia Tech Bradley Department of Electrical and Computer Engineering ECE 4564: Network Application Design  Fall 2007 Project 2: FTP Server Design Due: Thursday, Oct. 18, 11:59pm

1. Introduction

The educational objective of this project is to reinforce concepts related to client-server protocols, server design, and multi-threaded and asynchronous design. The design and programming objectives of this project are to design, implement, and test a concurrent File Transfer Protocol (FTP) server. The specification of FTP is contained in RFC 959 (http://www.ietf.org/rfc/rfc0959.txt). The subset of FTP features to design and implement is described in the next section. This document only specifies the requirements for the FTP server. You need to refer to FTP’s specification and any other available source for details about the operation of FTP servers.

1.1 An Overview of FTP

FTP (File Transfer Protocol) is a protocol used to access and transfer data remotely. An FTP server listens for connections on the standard port number 21 called command port. FTP uses this port exclusively for sending commands. For example, a client may send the command “LIST” to request the list of folders and files on the FTP server.

To connect to an FTP server, an FTP client opens up a connection to the FTP server on the command port. Then, the client tells the FTP server whether to establish an active or a passive connection. The type of connection chosen by the client determines how the server responds and on what ports transactions will occur.

Active Connections: If the client chooses to establish an active connection, the server opens a data connection to the client from port 20 (on the server’s machine) to a high range port on the client machine. All data from the server is then passed over this connection. Passive Connections: A client may ask the FTP server to establish a passive connection port, which can be on any port higher than 10,000. The server then binds to this high-numbered port for this particular session and sends that port number back to the client. The client then opens the newly bound port for the data connection. Each data request the client makes results in a separate data connection. Most modern FTP clients attempt to establish a passive connection when requesting data from servers.

2. Server Requirements

2.1. Summary of FTP Requirements for this Project

Your server should accept request messages from any FTP client and respond with an appropriate response message. In particular, the server must support the following minimal set of operations:

  • Get the current directory
  • List the files in the current directory
  • Download a file
  • Upload a file
  • Delete a file
  • Rename a file
  • Remove a directory
  • Move up and down in the directory tree

2.2. Additional Server Requirements

  • Assume an FTP server that may be accessed through an anonymous connection.
  • When the client first connects to the FTP server, the current directory (on the server’s machine) must be set to \ftp_dir. No access should be authorized to any other directory on the server’s machine.
  • The FTP server should be concurrent. It should be able to concurrently service requests from multiple FTP clients (up to 4). 3. Implementation and Testing Constraints

The following constraints apply:

  • The program must be developed using C# and the .NET Framework.
  • Your server should be designed and run as a console application.
  • You have two options for the design approach. One option is to use multiple threads. A second option is to use asynchronous operations for accept (for example BeginAccept and EndAccept), receive (or read), and send (or write) operations. You may use either approach.
  • All code must be clearly written, easily understandable by a knowledgeable reviewer, and neatly formatted. Code should be “self-documenting,” i.e., all information needed to understand the structure and operation of your code and any data structures should be contained with the code itself.
  • You may test your server on a single stand-alone host using “localhost” (127.0.0.1) as the server address. If possible, test your server across a network with client and server executing on different hosts.

source and executable files, such as p2asynch.cs or p2asynch.exe. Do not submit other intermediate or supporting files that may be in your project.

  • All files must be virus-free. Files that contain a virus as detected by the latest version of Symantec Antivirus^2 will not be graded. 6. Honor Code

You must work alone on this project. Teams are not allowed. You may not share your code with other students or borrow code from other students. You may not use code for an FTP server from the web or other sources. You may not discuss your design or code with anyone except the instructor/TA for this class. You may not help other students in debugging their code. You may not have others help you. Simply stated, you may not discuss or in any way share any aspect of your original work with anyone except the instructor or graduate teaching assistant for this class. If you use libraries or any code developed by others, its use must be properly acknowledged.

You may discuss the details of system calls with other students. You may also discuss the protocol specification and the requirements of this assignment with others. Contact the instructor if you have any questions about the honor code requirements.

7. Questions

Use the Project 2 forum in the Discussion Board area of the class web site to ask questions about this assignment. Do not post questions that contain specific information about the solution.

8. Updates

If needed, updates to this project specification will be added in this section.

9. Other Comments

Ethereal/Wireshark may be useful to observe the behavior of FTP clients and servers, including your server. For example, before starting the development of the FTP server, you may use Ethereal to see the traffic between an FTP client and an FTP server.

Consider using stream classes for network and file input/output. In particular, the NetworkStream class is useful for writing to or reading from a network connection in byte units. StreamReader and StreamWriter can be used for reading and writing text.

10. Useful Links

http://www.ietf.org/rfc/rfc0959.txt

http://slacksite.com/other/ftp.html

http://www.nsftools.com/tips/RawFTP.htm

(^2) Anti-virus software is available to Virginia Tech students at no charge at http://antivirus.vt.edu/.