Ping and ICMP

Lesson

Ping is a simple utility found across hosts (Windows, Linux, Mac…) and network devices (such as routers).

Ping uses the Internet Control Message Protocol to send an ‘echo request’ to another device. Typically the address of the other device may be given directly as an IP address or as a hostname which the ‘pinger’ tries to resolve to an IP address using DNS.

If a device is configured to respond to pings (echo requests), then it sends an ‘echo reply’ in response.

The ping program then displays information about the responses received such as

Ping is a simple but effective tool for testing network connectivity and troubleshooting issues.

ICMP: The Internet Control Message Protocol

ICMP can do a lot more than basic pings. For example, it may be used to share information about a network and attempted connections. RFC 792 defines ICMP.

ICMP is encapsulated directly inside an IP packet and consists of a header and payload. The header consists of:

The payload varies depending on the message type.

In theory, there could be up to 255 different types of message, but most of these are deprecated or currently unassigned.

Common ICMP Message Types

Type 0: Echo Request (ping)

Type 3: Destination Unreachable

Type 5: Redirect Message

Type 8: Echo Request (ping reply)


Questions

Test your knowledge with these questions.

A ping is an ICMP message type 8: Echo Request.

ICMP

References

Learn more about this topic by checking out these references.


Other Lessons

Learn more by checking out these related lessons

Access Control Lists for Beginners

lesson

View

DNS: The Domain Name System

lesson

View

How does IPv4 work?

lesson

View

How does traceroute work?

lesson

View

Using tcpdump: Options, Filters and Examples

lesson

View

Courses

This lesson is part of the following courses.

Computer Networking Foundations

course

View