Static routes

You can override the default MSS value of 1460 bytes by specifying a static route to a specific remote network.

Use the -mtu option of the route command to specify the MTU to that network. In this case, you would specify the actual minimum MTU of the route, rather than calculating an MSS value. For example, the following command sets the default MTU size to 1500 for a route to network 192.3.3 and the default host to get to that gateway is en0host2:
# route add -net 192.1.0 jack -mtu 1500
1500 net 192.3.3: gateway en0host2
The netstat -r command displays the route table and shows that the PMTU size is 1500 bytes. TCP computes the MSS from that MTU size. The following is an example of the netstat -r command:
# netstat -r
Routing tables
Destination      Gateway           Flags   Refs     Use  If   PMTU Exp Groups

Route tree for Protocol Family 2 (Internet):
default          res101141         UGc       0        0  en4     -   -
ausdns01.srv.ibm res101141         UGHW      8       40  en4  1500   -
10.1.14.0        server1           UHSb      0        0  en4     -   -  =>
10.1.14/24       server1           U         5     4043  en4     -   -
server1          loopback          UGHS      0      125  lo0     -   -
10.1.14.255      server1           UHSb      0        0  en4     -   -
127/8            loopback          U         2  1451769  lo0     -   -
192.1.0.0        en0host1          UHSb      0        0  en0     -   -  =>
192.1.0/24       en0host1          U         4       13  en0     -   -
en0host1         loopback          UGHS      0        2  lo0     -   -
192.1.0.255      en0host1          UHSb      0        0  en0     -   -
192.1.1/24       en0host2          UGc       0        0  en0     -   -
en1host1         en0host2          UGHW      1   143474  en0  1500   -
192.3.3/24       en0host2          UGc       0        0  en0  1500   -
192.6.0/24       en0host2          UGc       0        0  en0     -   -

Route tree for Protocol Family 24 (Internet v6):
loopbackv6       loopbackv6        UH        0        0  lo0 16896   -
Note: The netstat -r command does not display the PMTU value. You can view the PMTU value with the pmtu display command. When you add a route for a destination with the route add command and you specify the MTU value, a PMTU entry is created in the PMTU table for that destination.

In a small, stable environment, this method allows precise control of MSS on a network-by-network basis. The disadvantages of this approach are as follows:

  • It does not work with dynamic routing.
  • It becomes impractical when the number of remote networks increases.
  • Static routes must be set at both ends to ensure that both ends negotiate with a larger-than-default MSS.