ArticleslgStudy

computer science

Ping (networking utility)

Ping (networking utility) is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Ping (networking utility) rather than just read about it. In short: Ping is a network management software utility used to test the reachability of a host on an Internet Protocol (IP) network. It is available in a wide range of operating systems.

Ping (networking utility) — main illustration
Ping (networking utility) — illustration

Key takeaways

  • Ping (networking utility) belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Ping (networking utility) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Ping (networking utility) from memory before moving on to harder problems.

Reference excerpt

Ping is a network management software utility used to test the reachability of a host on an Internet Protocol (IP) network. It is available in a wide range of operating systems. Ping measures the round-trip time for messages sent from the originating host to a destination computer that are echoed back to the source. The name comes from active sonar terminology that sends a pulse of sound and listens for the echo to detect objects under water. Ping operates by means of Internet Control Message Protocol (ICMP) packets. Pinging involves sending an ICMP echo request to the target host and waiting for an ICMP echo reply. The program reports errors, packet loss, and a statistical summary of the results, typically including the minimum, maximum, the mean round-trip times, and standard deviation of the mean. Command-line options and terminal output vary by implementation. Options may include the size of the payload, count of tests, limits for the number of network hops (TTL) that probes traverse, interval between the requests and time to wait for a response. Many systems provide a companion utility ping6, for testing on Internet Protocol version 6 (IPv6) networks, which uses ICMPv6.

History

The ping utility was written by Mike Muuss in December 1983 during his employment at the Ballistic Research Laboratory, now the US Army Research Laboratory. A remark by David Mills on using ICMP echo packets for IP network diagnosis and measurements prompted Muuss to create the utility to troubleshoot network problems. The author named it after the sound that sonar makes since its methodology is analogous to sonar's echolocation. The backronym Packet Internet Groper for ping has been used for over 30 years. Muuss says that, from his point of view, ping was not intended as an acronym but he has acknowledged Mills's expansion of the name. The first released version was public domain software; all subsequent versions have been licensed under the BSD license. Ping was first included in 4.3BSD. The FreeDOS version was developed by Erick Engelke and is licensed under the GPL. Tim Crawford developed the ReactOS version. It is licensed under the MIT License. Any host must process ICMP echo requests and issue echo replies in return.

Invocation example The following is the output of running ping on Linux for sending five probes (1-second interval by default, configurable via -i option) to the target host www.example.com:

The output lists each probe message and the results obtained. Finally, it lists the statistics of the entire test. In this example, the shortest round-trip time was 9.674 ms, the average was 10.968 ms, and the maximum value was 11.726 ms. The measurement had a standard deviation of 0.748 ms.

Error indications In cases of no response from the target host, most implementations display either nothing or periodically print notifications about timing out. Possible ping results indicating a problem include the following:

H, !N or !P – host, network or protocol unreachable S – source route failed F – fragmentation needed U or !W – destination network/host unknown I – source host is isolated A – communication with destination network administratively prohibited Z – communication with destination host administratively prohibited Q – for this ToS the destination network is unreachable T – for this ToS the destination host is unreachable X – communication administratively prohibited V – host precedence violation C – precedence cutoff in effect In case of error, the target host or an intermediate router sends back an ICMP error message, for example host unreachable or TTL exceeded in transit. In addition, these messages include the first eight bytes of the original message (in this case, the header of the ICMP echo request, including the quench value), so the ping utility can match responses to originating queries.

Message format

ICMP packet transported with IPv4 An ICMP packet transported with IPv4 looks like this.

Type: 8 bits Set to 8 to indicate 'Echo Request'. Checksum: 16 bits Checksum is the 16-bit ones' complement of the ones' complement sum of the ICMP packet, starting with the Type field, including the Payload. The IP header is not included. Identifier: 16 bits Can be used by the client to match the reply with the request that caused the reply. Sequence number: 16 bits Can be used by the client to match the reply with the request that caused the reply. Payload: variable length Optional. Payload for the different kind of answers; can be an arbitrary length, left to implementation detail. Most Linux systems use a unique Identifier for every ping process, and Sequence number is an increasing number within that process. Windows uses a fixed Identifier, which varies between Windows versions, and a Sequence number that is only reset at boot time. The Echo Reply is returned as:

Type: 8 bits Set to 0 to indicate 'Echo Reply'. Identifier: 16 bits Copied from the Echo Request and returned. Sequence number: 16 bits Copied from the Echo Request and returned. Payload: variable length Optional. Payload is copied from the Echo Request and returned.

ICMPv6 packet transported with IPv6 An ICMP packet transported with IPv6 looks like this.

Type: 8 bits Set to 128 to indicate 'Echo Request'. Identifier: 16 bits Can be used by the client to match the reply with the request that caused the reply. Sequence number: 16 bits Can be used by the client to match the reply with the request that caused the reply. Checksum: 16 bits The checksum is calculated from the ICMP message (starting with the Type field), prepended with an IPv6 pseudo-header. Payload: variable length Optional. Payload for the different kind of answers; can be an arbitrary length, left to implementation detail. Most Linux systems use a unique Identifier for every ping process, and Sequence number is an increasing number within that process. Windows uses a fixed Identifier, which varies between Windows versions, and a Sequence number that is only reset at boot time. The Echo Reply is returned as:

Type: 8 bits Set to 129 to indicate 'Echo Reply'. Identifier: 16 bits Copied from the Echo Request and returned. Sequence number: 16 bits Copied from the Echo Request and returned. Payload: variable length Optional. Payload is copied from the Echo Request and returned.

… excerpt ends here. Continue reading the full article.

Illustrations

Ping (networking utility) illustration
Ping (networking utility): DOS version of ping
DOS version of ping

Worked examples

Example 1 — a first encounter with Ping (networking utility)

Start with the simplest possible case. Write down what Ping (networking utility) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Ping (networking utility) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Ping (networking utility) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Ping (networking utility)

In research
Ping (networking utility) appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Ping (networking utility) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Ping (networking utility) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Free network management software, Internet Protocol based network software, Network analyzers, so understanding it makes those chapters shorter.
In everyday life
Look for Ping (networking utility) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Ping (networking utility)” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Ping (networking utility) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Ping (networking utility) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Ping (networking utility) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Ping (networking utility) in simple terms?

Ping is a network management software utility used to test the reachability of a host on an Internet Protocol (IP) network. It is available in a wide range of operating systems.

Why does Ping (networking utility) matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Ping (networking utility)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Ping (networking utility).

Tags

  • Free network management software
  • Internet Protocol based network software
  • Network analyzers
  • OS/2 commands
  • Unix network-related software
  • Windows administration
  • Windows commands
  • Windows communication and services

Keep exploring