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]>> 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