What is PING and How to Use it? Learn it with 7 Examples

Ping is among the mostly used community instructions.

In in the present day’s article you’ll be taught what it’s, learn how to use it, on-line ping instruments and a few sensible examples.

First, let’s have a look at what ping is. Ping is a Terminal/Shell command utility used as a easy approach to confirm {that a} machine has Web entry and might talk with different computer systems or community units.

Some features of the ping command are:

  • Take a look at community connectivity: native community, web
  • Troubleshoot community interface card points
  • Take a look at issues with DNS identify decision

Most working methods like Home windows, macOS, and Linux include Ping pre-installed, however we’ll dive into the set up course of by way of this text.

Perhaps you’ve got seen it ping in regular conversations, for instance, “I am going to ping you as quickly as I am performed with work”. In plain language, ping merely means a message despatched from one laptop to a different.

Ping utilization

To verify if ping is put in, launch a terminal (macOS, Linux) or command immediate (Home windows) and sort “ping –assist”. Typically it’s best to see one thing like this.

Should you get a assist part with a listing of flags to make use of, you are good to go. In some Linux distributions like Ubuntu, you might run into issues as a result of ping will not be put in by default. In Ubuntu you possibly can set up ping with:

sudo apt set up iputils-ping

One other approach to take a look at ping is put in in your system by utilizing whichwhich returns the trail of each binary file put in in your system:

which ping

# /usr/bin/ping  # My end result

Now that you should utilize ping with none issues, it is time to be taught its fundamental utilization.

The ping command connects to any obtainable host, each in your native community and over the Web. That host will be one other laptop, server, router, or perhaps a printer.

Ping accepts one argument: the online or IP handle you are attempting to hook up with. For instance, we are attempting to hook up with geekflare.com.

$ ping geekflare.com

Do not forget that the “$” signal means we’re utilizing a bash shell; in Powershell (Home windows) this could be “>”. Copy solely the command and never the greenback signal.

After typing the above command, it’s best to see one thing like the next:

PING geekflare.com (104.27.118.115) 56(84) bytes of knowledge.
64 bytes from 104.27.118.115 (104.27.118.115): icmp_seq=1 ttl=57 time=64.1 ms
64 bytes from 104.27.118.115 (104.27.118.115): icmp_seq=2 ttl=57 time=71.4 ms

First, it signifies the area identify we are attempting to hook up with, and its IP handle in parentheses. It then sends packets of knowledge bytes (often 64) to the specified vacation spot. To cease the ping command, simply press Ctrl+C.

When you have a secure web connection (which I am positive since you’re studying this), it’s best to get a message much like the one beneath:

--- geekflare.com ping statistics ---
3 packets transmitted, 3 acquired, 0% packet loss, time 10192ms

This message reveals the statistics of the ping course of you carried out to a site identify or IP handle. As you possibly can see, ping despatched 3 knowledge packets and acquired all of them. That implies that each your web connection and the internet hosting service serving the IP handle are working completely.

That very same course of occurs whenever you go to an online web page, you (your browser) ship knowledge packets with a request, the DNS (area identify service) interprets the area identify to an actual IP handle, after which the host sends the content material of the web page again to us. After all we skip a whole lot of issues, however that is simply a proof of a easy community interplay.

As a professional tip, everytime you want a listing of accessible flags, you possibly can entry the guide web page man or the -staff flag.

man ping
# Handbook web page
ping --help
# Assist flag

IPv6 vs IPv4

The world is operating out of IP addresses and in consequence we’re beginning to implement IPv6 (Web Protocol model 6).

In brief, IPv4 is the core IP protocol on which the Web runs. It makes use of a 32-bit IP handle, together with a numeric dot notation. For instance, Google’s predominant IP handle is 8.8.8.8. IPv4 has been round since 1981 and is the conventional protocol we’re used to.

However, IPv6 is one other IP protocol that solves the issue of going out of handle. If IPv4 has max 4.3 billion mixtures that IPv6 might have 340 trillion trillion trillion IP addresses.

Right here is an instance of an IPv6 handle: 2001:db8:3333:4444:5555:6666:7777:8888.

In different phrases, we are going to transfer to IPv6 addresses within the subsequent few years, as a result of each IOF (Web of Issues) machine and all future web sites will want new addresses.

Ping already helps IPv6 addresses, and in some Linux distributions you will discover an unique command, ping6, for that.

Nevertheless, one of the best ways to ping an IPv6 handle is to make use of the -6 flag.

