Set Maximum Segment Size (MSS) in Redhat Linux for Networks & Hosts

Maximum Segment Size (MSS) value advertised by a Server or a System is the preffered size of the segment that it can receive. For an standard packet this is equivalent to the Maximum Transmission unit (MTU) – 40bytes (standard TCP/IP overhead of 40 bytes [20+20]). This is the value that the server advertises and not what we can transmit.

If the MTU is 1500 bytes then the MSS will be 1460 bytes.

In Redhat Linux, if not set manually, the Kernel calculates the MSS simply as MTU-MSS bytes. However, this advertised value of MSS can be manually set for individual networks or hosts by setting them in route commands

To set the MSS Value for a network

ip route add 192.168.1.0/24 dev eth0 advmss 1310

where the "ip route" command sets the static route for the network via ethernet 0 and the part "advmss" sets the MSS value of 1310 bytes.

To set the MSS Value for a Host

ip route add 192.168.1.1 dev eth0 advmss 1310

The above commands set the MSS values at a network / host basis dynamically when the server in use.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *