Study of ping Command
Experiment
Study of ping Command
๐ฏ Aim
To test network connectivity between systems using the ping command.
๐ Objective
By the end of this experiment, students will be able to:
- Check connectivity between two hosts
- Measure network latency
- Understand packet transmission and loss
- Diagnose basic network issues
๐ Theory
The ping command is used to:
- Test whether a host (computer/server) is reachable
- Measure round-trip time (RTT) of packets
It works using the ICMP (Internet Control Message Protocol) by sending:
- Echo Request packets
- Receiving Echo Reply responses
๐ If replies are received → host is reachable
๐ If not → network issue or host unreachable
๐งพ Syntax
-
<destination>→ IP address or domain name
๐ง Common Options
-
-c <count>→ Number of packets to send -
-i <interval>→ Time interval between packets -
-s <size>→ Packet size -
-t <ttl>→ Set Time To Live -
-w <deadline>→ Total time limit
๐งฐ Prerequisites
- Linux system
- Network connection
- Basic terminal knowledge
๐ฌ Procedure & Commands
1️⃣ Ping a Remote Host (Domain Name)
2️⃣ Ping an IP Address
3️⃣ Send Limited Packets
๐ Sends only 4 packets.
4️⃣ Set Time Interval
๐ Sends packets every 2 seconds.
5️⃣ Change Packet Size
๐ฅ️ Sample Output
๐ Output Interpretation
| Field | Meaning |
|---|---|
| bytes | Size of packet received |
| icmp_seq | Sequence number |
| ttl | Time To Live |
| time | Round-trip time (latency) |
๐ Summary Statistics (End Output)
๐ Indicates:
- Packet loss percentage
- Network delay performance
๐ Exercises for Students
- Ping a known website and note response time.
- Ping an unreachable IP and observe output.
- Compare latency for different websites.
- Send 5 packets and calculate average delay.
- Disconnect network and observe packet loss.
❓ Viva Questions
-
What is the purpose of
ping? -
What protocol does
pinguse? - What is RTT?
- What does TTL indicate?
- What is packet loss?
⚠️ Precautions
- Some servers block ICMP (ping may fail even if host is up)
- Continuous ping may consume network resources
- Use responsibly in shared networks
✅ Result
The ping command is a basic yet powerful tool to test connectivity and measure network performance, widely used in troubleshooting.
Comments
Post a Comment