7. How do I control packet size in TCP
tests?
There are three ways to control packet size
in TCP tests. First, on systems that support it, the MSS option (#9) is
the best way to do this. The next best
option is to force the MTU size as described in #10 and #11. Finally,
the packet size can be controlled by
setting the send_buffer_size to the desired payload size and disabling
Nagle’s algorithm for that pair. Nagle’s
algorithm is enabled by default on all systems to prevent small packets
from flooding the network; by disabling
Nagle you can force small packets to be sent. You may see erratic or
low-performing behavior on some systems
from using this method.
8. What is the TCP MSS?
MSS stands for Maximum Segment Size. The
default MSS is based on the MTU size of the network interface
i.e. MSS = MTU – 40 (20 bytes IP header +
20 bytes TCP header). Some systems, like Linux, allow this to be
adjusted at the socket level. On these
systems, you can insert a ‘Maximum Segment Size’ option at the top of a
Chariot script to control the size of
frames
9. How do I control the MSS from a Chariot
script?
The MSS can be controlled by the endpoint
on a per-connection basis when running on Linux or IBM AIX platforms.
To enable this option, first select
Insert->Maximum segment size option at Endpoint X…
Next, set the MSS to your desired value:
10. How do I change the packet size/MSS/MTU
on a Windows system?
Microsoft Windows does not allow
per-connection modification of the MSS; it can only be modified by
changing the actual MTU size of the
interface. This can be done by modifying the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{xxxx-xxx-xxx-
xxx}\MTU. The best way to find the correct interface key is to look at the IP
address field in each one
Solution
To configure MTU size for Windows, you have to set a registry
variable.
For Windows NT 4.0 or Windows 2000, open the registry (use REGEDT32)
to: HKEY_LOCAL_MACHINE\
SYSTEM\CurrentControlSet\Services\"Adapter Name"\Parameters\Tcpip
Where "Adapter Name" is a hexadecimal string in the format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX that corresponds to the MAC address of the network adapter.
SYSTEM\CurrentControlSet\Services\"Adapter Name"\Parameters\Tcpip
Where "Adapter Name" is a hexadecimal string in the format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX that corresponds to the MAC address of the network adapter.
Create a new variable of type REG_DWORD called MTU and
enter the number of bytes up to the MTU of the underlying network. For example,
Ethernet is usually 1500.
This information was obtained from the Windows NT Resource
Kit, which is shipped as a part of the developer's assistance program.
For Windows 95 and Windows 98, open the Registry (use REGEDIT)
to: HKEY_LOCAL_MACHINE\
System\CurrentControlSet\Services\Class\NetTrans\
System\CurrentControlSet\Services\Class\NetTrans\
Figure out which key is the TCP/IP protocol for your connection by
looking at the other values, then open up that key. The keys in this directory
use 000n as their naming convention, where n is a number from
0 to 9. The TCP/IP key will contain a parameter named DriverDesc set
to "TCP/IP". Inside that 000n key, create a new string variable
called "MaxMTU" and enter your value. 1500 is the default. This
information was obtained fromWindows 95 Networking FAQ maintained
by Richard Graves.
Max frame Size (Bytes)
|
MTU
= Max frame Size – (Preamble + IPG)
|
64
|
46 = 64 -18
|
512
|
494 = 512 - 18
|
1024
|
1006 = 1024 - 18
|
1518
|
1500 = 1518 - 18
|
沒有留言:
張貼留言