Traceroute
Traceroute tracks the route packets taken from an IP network on their way to a given host.
Introduction
Welcome to my traceroute
project repository! In this project, I've implemented a custom version of the traceroute command. This project allowed me to dive into network protocols, socket programming, and Linux system calls.
Project Summary
The traceroute
project focuses on creating a traceroute command from scratch. Traceroute is a utility that tracks the route a data packet takes from one machine to another within an IP network. The goal of the project is to gain a deeper understanding of networking and network diagnostics.
Table of Contents
- Introduction
- Project Summary
- How to Compile
- Usage and Options
- Mandatory Part
- Bonus Part
- Folder Structure
- Submission and Peer-Evaluation
- Conclusion
How to Compile
- Ensure you have a Linux machine with a core version of >= 4.0.
- Clone this repository to your local machine using:
git clone <repository-url>
- Navigate to the repository's directory:
cd traceroute
- Compile the program using the provided Makefile:
make
Usage and Options
To run the traceroute
program, use the following format:
./traceroute [options] <destination>
Available options:
-f <ttl>
: Set the starting time-to-live (TTL) value.-m <max_ttl>
: Set the maximum number of hops (TTL).-w <timeout>
: Set the timeout for waiting for a response in seconds.-?
: Display help and usage information.-t <tos>
: Set the Type of Service (ToS) value.-p <port>
: Specify the destination port number.
Replace <destination>
with the DNS name or IP address of the target.
Mandatory Part
In the mandatory part of the project, I implemented the core functionality of the traceroute command. I created a C program named traceroute
that calculates and displays the route of IP packets from the source to the destination.
Bonus Part
For the bonus section, I added additional features to enhance the functionality of traceroute
. These features include DNS management and the implementation of various command-line options.
Folder Structure
The repository's structure is organized as follows:
traceroute/
├── includes/ # Header files
├── srcs/ # Source code files
├── LICENSE # Project's license
├── Makefile # Makefile for compilation
└── README.md # Project README
Conclusion
Creating the traceroute
project has been an exciting journey into the world of networking and system programming. I've gained a deeper understanding of how data packets travel across networks and the intricacies of network diagnostics. By implementing the traceroute command from scratch, I've not only improved my C programming skills but also learned how to manage sockets, interact with IP addresses, and handle various network-related tasks.
Through this project, I've had the opportunity to explore both the mandatory and bonus parts, enhancing the traceroute functionality beyond its core implementation. From managing DNS resolution to implementing command-line options, I've expanded my programming toolkit and problem-solving abilities.
I'm proud to present my implementation of traceroute
and am confident that it showcases my dedication to learning and implementing complex concepts. This project has truly helped me develop a solid foundation in network programming and system calls, which will undoubtedly be valuable in my future endeavors.
Thank you for taking the time to explore my project and its capabilities. If you have any questions or feedback, feel free to reach out.