This is an instance:

ping -6 2001:db8:3333:4444:5555:6666:7777:8888

In case your community would not but help IPv6, don’t be concerned. The IPv6 adaptation has grown enormously in recent times.

Google statistic of IPv6 adoption worldwide
IPv6 rising help

Use the IPv6 take a look at device to verify in case your web site helps it.

On-line ping providers

Ping-only use will not be supposed to find out whether or not you possibly can attain a particular server, but additionally to acquire the latency (the time it takes to obtain a response) of your request to a server. On-line ping instruments help you acquire far more knowledge concerning the ping processes resembling

However, if you’re having a nasty time along with your connectivity or simply wish to take a look at your server’s latency from totally different areas all over the world, a web based Ping device is your finest guess.

Take a look at our free on-line ping device and carry out pings from London, Mumbai and Oregon. With the assistance of this device, you’ll get necessary knowledge like packet loss and the utmost and minimal time it takes to get a response out of your server.

Geekflare's PING online tool results page

Command examples

Let’s take a look at and see some frequent examples of this networking device.

#1. Verify your web connection

This will appear apparent, however you possibly can verify when you can entry the web by pinging (the motion of utilizing ping) to a strong goal host like google.com.

ping google.com

Should you do not obtain a response, your web connection might be not working correctly.

#2. Ship a sure variety of pings

One drawback you might run into if you’re utilizing a Unix machine is that ping sends knowledge packets indefinitely. With the flag -C (quantity), you possibly can specify the variety of pings you wish to make. For instance, if you wish to ping precisely 3 times, you are able to do that.

ping -c 3 geekflare.com

Observe: This doesn’t occur in Home windows, the place ping solely sends 4 knowledge packets

You should utilize this flag to simply ship a ping request and show the IP handle of the vacation spot you are attempting to achieve.

ping -c 1 google.com

#3. Ping a server inside an interval

You possibly can set an interval of seconds between sending every packet. The default interval is one second, however you possibly can change it with the -i flag.

ping -i 3 geekflare.com

#4. Ping localhost

You possibly can ping any IPv4 handle; therefore you possibly can ping your localhost utilizing the localhost label or the IP handle 127.0.0.1.

ping localhost
# works superb
ping 127.0.0.1
# works superb too

Ping doesn’t undergo a bodily community interface, however by way of a digital loopback.

#5. Ping a broadcast

You should utilize the -B flag to ship requests to a broadcast handle. For instance, the next command means that you can ping all units in your native community.

ping -b 255.255.255.255

#6. Ship a particular package deal measurement

Relying in your wants, you possibly can change the packet measurement of your ping utilizing the -S flag with the variety of bytes you wish to ship.

ping -s 70 google.com

Please word that some requests might not work if you’re sending a big package deal.

#7. Flood ping

The -F flag sends ping requests as quick as your laptop and community can. Because the minimal ping interval allowed for the consumer is 200 ms, it’s worthwhile to run it as superuser with the command sudo.

ping -f google.com
PING google.com (142.250.78.142) 56(84) bytes of knowledge.
ping: can't flood; minimal interval allowed for consumer is 200ms

sudo ping -f -c 1000 google.com
# Cease after 1000 pings
--- google.com ping statistics ---
1000 packets transmitted, 1000 acquired, 0% packet loss, time 11158ms

As you possibly can see I’ve the depend flag to cease sending requests as soon as it reaches 1000 occasions (word that this solely took 11 seconds).

Observe: Be extraordinarily cautious when utilizing ‘flood ping’ as you might trigger a DoS (denial of service) on the server you might be pinging. The one scenario the place it’s best to use that is for testing your server in high-intensity environments.

IP or area ping API

Geekflare Ping API is a helpful device that means that you can monitor the efficiency of any IP handle or area from a number of areas.

geekflare ping API

This may be vital for keeping track of a variety of servers to make sure an optimum end-user expertise.

And what’s extra, you possibly can simply do this with Geekflare’s API-free tier, which generates 3000 API calls monthly.

For the professionals, the premium plans add residential proxies, elevated request price, and elevated variety of API calls, beginning at simply $5 monthly.

Conclusion

A ping is a device that’s nearly as outdated because the web itself. It means that you can decide you probably have an energetic web connection or not and take a look at when you can attain net servers or different community units.

Do not forget to make use of our PING take a look at device, together with our full toolbox, to check your web site.

Leave a Comment

porno izle altyazılı porno porno