WHAT IS PING COMMAND? Ping - Definition and details

WHAT IS PING COMMAND? Ping - Definition and details

 

PING COMMAMD






It stands for Packet Internet Groper The ping command is usually used as a simple way to verify that a computer can communicate over the network with another computer or network device. The ping command operates by sending Internet Control Message Protocol (ICMP) Echo Request messages to the destination computer and waiting for a response.

hello everyone we're going to talk about one of the most widely  used utilities that are used in networking

and I'm talking about the ping command

You may like these posts

    now the ping command is a simple tool

    that you can use to troubleshoot

    networking issues such as network

    connectivity so you can use it to test

    if you're connected to a local area

    network or if you're even connected to

    the Internet you can also use it to test

    if your network interface card is

    working correctly and it's also used to

    test DNS issues such as name resolution

    so for example let's go ahead and ping

    an IP address of a host now this host

    could be any network device such as a

    computer server router or printer

    whether it's on your local area network

    or over the Internet

    but in this example, we're going to ping

    a server in our local area network so we

    would open up a command prompt and then

    we would type the word ping along with

    the IP address of the server and then

    press Enter

    then the ping utility will send out four

    data packets to the IP address of the

    the server then our computer will wait for a

    the response then the server will send the

    data packets back to us as a reply and

    these replies are called echo reply

    requests and these replies inform you

    about what's happening with the server

    we pinged so for example if we received

    a reply then that is a good sign then

    that means that there is a network

    connectivity between us and the server

    whether that server is on your local

    area network or over the Internet

    so four packets were sent and then four

    packets were received but if we ping the

    same server and this time if we didn't

    get a reply then that means that the

    the server didn't reply back and it could

    mean that there is no network

    connectivity between our computer and

    the server now this could be for several

    different reasons so for example when we

    ping the server and if we get a message

    back that says we quest timed out the

    net could mean that the server is

    powered down or it could also mean that

    the server is up and running

    but it's using a firewall that's

    blocking all ping requests

    now what happens when you try and ping a

    host and not all of the data packets

    reply back to you so for example when

    you ping a host your computer sends out

    four data packets but sometimes you may

    only get one two or three packets back

    instead of the four that you sent out

    well this is called packet loss and

    packet loss can occur for several

    reasons it could mean that there's

    network congestion if there is a lot of

    traffic on a network and the network

    can't handle all that extra traffic then

    data packets will get dropped or it

    could also happen because of faulty

    hardware such as bad cables or bad

    wiring or it could be a bad network card

    or bad connections or it could be a bad

    a modem which is exactly what happened to

    me in my case a few years ago I was

    constantly lagging and just about

    everything I did on the Internet

    so I did a continuous ping test and I

    was dropping at least one-third of my

    packets fairly consistently so I

    determined that it had to be my modem so

    I had it replaced and it solved the

    problem

    or in another scenario, if we wanted to

    ping a remote server on the Internet and

    if we got a message that says

    destination host unreachable then that

    means that a route to the destination

    cannot be found so it could mean that a

    the router doesn't have any information on

    how to route data to the destination or

    it could also mean that the remote

    the server is down or disconnected from the

    network or it could also mean that your

    the computer is not connected to a network

    so let's use the ping command in a

    a typical scenario so suppose someone

    tells me that they don't have an

    internet connection because they can't

    access any web pages with their computer

    which is a pretty common issue so the

    The first thing I do is that I would sit at

    their computer and use the pin utility

    to see if in fact they are not connected

    to the Internet so even before I check

    their modem or router or any cable

    connections the first thing I do is do a

    simple ping test so I would open up a

    command prompt and see if I can ping a

    website such as yahoo.com now notice in

    this method I'm actually pinging the

    domain name yahoo.com and not its IP

    address because by doing it this way I'm

    also testing name resolution issues

    related to DNS and also besides that I

    don't have Yahoo's IP address memorized

    so by pinging yahoo.com

    and if the ping is successful then I

    know that we are connected to the

    internet because when I got a successful

    reply from yahoo.com then I

    automatically know that all of my

    hardware such as my cables the network

    card the router and the modem are all

    working correctly

    including my internet service provider

    so now I know that the reason that this

    a computer can't bring up web pages is

    related to software and not hardware so

    the problem is most likely with their

    internet browser or it's a firewall

    issue

    so by doing a ping test first it saved

    me a lot of time because I bypassed the

    the hassle of looking around for the modem

    over the router or looking at LEDs or

    checking the cables or looking behind

    the computer to see if a network cable

    is plugged into my network card I simply

    sat down and did a simple ping test so

    really the only time you need to check

    your hardware is if the ping was not

    successful however even before you start

    checking Hardware you can also use the

    ping command to check other things such

    as testing, if your network interface

    the card is working correctly and this is

    called a loopback test a loopback test

    will send out signals back to your

    a computer for testing purposes so at a

    command prompt I would type ping and

    then the loopback IP address which is

    127 0.01 or you can simply type ping

    localhost which does the same thing and

    if the ping was successful then you can

    be assured that your network card is

    working properly

    but if the loopback test failed then

    there's a problem with your network card

    now the ping command can also be used to

    test DNS name resolution issues and if

    you're not familiar with what DNS does

    please watch my DNS video on my youtube

    channel but in a nutshell DNS is what

    resolves domain names to IP addresses so

    as you recall earlier I did a ping test

    by pinging the domain name yahoo.com

    instead of its IP address and as I said

    before if the ping was successful then

    that means that all of my hardware is

    working correctly but besides it

    also verifies that DNS is working

    correctly so as you can see DNS

    successfully resolved and found the IP

    address for yahoo.com but if we pinged

    yahoo.com and we got a message that says

    ping request could not find a host

    yahoo.com please check the name and try

    again then this could be a DNS issue

    because our computer could not resolve

    the domain name to an IP address so the

    The next thing to do is to try and ping the

    IP address instead and that's if you

    already knew what the IP address was

    already or if you don't like most of us

    don't already you can type in an EZ IP

    address to remember such as Google's DNS

    The IP address which is 8.8.8.8 and if the

    ping was successful this time then this

    confirms it's a DNS issue because the

    the computer can ping IP addresses but it

    can't ping domain names so to solve this

    you can try a few things you can try

    flushing your DNS by typing IP config /s

    at a command prompt or you may want to

    check your DNS settings on your network

    card configuration and it could also be

    a problem with the DNS servers

    themselves or it could be a problem with

    your internet service provider and

    finally, the ping command can also be

    combined with other subcommands called 

    switches and switches are used to alter

    the parameters of the ping utility and

    you can view a full list of these

    switches by typing ping forward slash

    and then a question mark so thank you

    all