Mubashir Rehmani wrote: > Hello > > I hope that you are fine. I think that the TCP Header length will > remain same: For instance if you are sending FTP Data = 300 then > > Total size = FTP Data + TCP Header > > > FTP Data = 200 > TCP Header = 1024 > Total size = 200 + 1024 > > FTP Data = 300 > TCP Header = 1024 > Total size = 300 + 1024 > > Hope i am right? > > Regards > > 2008/9/25 Mayur <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> > > > Tatiana Polishchuk wrote: > > Did you try to change the header size? Pls refer to the chapter > 12.1.2 > > of the ns2 tutorial. > > Tatiana > > > > On Thu, Sep 25, 2008 at 9:03 AM, Mayur <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote: > > > > > > Dear all, > > > > I am using simple FTP over TCP. In ns, from the application > layer > > (ftp) > > Though I send small packets, (eg. 100 bytes using '$ftp_($i) > send 100' > > ), TCP's packet size remains fixed equal to 1000. What is > the reason? > > How to change it. > > > > I tried to study the tcp.cc's send and sendmsg() function, but > > could not > > understand it well. > > > > Your cooperation is appreciated. > > > > regards, > > Mayur > > > > > Thank you Tatiana, for your quick response! > > I went through 12.1.2 of the ns Manual as you suggested. > > I know that each layer will add a header to the SDU (Service Data > Unit) > received from its upper layer. And so, there is no point in > reducing the > header size. My point is different. Consider following explanation. > > at Application layer the data from FTP is > ------------------------------- > | FTP data | > ------------------------------- > Now when this is handed over to the TCP layer, it will add its > header to > it. And it will become following to be handed over to IP layer and > so on... > ---------------------------------------------------------- > | TCP Header | FTP Data | > ---------------------------------------------------------- > That's fine. So, the total size, at the TCP layer should be = > FTPDataSize + TCPHeaderSize. > > *Now, the problem I face is: *The TCP packet size is always remaining > same (1040 bytes), irrespective of the FTPDataSize, which I expect to > vary with it. eg. for FTPData of 200 bytes it should become > (200+TCPHeaderSize) bytes. I think theoretically I am correct, and > something I miss to set in the ns2. The expert users' suggestions are > awaited. > > I hope my question is now clear.... > > > regards, > Mayur > > > > > -- > Mubashir Husain Rehmani > > Mobile : 00 33 (0)6 32 00 89 35 > Thanks Mubashir,/
Is TCP Header that much (1024 bytes) long???/ Even if it is so, it is not doing what we expect...Consider following observations: In the CMU-TRACE, I observe that the packet size when it leaves the TCP layer and received by IP layer (ie. the " AGT sent" lines in the cmu-trace) is always fixed to 1040 bytes. Similarly, those "RTR sent" lines are always 1060 bytes. That shows that the routing (IP) layer has added 20 bytes (which is standard IP header size). And lastly the "MAC sent" lines show 1112 bytes (with MAC added 52 bytes) of the packet size for the same packet travelled from AGT to this MAC layer. Now, these all figures (1040, 1060 and 1112 bytes remains rock-solid-fixed. They don't vary with the FTP data size. However, they do change when we change the TCP packetSize_ directly. eg. when I do '*$tcp1 set packetSize_ 200*' the above figures change to 240, 260 and 312 bytes respectively. So, *in nut-shell the TCP packet size vary with directly setting the packetSize_ variable and not in accordance with the upper layer's data unit. So, I think theoretically, it is incorrect*. Or I miss something.