How ACKs work

up2thetimeup2thetime Member Posts: 154
Trying to understand windowing and ACKs..

If PC1 is trying to send data to PC2 and PC2 has given a window of 3000

PC1 sends:
1000
2000
3000

PC2 replies with:
ACK 4000

PC1 will then send:
4000
5000
6000

Let us say an error occurs upon sending the 5000 (packet dropped or bad cabling)... This means that PC2 will reply with ACK 5000 which indicates it has not gotten 5000. When PC1 receives this, will it resend:
(a) just 5000
(b) 5000 and 6000
or
(c) 5000 6000 7000 since the window size is still 3000

(Assume that even though there was an error in the transmission of 5000, 6000 was still received successfully).

Or will PC2 indicate to PC1 that it JUST needs 5000 and the window size becomes irrelevant for this retransmission..

Much thanks!

Comments

  • fieldmonkeyfieldmonkey Users Awaiting Email Confirmation Posts: 254 ■■■□□□□□□□
    I was studying this a couple of days ago and this is how I understand that TCP will react to lost segments.

    In this case, the receiver will send an ACK 5000 back to the sender requesting that lost segment only. The receiver will continue to send this ACK = 5000 until received.

    Now if the receiver also never received SEQ 6000, it would send an ACK for that sequence also. Whether that is simultaneous or not, I have no idea.

    Once the sender receives the ACK = 5000 from the receiver, it will send the SEQ 5000 again (ONLY) and then wait for a reply ACK from the receiver, which would be ACK = X000, where X represents the next sequence needed. At that point the transmission would begin again restablishing the initial window size at the next needed sequence number.

    For example, If the ACK came back at 5000, it would then begin retransmission of the same window size sending 6000, 7000 and 8000. If there was no problem with the SEQ 6000 the receiver would send an ACK = 7000, requesting 7000, 8000 and 9000.
    WIP:
    Husband & Fatherhood Caitlin Grace born 8-26-2010

    Future Certs:
    Q1-2011 - INCD2, Microsoft or Linux (decisions, decisions...)
  • billscott92787billscott92787 Member Posts: 933
    That is an excellent explanation. I can't really elaborate on it anymore than that. That is pretty much how it works.
  • up2thetimeup2thetime Member Posts: 154
    rpfutrell wrote: »
    At that point the transmission would begin again restablishing the initial window size at the next needed sequence number.

    Ahhhhh! I see....!!

    So after a segment gets lost, the receiver requests the lost segment specifically, and then the window is set up again..??

    That is where I got messed up- not sure if the window had to be recreated after a lost segment happens

    It wouldn't make sense for the sender to send 5000 6000 and 7000 when the receiver didn't get 5000 specifically, but the receiver successfully got 6000. This just would be a waste since 6000 is received twice.

    Ps.. what source did you use.. I am looking for some good information on TCP out of curiousity.. i find the books i am reading leave me with a lot of wondering and unanswered questions regarding this stuff..i guess this is because i am only using CCENT books... maybe TCP is covered more in depth somewhere else
  • WilliamK99WilliamK99 Member Posts: 278
    up2thetime wrote: »
    Ps.. what source did you use.. I am looking for some good information on TCP out of curiousity.. i find the books i am reading leave me with a lot of wondering and unanswered questions regarding this stuff..i guess this is because i am only using CCENT books... maybe TCP is covered more in depth somewhere else

    For a really simplified good look at TCP, I have to reccomend Jeremy at CBT Nuggets, I bought a 1 month subscription, and he has helped really solidify my knowledge in quite a few areas I was originally weak in... His explanations are really good and done in such a way to help you retain the knowledge.
  • fieldmonkeyfieldmonkey Users Awaiting Email Confirmation Posts: 254 ■■■□□□□□□□
    up2thetime wrote: »
    Ahhhhh! I see....!!

    So after a segment gets lost, the receiver requests the lost segment specifically, and then the window is set up again..??

    That is where I got messed up- not sure if the window had to be recreated after a lost segment happens

    It wouldn't make sense for the sender to send 5000 6000 and 7000 when the receiver didn't get 5000 specifically, but the receiver successfully got 6000. This just would be a waste since 6000 is received twice.

    Ps.. what source did you use.. I am looking for some good information on TCP out of curiousity.. i find the books i am reading leave me with a lot of wondering and unanswered questions regarding this stuff..i guess this is because i am only using CCENT books... maybe TCP is covered more in depth somewhere else

    Cisco Press: ICND1 pages 140-141
    WIP:
    Husband & Fatherhood Caitlin Grace born 8-26-2010

    Future Certs:
    Q1-2011 - INCD2, Microsoft or Linux (decisions, decisions...)
  • Met44Met44 Member Posts: 194
    up2thetime wrote:
    I am looking for some good information on TCP

    Have you read over the RFCs?

    IETF Documents

    RFC 793 - Vanilla TCP - broad strokes
    RFC 2018 - Selective Acknowledgements (SACKs) - versus vanilla TCP's cumulative ACKs
    RFC 2581 - TCP Congestion Control - details about how TCP should deal with congestion
    RFC 5681 - TCP Congestion Control - draft to replace RFC 2581

    These should be a good technical read. There are a few others out there as well.
Sign In or Register to comment.