Skip to content

AFNeves/TuxTransfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TuxTransfer

A C implementation of a file transfer client using the FTP protocol, complemented by a series of network configuration experiments involving IP networking, routing, bridges, and DNS. This project was developed for the Computer Networks course at FEUP.

⚠️ Note: This project is designed for execution within FEUP’s controlled lab environment. Running it outside the university’s network infrastructure requires significant modifications and is not guaranteed to function correctly.

📘 Overview

This project is divided into two main parts:

1. FTP Application

A C program that downloads files from an FTP server by:

  • Parsing and validating user-provided FTP URLs.
  • Establishing control and data sockets.
  • Performing authentication and passive mode negotiation.
  • Managing file transfer and closure of sessions.
  • Handling FTP server responses using a state machine.

The implementation follows RFC 959 (File Transfer Protocol) and includes:

  • URL parsing with regular expressions.
  • Socket creation and management using BSD sockets.
  • Control message exchange (USER, PASS, PASV, RETR, QUIT).
  • Passive mode data transfer.

2. Network Configuration & Analysis

A sequence of hands-on networking experiments performed in FEUP’s Computer Networks laboratory using TUX workstations and physical networking equipment.

These experiments cover:

  1. IP Configuration: Assigning IPs and verifying connectivity via ping and ARP inspection.
  2. Switch Bridges: Creating isolated LANs using multiple bridges on a managed switch.
  3. Linux Routing: Enabling packet forwarding between LANs using a Linux machine.
  4. Commercial Router & NAT: Integrating internet access with Network Address Translation.
  5. DNS Configuration: Enabling domain name resolution via a lab DNS server.
  6. TCP Connections: Testing and analyzing the FTP client behavior over the configured network.

📂 Project Structure

The project is structured as follows:

.
├── docs
│   └── Report_3LEIC12_G1.pdf   # Final report (in Portuguese)
├── LICENSE                     # Project license (MIT)
├── README.md                   # Project overview (this file)
└── src
    ├── client.c                # FTP client implementation
    ├── client.h                # Header file for FTP client
    └── download                # Compiled FTP client executable

🚀 Running the Project

Execution is primarily intended for FEUP’s networking lab environment, where:

  • Machines tux2, tux3, and tux4 are connected via a switch.
  • Network interfaces are manually configured according to the provided commands.
  • A local FTP server (netlab1.fe.up.pt) is accessible.

Example usage (inside the lab):

./download ftp://rcom:rcom@netlab1.fe.up.pt/pipe.txt

Note: Running this project outside the university’s network infrastructure is possible but requires significant modifications to the network configuration and FTP server access. Functionality is not guaranteed in other environments.

🧠 Learning Outcomes

  • Understanding and implementing the FTP protocol at the socket level.
  • Gaining hands-on experience configuring and troubleshooting IP networks.
  • Using bridges, routers, and NAT for inter-network communication.
  • Observing TCP flow control and congestion through live experimentation.
  • Analyzing ARP, ICMP, DNS, and FTP traffic using Wireshark captures.

📄 Documentation

The full project report detailing the protocol design and implementation can be found in docs/Report_3LEIC12_G1.pdf.

Note: The report is written in Portuguese.

👥 Authors

📎 License

This project is licensed under the terms of the MIT License.

About

A C implementation of an FTP client and a series of network configuration experiments involving IP, routing, NAT, and DNS, developed for the Computer Networks course at FEUP.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages