Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TCP ACK 1

Status
Not open for further replies.

jamesjlee50

Programmer
Aug 10, 2004
5
US
Device “A” sends a 500b file to “B” with a sequence number of 4512. What ACK does “B” return to “A” to indicate positive reception? What ACK does it send to indicate a negative reception?
 
ACK = SEQ + LEN

LEN = TCP payload length field found in the TCP header. So if this will be 500, the ACK will be 5012.
The ACK number sent by B will be the next SEQ nummer that A will sent, so the next packet from A will have SEQ = 5012, if the lenght again is 500, the ACK from B will be 5512

If B does not recieve the package, it will not know it was ever sent. A timer wil run out on A and it will retransmit the packet using the same SEQ number.

Regards,
Robert



Robert Wullems
Network Specialist
SCP/SCE/SCM/CNX/MCP/MCSA/Network+
***************************************
If you can Sniff it, you can solve it!
***************************************
 
What ACK does "B" send to "A" to indicate negative reception in case of data corruption ("B" received the corrupted file)?
 
That depents. It will ack until the last correct received packet. You also have a windows size in TCP that comes into play if you look at things like this. B does not have to ACK every packet. Simple example:

- B says to A: I have a window size of 100 bytes.
- A sents packets of 10 bytes
- A can sent 10 packets x 10 bytes = 100 bytes before B has to sent an ACK.
- Packet 7 gets lost
- B wil ack until 6
- A has to sent 7 to 10 agian.

This is a very simple example, it is a bit more complicated, but this is the basics.
There is also an option in TCP called SACK (Selective ACK). Litle bit to complecated to discuss in a few words.
Regards,
Robert



Robert Wullems
Network Specialist
SCP/SCE/SCM/CNX/MCP/MCSA/Network+/CNA
***************************************
If you can Sniff it, you can solve it!
***************************************
 
If B gets a corrupted packet (wrong checksum or something similar...) B woin't send an Ack packet for this packet. As R.Wullems said B will send an ack, that says that it received packets until ... .I think I remember that there's also a possibility that B can send an Ack in which it says I received packets 1,2,3,4,5,7,9 not talking about the lost packages. That has the opportunity that A will not send all packages starting from 6 again. It will only need to send 6 and 8 again. But I'm not quite sure about this option.
I't might even be the selective Ack option,that r.wullems is talking about(pls tell me).

bye,
busche
 
Hi Percival21,

That is indeed the SACK option. But not many of todays TCP/IP implementations are using it. You will see it rearly.

There are currently three RFC's concerning SACK, RFC3517, RFC2883 and RFC2018. If you need some reading on this go to
Regards,
Robert


Robert Wullems
Network Specialist
SCP/SCE/SCM/CNX/MCP/MCSA/Network+/CNA
***************************************
If you can Sniff it, you can solve it!
***************************************
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top