Ping and Tracert

Discussion in 'Linux Networking' started by Geoff Lane, Apr 13, 2008.

  1. Geoff Lane

    Geoff Lane Guest

    I was under the impression that Ping and Tracert were similar utilities
    with tracert giving a wee bit more information about the connection.

    Why is it then, if I ping bbc.co.uk I get response times of around 30ms
    whereas if I tracert the same address it appears to take much longer.

    Geoff Lane
     
    Geoff Lane, Apr 13, 2008
    #1
    1. Advertisements

  2. Geoff Lane

    Bit Twister Guest

    tracert is going to be timing each node/hop to bbc.co.uk with dns
    look ups along the way,

    Try again with
    tracert -d bbc.co.uk
    to suppress DNS look ups
     
    Bit Twister, Apr 13, 2008
    #2
    1. Advertisements

  3. Geoff Lane

    Dave Uhring Guest

    There is no tracert in Linux. Why are you asking a windows question here?
    Are the windows lusers too stupid to answer it?
     
    Dave Uhring, Apr 13, 2008
    #3
  4. I've never heard of "tracert". Perhaps you mean "traceroute"? Perhaps
    the admin that runs your computer put tracert in as an abbreviation
    (though I'd have used perhaps "trt" to maximize the minimization {8^).

    Traceroute - at least the version I use; I know that there are a couple
    about - can transmit either "high" UDP or ICMP packets. Ping, as far as
    I know, only uses ICMP. Traceroute defaults to UDP, so naive use of the
    two programs could yield different results if ICMP and UDP packets are
    treated differently.

    Note that there's also a tcptraceroute because TCP can be treated
    differently than ICMP or UDP.

    Traceroute also sends packets with a slowly increasing TTL, thus checking
    time for each hop. Ping doesn't do this as far as I know. But this "hop
    testing" needs to be taken with a grain of salt, in that hops in one
    direction may not correspond to the hops in the other direction (routing
    being naturally asymmetrical).

    Ping does have a "flood" option which can be useful in some cases (ie.
    like the old "spray" utility); I don't recall seeing this in traceroute.

    - Andrew
     
    Andrew Gideon, Apr 13, 2008
    #4
  5. Geoff Lane

    Geoff Lane Guest

    I was under the impression that the message header should have shown
    that I posted to two groups (uk.comp.home-networking) and the
    Followup-To: this group. I've checked it and it doesn't show this other
    group.

    As for my typing tracert, perhaps I should have said 'or traceroute in Linux
    Not really but Linux users are generally more techie :)

    Geoff Lane
     
    Geoff Lane, Apr 13, 2008
    #5
  6. Geoff Lane

    Alex Buell Guest

    More to the point, why is tracert still seven letters long in Vista,
    when long file names was first implemented in Windows 95 *sniggers*
    back in the mid-1990s?
     
    Alex Buell, Apr 13, 2008
    #6
  7. Geoff Lane

    Geoff Lane Guest

    Right, done that and from my machine it gives 7 hops to bbc, all except
    my local machine give around 32ms

    Ping gives similar times but doesn't ping still have 7 hops to reach the
    bbc site.

    Geoff Lane
     
    Geoff Lane, Apr 13, 2008
    #7
  8. Geoff Lane

    Bit Twister Guest

    Yes, but ping is not testing each hop like tracert.
     
    Bit Twister, Apr 13, 2008
    #8
  9. Geoff Lane

    Geoff Lane Guest

    Yes, it does make you wonder..

    Geoff Lane
     
    Geoff Lane, Apr 13, 2008
    #9
  10. Geoff Lane

    Geoff Lane Guest

    Yes, quite right, tracert is windows version.

    Thanks for follow up explanation, I was forgetting that both commands
    use different protocols.

    Geoff Lane
     
    Geoff Lane, Apr 13, 2008
    #10
  11. I don't see why CLI or X access would make any difference.

    - Andrew
     
    Andrew Gideon, Apr 13, 2008
    #11
  12. Geoff Lane

    Dave Uhring Guest

    And what does that have to do with asking a question about a windows
    utility?
    Had you asked about traceroute I would have suggested that you read the
    man page for traceroute which fully describes its operation. Then
    compare that to the description of ping.

    If you don't like being told to do a little reading then FOAD.
    We do read the documentation which comes with our systems.
     
    Dave Uhring, Apr 13, 2008
    #12
  13. Geoff Lane

    Alex Fraser Guest

    The Windows ping and tracert utilities both send ICMP Echo Request
    packets. The tracert utility sends them in sets of three with increasing
    TTLs, starting with one, which (generally) gives a trace of the route
    packets take from source to destination (the reverse route may be
    different).
    Pass; I get the same here.

    Alex
     
    Alex Fraser, Apr 13, 2008
    #13
  14. Are there different ping and traceroute used via X than via the CLI?
    Otherwise, I cannot see the difference made by whether or not one is
    running under a windowed environment.

    - Andrew
     
    Andrew Gideon, Apr 13, 2008
    #14
  15. Geoff Lane

    Andy Furniss Guest

    I get the same times for ping and traceroute -I www.bbc.co.uk.

    Maybe you weren't hitting the same server or it's a tracert thing.

    Andy.
     
    Andy Furniss, Apr 13, 2008
    #15
  16. Geoff Lane

    Dave Uhring Guest

    He's referring to Microsoft Windows, not X Windows.
     
    Dave Uhring, Apr 13, 2008
    #16
  17. Eh? Seriously? Why not run CP/M? Isn't it time to upgrade? Even Apple
    has finally done away with their klunker of an OS and shifted to a UNIX.

    - Andrew

    P.S. Or did my leg come off from someone pulling it just now?
     
    Andrew Gideon, Apr 14, 2008
    #17
  18. Geoff Lane

    Dave Uhring Guest

    CP/M didn't have any networking capability unless somebody added it after
    I quit using it in 1985. So it wasn't much good for running either ping
    or traceroute :)
    Asking windows questions in Linux NGs is pulling everybody's legs.
     
    Dave Uhring, Apr 14, 2008
    #18
  19. Geoff Lane

    Rob Morley Guest

    Ping sends a ICMP packet to the server, which sends an acknowledgement
    back (if it's running the ping service). Traceroute sends an ICMP
    packet which has expired, which causes an error at the first router it
    reaches - the router returns an error message which includes the
    router's details that traceroute then displays. It then sends another
    packet that hasn't quite expired, which will pass through the first
    router but be caught by the next, and so on down the line. Routers are
    optimised to pass packets very quickly, but error messages are a lower
    priority so it will take longer for the router to return an error
    message than it will for it to forward a good packet. The final hop of
    the traceroute to the destination address also prompts an error response
    (port unreachable), while ping servers do nothing but reply to ping
    requests all day, so they're pretty good at what they do. :)

    Why do you keep crossposting to uk.comp.home-networking but quietly
    setting followup to comp.os.linux.networking? I don't read that group.
     
    Rob Morley, Apr 14, 2008
    #19
  20. Geoff Lane

    Jim Cochrane Guest

    I seem to lack imagination this evening - all I can come up with for
    FOAD is: "f... off a...... dog". But that has to be wrong :)

    --
     
    Jim Cochrane, Apr 14, 2008
    #20
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.