cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2542
Views
0
Helpful
1
Replies
Iluvnetwork
Beginner

TCP Phantom Byte vs Padding & ACK Number Question

Case 1:

PC A sends a packet (8bytes padding, 20B TCP Header, 20B IP Header, 18B Ethernet Header) with 0 sequence number to PC B.

PC B will send an ACK Message (ACK Number = 0) Right?

Case 2:
PC A sends a packet (Phantom Byte(1B), 7bytes padding, 20B TCP Header, 20B IP Header, 18B Ethernet Header) with 0 sequence number to PC B.

PC B will send an ACK (ACK Number = 1) Right?

 

Lastly, how PC or TCP Driver distinguishes between phantom byte and padding byte, and decides with which ACK number to reply? 

 

1 REPLY 1
Peter Paluch
Hall of Fame Cisco Employee

Hello,

The "phantom byte" in TCP is just an (arguably unfortunate) attempt at explaining why the SeqNo increases even for segments that carry SYN and FIN flags even though their payload is empty. The "phantom byte" is not really present in the TCP segment; it is just a mind experiment trying to give a reason to why segments with SYN and FIN flags have their SeqNo incremented by one as if they carried a payload of one byte.

The truth is that segments with SYN and FIN are themselves acknowledged and retransmitted if unacknowledged. They do not carry any payload, but if they are to be uniquely acknowledged so that their acknowledgement does not mix with any data sent after SYN / before FIN, their sending causes the SeqNo to increase by 1, and this is the "phantom byte".

So, once again - the "phantom byte" (and I personally suggest avoiding using this name) is not something that would be carried inside the TCP segment. It is only a virtual construct explaining why SYN and FIN segments do not carry any payload, yet cause the SeqNo to grow.

Best regards,
Peter