ping help

Discussion in 'Hardware' started by robertbiferi, Sep 22, 2011.

  1. robertbiferi

    robertbiferi I can't follow the rules

    I And the command
    -i
    is how long you want your Packets to Live for in mill sec I get this.

    But if you set a time for your Packets to Live for then why have a -t to let you stop it?

    Isn't it the same thing if you want you packets to stop you can stop them yourself why have the -i command or am I not understanding something??am just starting to use ping for Network and COM help.

    One thing I don't understand is this?
    The command -t
    is for pinging the Host until you stop it by hand I get this.
     
  2. Mada_Milty

    Mada_Milty MajorGeek

    The -i switch of the ping command allows you to specify the Time To Live (TTL), which is how many routers the data can pass through before the data expires. This is NOT measured in milliseconds, it's measured in "hops".

    You are correct on the -t switch, though... this allows you to continue pinging, until you manually stop the command.

    Perhaps a good demonstration is to run the tracert command. If you run tracert majorgeeks.com, this command will list every router/network your data must pass through to get to majorgeeks.com. If your data's TTL was lower than this number of routers, your requests would expire before they reached the webserver.

    You could simulate this by running ping -i 1 -t majorgeeks.com. Because the TTL is so low with the -i switch, your data won't reach anywhere, and with the -t switch, the ping command will keep trying and dying until you stop it :)
     
  3. robertbiferi

    robertbiferi I can't follow the rules

    OK thanks but oe more thing?

    -w
    Is the Timeout in ms default is 1,00 ms.

    -i
    Is Time to Live.

    Are they not the same thing timeout is how long it will keep going to right??
     
  4. Mada_Milty

    Mada_Milty MajorGeek

    No, not the same thing. The -w is the timeout in milliseconds that the ping command will wait for a response from the remote machine, and again, the -i switch allows you to set the TTL, which is the number of routers (also known as "hops") the data will take before it's considered expired.
     
  5. robertbiferi

    robertbiferi I can't follow the rules

    Thanks and tell me if I have this right?

    Every Paket is 32kB and 4. get sent at a time.

    If you want to ajust the size of the Packet do you use the
    -l

    witch is a Lowercass L
     
  6. Mada_Milty

    Mada_Milty MajorGeek

    That's right...

    You might want to try running ping /? as this will list all switches for the ping command, and describe what each does. And don't be afraid to play around with it; you won't hurt anything.
     
  7. robertbiferi

    robertbiferi I can't follow the rules

    Am I right that all the switchs are to be typed after the Ping host name like this

    ping localhost-f
     
  8. Mada_Milty

    Mada_Milty MajorGeek

    No, ping usage is described like this:

    Code:
    [B]Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
                [-r count] [-s count] [[-j host-list] | [-k host-list]]
                [-w timeout] [-R] [-S srcaddr] [-4] [-6] target_name[/B]
    
    Options:
        -t             Ping the specified host until stopped.
                       To see statistics and continue - type Control-Break;
                       To stop - type Control-C.
        -a             Resolve addresses to hostnames.
        -n count       Number of echo requests to send.
        -l size        Send buffer size.
        -f             Set Don't Fragment flag in packet (IPv4-only).
        -i TTL         Time To Live.
        -v TOS         Type Of Service (IPv4-only. This setting has been deprecated
                       and has no effect on the type of service field in the IP Header).
        -r count       Record route for count hops (IPv4-only).
        -s count       Timestamp for count hops (IPv4-only).
        -j host-list   Loose source route along host-list (IPv4-only).
        -k host-list   Strict source route along host-list (IPv4-only).
        -w timeout     Timeout in milliseconds to wait for each reply.
        -R             Use routing header to test reverse route also (IPv6-only). 
        -S srcaddr     Source address to use.
        -4             Force using IPv4.
        -6             Force using IPv6.
    As you can see, the switches appear directly after the ping command.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds