Why is my IPv4 packet size 588 most of the time?

31 views
Skip to first unread message

GBH

unread,
Apr 27, 2023, 10:44:17 AM4/27/23
to ns-3-users
Can anyone give me a clue on why majority of my IPv4 packets are limited to a packet size of 588?

Here are the details:

- 588 is the number returned from item->GetSize(), where item is a QueueDiscItem object
- the IPv4 packets are from BulkSendApplication to PacketSink (I made sure I set the SendSize attribute). See code below:

BulkSendHelper ftpSourceHelper("ns3::TcpSocketFactory",
InetSocketAddress(lanNodesInetInterfaces.GetAddress(i+1), port));
ftpSourceHelper.SetAttribute("MaxBytes", UintegerValue(maxBytes));
ftpSourceHelper.SetAttribute("SendSize", UintegerValue(1400)); // by default, 512
ApplicationContainer ftpSourceApps = ftpSourceHelper.Install(ftpNodes.Get(i));

- I made sure the MTUs from source node to destination node are all set to 1500. I printed them out.

Thanks!

GBH

unread,
Apr 27, 2023, 11:14:20 AM4/27/23
to ns-3-users
I figured it out.

TypeId
TcpSocket::GetTypeId()
{
...
.AddAttribute(
"SegmentSize",
"TCP maximum segment size in bytes (may be adjusted based on MTU discovery)",
UintegerValue(536),
MakeUintegerAccessor(&TcpSocket::GetSegSize, &TcpSocket::SetSegSize),
MakeUintegerChecker<uint32_t>())
...

It is the TCP segment size setting that matters.  536 + 52 = 588.  I guess 52 is the various header sizes.

Reply all
Reply to author
Forward
0 new messages