CSS G10 Q1 - Wk8 - Ping Command
CSS G10 Q1 - Wk8 - Ping Command
Department of Education
Region III
DIVISON OF MABALACAT CITY
I. Introduction/Panimula
This Learning Activity Sheets was designed and written with you in mind. It
is here to help you know and learn all about the Ping command.
After going through this Learning Activity Sheets, you are expected to:
IV.Discussion/Pagtalakay
1
Ping is a command-line utility, available on virtually any operating system
with network connectivity, that acts as a test to see if a networked device is
reachable.
The ping command sends a request over the network to a specific device. A
successful ping results in a response from the computer that was pinged back
to the originating computer.
What does Ping stand for?
According to the author, the name Ping comes from sonar terminology. In
sonar, a ping is an audible sound wave sent out to find an object. If the sound
hits the object, the sound waves will reflect, or echo, back to the source. The
distance and location of the object can be determined by measuring the time
and direction of the returning sound wave.
Similarly, the ping command sends out an echo request. If it finds the target
system, the remote host sends back an echo reply. The distance (number of
hops) to the remote system can be determined from the reply, as well as the
conditions in-between (packet loss and time to respond). While the author of
the ping utility said the name of the program was simply based on the sound
of sonar, others sometimes say that Ping is an acronym for Packet InterNet
Groper.
The Ping utility uses the echo request, and echo reply messages within the
Internet Control Message Protocol (ICMP), an integral part of any IP network.
When a ping command is issued, an echo request packet is sent to the
address specified. When the remote host receives the echo request, it
responds with an echo reply packet.
By default, the ping command sends several echo requests, typically four or
five. The result of each echo request is displayed, showing whether the request
received a successful response, how many bytes were received in response,
the Time to Live (TTL), and how long the response took to receive, along with
statistics about packet loss and round trip times.
2
The echo request ("ping") is structured as follows:
The echo reply must include the exact payload received in the request:
3
Ping switches and variables
There are numerous switches available for the ping command that allow the
default settings to be customized for more specific purposes. Unfortunately,
there is no consistency across platforms for the different switches. For
example, Windows uses a -n (number) to set how many pings to send, while
most Unix systems use a -c (count).
Here are some examples of ping command switches. Generally, using ping -
? will result in a list of switches along with the corresponding letter to use
the switch on the operating system.
Number (or count) – sets the number of echo requests, or pings, to be sent. By
default, this number is four on most Windows systems, and five on most Unix
systems. Setting a higher number allows the ping to continue to run either as
a way of gathering more data, for example, to see if the reply time varies, or
as a way of ensuring that a system continues to be responsive.
Timeout – changes the timeout before the utility waits for a reply from the
destination. On Windows systems, the default value is 4,000 milliseconds, or
4 seconds.
Size – changes the size of the ping packet. The default value on Windows is
32 bytes, many Unix/Linux systems default to 64 bytes.
TTL – sets a different TTL.
IP4 or IP6 – responds with IPv4 or IPv6 addresses. (ping -4/ping -6 in
Windows, ping or ping6 in Linux)
Until stopped – keeps running the ping until stopped by the user (-t in
Windows)
Ping command syntax for Windows
Syntax Description
-t Using this option will ping the target until you force it to
stop using Ctrl-C.
-a - This ping command option will resolve, if possible,
the hostname of an IP address target.
-n count This option sets the number of ICMP Echo Request
messages to send. If you execute the ping command
without this option, four requests will be sent.
-l size Use this option to set the size, in bytes, of the echo request
packet from 32 to 65,527. The ping command will send a
32 byte echo request if you do not use the -l option.
-f Use this ping command option to prevent ICMP Echo
Requests from being fragmented by routers between you
and the target. The -f option is most often used to
troubleshoot Path Maximum Transmission Unit (PMTU)
issues.
-i TTL This option sets the Time to Live (TTL) value, the
maximum of which is 255.
4
-v TOS This option allows you to set a Type of Service (TOS) value.
Beginning in Windows 7, this option no longer functions
but still exists for compatibility reasons.
-r count Use this ping command option to specify the number
of hops between the computer and the target computer or
device that you would like to be recorded and displayed.
The maximum value for count is 9 so use the tracert
command instead. If you are interested in viewing all hops
between two devices.
-s count Use this option to report the time, in Internet Timestamp
format, that each echo request is received and echo reply
is sent. The maximum value for count is 4 which means
that only the first four hops can be time stamped.
-w timeout Specifying a timeout value when executing the ping
command adjusts the amount of time, in milliseconds,
that ping waits for each reply. If you do not use the -
w option, the default timeout value is used which is 4000,
or 4 seconds.
-R This option tells the ping command to trace the round trip
path.
-S srcaddr Use this option to specify the source address.
-4 This forces the ping command to use IPv4 only but is only
necessary if target is a hostname and not an IP address.
-6 This forces the ping command to use IPv6 only but as with
the -4 option, is only necessary when pinging a hostname.
target This is the destination you wish to ping, which is either
an IP address or a hostname.
/? Use the help switch with the ping command to show
detailed help about the command's several options.
How to use Ping
For such a small, basic utility, the ping command can be a valuable tool in
numerous situations. As a command-line based utility, ping lends itself to
easy use in various scripts, allowing for numerous pings to run and be
recorded for all manner of usage. For example, the output of the ping
command can easily be piped to a text file for later review.
V. Activities/Mga Gawain
Directions: Read each sentence or statement carefully. Choose the letter
of the correct answer and write it on your answer sheet.
5
_____1. The _____ command sends a request over the network to a specific
device.
a) Ping b) Echo
c) Line d) None of the above
_____2. The name Ping comes from ______ terminology.
a) Lunar b) Nuclear
c) Sonar d) None of the above
_____3. Ping is an acronym for;
a) Packet InterNet Goal b) Pocket InterNet Gool
c) Packet InterNet Golf d) None of the above
_____4. The ____________ available for the ping command that allow the default
settings to be customized for more specific purposes.
a) Witches b) Switches
c) Ritches d) None of the above
_____5. The ICMP, an integral part of any IP network is an acronym for;
a) Inter Color Mode Protocol b) Internet Control Message Protocol
c) InterNet Code Mode Protocol d) None of the above
_____6. The TTL is an acronym that stands for;
a) Time To Love b) Time To Leave
c) Time To Live d) None of the above
_____7. The PMTU is an acronym that stands for;
a) Path Maximum Transmission Unit b) Peak Manpower Toll Unit
c) Path Minimum Transmission Unit d) None of the above
_____8. The TOS is an acronym that stands for;
a) Type of Switch b) Type of Sales
c) Type of Seller d) None of the above
_____9. This is the destination you wish to ping, which is either an IP address
or a hostname.
a) Target b) Host
c) Destination d) None of the above
_____10. This ping command option will resolve, if possible, the hostname of
an IP address target.
a) t b) a
c) f d) None of the above
_____11. The __ option is most often used to troubleshoot PMTU issues.
a) t b) a
c) f d) None of the above
_____12. Using this option will ping the target until you force it to stop
using Ctrl-C.
a) t b) a
c) f d) None of the above
_____13. This option tells the ping command to trace the round trip path.
a) R b) RR
6
c) RT d) None of the above
_____14. When a ping command is issued, an echo request ______ is sent to
the address specified.
a) Witches b) Switches
c) Packet d) None of the above
_____15. Use this option to report the time, in Internet Timestamp format, that
each echo request is received and echo reply is sent.
a) -r count b) -s count
c) -t count d) None of the above
VI. Assessment/Pagsusulit
Directions: True or False. Write True if the statement or sentence is
correct and write False otherwise.
_____1. The Ping command sends a request over the network to a specific
device.
_____2. The name Ping comes from Sonar terminology.
_____3. Ping is an acronym for Packet InterNet Goal
7
_____4. The Ritches available for the ping command that allow the default
settings to be customized for more specific purposes.
_____5. The ICMP, an integral part of any IP network is an acronym for
Internet Control Message Protocol.
_____6. The TTL is an acronym that stands for Time To Love.
_____7. The PMTU is an acronym that stands for Path Maximum Transmission
Unit.
_____8. The TOS is an acronym that stands for Type of Switch.
_____9. Target is the destination you wish to ping, which is either an IP
address or a hostname.
_____10. This ping command option -a will resolve, if possible,
the hostname of an IP address target.
_____11. The -x option is most often used to troubleshoot PMTU issues.
_____12. Using this option -f, will ping the target until you force it to stop
using Ctrl-C.
_____13. This, R option tells the ping command to trace the round trip path.
_____14. When a ping command is issued, an echo request Switches is sent
to the address specified.
_____15. Use this option -t count to report the time, in Internet Timestamp
format, that each echo request is received and echo reply is sent.
Reflection/Pangwakas
Directions: Identify what is describe in the sentence or statement and
write it on your answer sheet.
8
___________4. The _______ available for the ping command that allow the
default settings to be customized for more specific purposes.
___________5. The ICMP, an integral part of any IP network is an acronym for;
___________6. The TTL is an acronym that stands for;
___________7. The PMTU is an acronym that stands for;
___________8. The TOS is an acronym that stands for;
___________9. ________ is the destination you wish to ping, which is either an
IP address or a hostname.
___________10. This ping command option _____ will resolve, if possible,
the hostname of an IP address target.
___________11. The ____ option is most often used to troubleshoot PMTU
issues.
___________12. Using this option __ will ping the target until you force it to
stop using Ctrl-C.
___________13. This, ___option tells the ping command to trace the round trip
path.
___________14. When a ping command is issued, an echo request _______ is
sent to the address specified.
___________15. Use this option _____ to report the time, in Internet Timestamp
format, that each echo request is received and echo reply is
sent.
VII. Reference
https://www.cloudflare.com/learning/network-layer/internet-protocol/
9
https://en.wikipedia.org/wiki/IP_address
https://en.wikipedia.org/wiki/Internet_Protocol
https://study-ccna.com/classes-of-ip-addresses/
https://www.lifewire.com/what-is-a-static-ip-address-2626012
https://www.paessler.com/it-explained/ping
10
9. A 9. True
8. D 8. False
IX. Development Team