Lab 04: Assignment: Ping Utility Analysis
Objective:
In this assignment, you will analyze the ping utility, a fundamental network diagnostic tool. You will
explore its functionality, usage, and output, and demonstrate your understanding through a series of
tasks.
Tasks:
1. Ping Basics
- Explain the purpose of the ping utility and its basic syntax.
- Provide examples of how to use ping to test connectivity to a website and a local host.
2. Ping Output Analysis
- Run the command ping (link unavailable) and capture the output.
- Analyze the output, explaining each line and its significance (e.g., packet loss, round-trip time,
etc.).
- Repeat the process for a local host (e.g., ping [Link]).
3. Ping Options
- Research and explain the following ping options:
- -c (count)
- -s (size)
- -t (ttl)
- -W (deadline)
- Provide examples of how to use each option.
4. Troubleshooting with Ping
- Describe a scenario where ping would be used for network troubleshooting (e.g., connectivity
issues, slow network speeds).
- Explain how to use ping to diagnose the issue, including which options to use and why.
5. Develop a ping type utility using Scapy. It should have the following points.
- 1. Basic Functionality
- Ensure the provided code works correctly.
- Test with different destination IPs and counts.
2. Additional Features
- Implement the following features:
- Option to specify TTL (Time-To-Live)
- Option to specify packet size
- Option to specify timeout
- Use Scapy's built-in functions to implement these features.
3. Error Handling
- Add error handling for cases like:
- Invalid destination IP
- Invalid count or TTL values
- Timeout errors
- Use try-except blocks to catch and handle exceptions.
4. Output Formatting
- Improve the output formatting to include:
- Packet loss percentage
- Average RTT (Round-Trip Time)
- Maximum and minimum RTT values
- Use Python's built-in formatting options to create a clean output.
Submission:
Please submit a written report (PDF or Word document) containing your answers to the tasks above.
Include screenshots or output captures where relevant.
For programming you need to create a github page (instruction to be given later)