[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] ACK Sizes




Running a simulation, with SACK disabled, all of my ACKs report a 
size of 40 bytes.  This is the tcpip_base_hdr_size_ defined in 
ns-default.tcl.

When SACK is enabled, the size gets increased by sack_index * 8.  If 
there are 3 SACK blocks, the size becomes 64 bytes.

Problem:  TCP headers only have 4 bits for Header Length.  4 bits 
allows a maximum value of 15.  Since the header length is measured in 
words (one word == 4 bytes) the maximum length of a TCP header is 60 
bytes, not 64 bytes.

TCP headers must be at least 20 bytes (mandatory fields).  Another 10 
bytes are added for the timestamps option.  If there are no other 
options, there must be 2 bytes of padding to make the header end on a 
32 bit boundary.  So, that totals up to either 30 or 32 bytes.  Where 
are the other 8 to 10 bytes in the default header size?

If the default header really uses all 40 bytes, then there is only 
room for 2 SACK blocks in the header, not 3.  If the full 40 bytes 
aren't used, then the size should be adjusted.

-- 
Brian Lee Bowers	|	RADIANT Team (Summer Intern)
[email protected]	|	Los Alamos National Laboratory