Subject: route add -mtu ...
To: None <tech-net@NetBSD.ORG>
From: Jason Thorpe <>
List: tech-net
Date: 08/09/1995 21:03:45
I've run across the need to set the mtu on a route, but I'm having a few 
problems reaching the host when I do so.

First, some background:  Here at NAS we have a long-haul network 
utilizing ATM as it's infrastructure.  However, we've been noticing poor 
performance going across this network, with the transmission host being 
either an SGI Indigo2 with FDDI or a NetBSD/i386 box with ethernet.  
We believe that the performance problems are related to the max segment size 
being enforced on the IP packet.

In tcp_mss() (in tcp_input.c), there is a check against the route's mtu, 
and if it's set, it uses it for maxseg.  If it's not set, maxseg is set 
to the mtu of the interface and then throttled down to TCP_ISS, which is 
defined as 512.  (See the comment in tcp.h regarding this value.)

This, of course, is a Bad Thing.  The mtu along the entire path is large 
enough to accomodate either FDDI's or ethernet's mtus, and we'd like to 
utilize that for a performance win (i.e. eliminate as much IP overhead as 
possible by sending bigger packets).  So, the obvious solution was to set 
a static route the the destination host with the mtu added to the route.  
This is done with:

	route add -mtu <size> <destination> <gateway>

(In my test I used `route add -mtu 1500 bamboo nas-bcn2', as well as 
several smaller values, right down to the value for TCP_MSS.)

However, once the route has been added to the routing table (and checked 
with `netstat -r'), I get the following whenever I ping the host:

Aug  9 20:02:30 antie /netbsd: arpresolve: can't allocate llinfo

However, having done a `ping -f' so I could check the reference count on 
the route, I see this:

Destination      Gateway            Flags     Refs     Use    Mtu  Interface
bamboo.nas.nasa. nas-bcn2.nas.nasa. UGHS        1      199   1500  ed0

(I added the mtu display to netstat...)

So, it looks to me like the kernel is finding the route...

It's interesting to note that setting the mtu on the route _works_ on the 

I'm sure I've missed something ... does anyone have any idea what's going 
on here?

Jason R. Thorpe                             
NASA Ames Research Center                               Home: 408.866.1912
NAS: M/S 258-6                                          Work: 415.604.0935
Moffett Field, CA 94035                                Pager: 415.428.6939