Hi all few questions again on tcp and tracert - TCP-IP

This is a discussion on Hi all few questions again on tcp and tracert - TCP-IP ; Hi all, My few questions to answer please 1) can i implement tracert algorithm with the help of ping algorthim itself if so how 2) what is significance of sequence no in ICMP format. 3) I had done tracert to ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Hi all few questions again on tcp and tracert

  1. Hi all few questions again on tcp and tracert

    Hi all,
    My few questions to answer please
    1) can i implement tracert algorithm with the help of ping algorthim
    itself if so how
    2) what is significance of sequence no in ICMP format.
    3) I had done tracert to google and verifyed with a sniffer on my
    system, i observed request and reply messages to my system from
    respective each routers may i know why iam getting this messages or
    these ping from respective routers to my system.
    4) if i have two routers R1 and R2 between source s1 and destination
    D1. And if from R1 the distance is minimal to D1.
    And Tcp/ip packet transmission is happening between R1 and D1 and if
    this connection in this path is down due to some reason.Now Tcp wil it
    look route R2 to send packets to route D1.
    My questions are) will three way hand shake will take palce again for
    route r2. Is there any responsibility of Tcp in this situation
    2) or routing algorithms will take care of this problem.
    3) which rfc of Tcp will explain this issue.

    Thanks in advance,
    with Regards,
    Babu


  2. Re: Hi all few questions again on tcp and tracert

    "linuxsrbabu@gmail.com" writes:
    > Hi all,
    > My few questions to answer please
    > 1) can i implement tracert algorithm with the help of ping algorthim
    > itself if so how


    I'm not sure that (homework?) question makes sense.

    The ping "algorithm" is extremely simple: send a packet, wait for
    answers, print the answers.

    Traceroute *typically* sends UDP datagrams rather than ICMP, in order
    to avoid problems on some routers that refuse to generate ICMP TTL
    errors in response to ICMP Echo messages. The helpful part here will
    be that a decent ping implementation needs to listen to raw ICMP
    messages, decode them, and print them. That's the same with
    traceroute.

    I think MS sends ICMP Echo for traceroute, though.

    > 2) what is significance of sequence no in ICMP format.


    It helps you detect loss and reordering.

    > 3) I had done tracert to google and verifyed with a sniffer on my
    > system, i observed request and reply messages to my system from
    > respective each routers may i know why iam getting this messages or
    > these ping from respective routers to my system.


    That doesn't look like a question. Please clarify.

    > 4) if i have two routers R1 and R2 between source s1 and destination
    > D1. And if from R1 the distance is minimal to D1.
    > And Tcp/ip packet transmission is happening between R1 and D1 and if
    > this connection in this path is down due to some reason.Now Tcp wil it
    > look route R2 to send packets to route D1.


    It may. When the routing protocols detect that R1 is down or that the
    path to D1 is down, they'll recompute a path. If there's a path from
    R2 to D1, and if that path is now the best available, then that's the
    direction the packets should go.

    > My questions are) will three way hand shake will take palce again for
    > route r2.


    No. One happens for the life of the TCP stream.

    > Is there any responsibility of Tcp in this situation


    TCP doesn't know or care. The transport layer (TCP) expects the
    network layer (IP) to get the packets to the destination using the
    best available method, or to drop the packets if they can't get there.
    How it does that is irrelevant.

    The linkage between TCP and IP is slight. If IP gets ICMP errors
    back, it'll report those to TCP. TCP typically caches this
    information and, if the connect ends up failing, it'll translate the
    last ICMP error into an errno for the application. If TCP detects a
    loss and retransmits, it'll provide advice to IP that the path to the
    destination seems to be sick, and that if IP has an alternate route,
    it'd be good to try switching.

    > 2) or routing algorithms will take care of this problem.


    Yes.

    > 3) which rfc of Tcp will explain this issue.


    None, really. RFCs 791 and 793, though, explain the basic IP and TCP
    operation and include broad descriptions of this separation of
    responsibilities.

    --
    James Carlson, Solaris Networking
    Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084
    MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677

  3. Re: Hi all few questions again on tcp and tracert

    In article ,
    James Carlson wrote:

    > > 3) I had done tracert to google and verifyed with a sniffer on my
    > > system, i observed request and reply messages to my system from
    > > respective each routers may i know why iam getting this messages or
    > > these ping from respective routers to my system.

    >
    > That doesn't look like a question. Please clarify.


    Except for the missing question mark at the end, it sounds like a
    question to me. Correcting his grammar (he's obviously not a native
    English speaker), it's: "why am I getting these messages or these pings
    from the respective routers to my system?"

    The answer is that this is how traceroute works. It sends out packets
    with successively increasing TTL values. Each router along the path
    decrements the TTL, and when the TTL reaches 0 the router sends back an
    ICMP TTL Exceeded message.

    See http://en.wikipedia.org/wiki/Traceroute

    --
    Barry Margolin, barmar@alum.mit.edu
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
    *** PLEASE don't copy me on replies, I'll read them in the group ***

  4. Re: Hi all few questions again on tcp and tracert

    On 24 Aug 2007, in the Usenet newsgroup comp.protocols.tcp-ip, in article
    , James Carlson wrote:

    >Traceroute *typically* sends UDP datagrams rather than ICMP, in order
    >to avoid problems on some routers that refuse to generate ICMP TTL
    >errors in response to ICMP Echo messages. The helpful part here will
    >be that a decent ping implementation needs to listen to raw ICMP
    >messages, decode them, and print them. That's the same with
    >traceroute.
    >
    >I think MS sends ICMP Echo for traceroute, though.


    The MS version only knows ICMP Echo, which is a little less than optimal
    in this era of the Internet. In a 1995 response to a email, Van Jacobson
    wrote:

    -------------
    The original ip spec (rfc791) said that you should never send an
    icmp error in reponse to an icmp packet. Several years later
    this was amended to "... in response to an icmp *error* packet" but,
    at the time that traceroute was written, most router vendors had
    implemented according to the original spec & wouldn't send an
    icmp time exceeded in response to an icmp echo or echo reply. I
    then tried using an unassigned ip protocol instead of udp but it
    turned out that crashed HPUX systems (remember this was ten
    years ago, IP was new & there were lots of flakey implementations).
    The only thing that worked & didn't appear to do damage was
    udp to a port range that wasn't (& still isn't) used very often.
    -------------

    The "current" version of LBL traceroute defaults to UDP, but has an
    option (-I) to use ICMP Echo. This option is not found on all versions
    of traceroute however. The "improved" version created by Olaf Kirch of
    Caldera Linux (subsequently adopted by SUSE) is one example that lacks
    this capability. But there are other alternatives available (mainly
    to a *nix type of O/S):

    [compton ~]$ whatis hping2 hping3 mtr traceroute tcptraceroute
    hping2 (8) - send (almost) arbitrary TCP/IP packets to network hosts
    hping3 (8) - send (almost) arbitrary TCP/IP packets to network hosts
    mtr (8) - a network diagnostic tool
    traceroute (8) - print the route packets take to network host
    tcptraceroute (8) - A traceroute implementation using TCP packets
    [compton ~]$

    While still dependent on ICMP type 11 for identifying intermediate hops,
    I find the last one to be particularly useful.

    Old guy


+ Reply to Thread