Subnetting and the subnetsarelocal option of the no command

You can use the subnetsarelocal option of the no command to control when TCP considers a remote endpoint to be local (on the same network) or remote.

Several physical networks can be made to share the same network number by subnetting. The subnetsarelocal option specifies, on a system-wide basis, whether subnets are to be considered local or remote networks. With the no -o subnetsarelocal=1 command, which is the default, Host A on subnet 1 considers Host B on subnet 2 to be on the same physical network.

The consequence is that when Host A and Host B establish a connection, they negotiate the MSS assuming they are on the same network. Each host advertises an MSS based on the MTU of its network interface, usually leading to an optimal MSS being chosen.

The advantages to this approach are as follows:

  • It does not require any static bindings; MSS is automatically negotiated.
  • It does not disable or override the TCP MSS negotiation, so that small differences in the MTU between adjacent subnets can be handled appropriately.

The disadvantages to this approach are as follows:

  • Potential IP router fragmentation when two high-MTU networks are linked through a lower-MTU network. The following figure illustrates this problem.
    Figure 1. Inter-Subnet Fragmentation. This illustration show a data path from Host A, through an FDDI with an MTU=4352, through Router 1, to the Ethernet with an MTU=1500. From there it goes to Router 2 and another FDDI with an MTU=4352 and out to Host B. An explanation of how fragmentation occurs in this example is described in the text immediately following the illustration.
    Inter-Subnet Fragmentation
  • In this scenario, Hosts A and B would establish a connection based on a common MTU of 4352. A packet going from A to B would be fragmented by Router 1 and defragmented by Router 2. The reverse would occur going from B to A.
  • Source and destination must both consider subnets to be local.
Note: If the tcp_pmtu_discover value is 1, the MSS value is calculated based on the outgoing interface MTU. The subnetsarelocal value is only taken into consideration if the tcp_pmtu_discover network option value is 0.