FreeBSD TCP Behavior with Linux NAT

Pieter de Boer pieter at os3.nl
Fri Nov 12 13:39:26 UTC 2010


Hi Christopher,

<snip>
> Before the reboot two Linux clients were mounting the FreeBSD server.  They
> were both using port 903 locally.  On the head node clientA:903 was remapped
> to headnode:903 and clientB:903 was remapped to headnode:601.  There is no
> activity when the reboot occurs.  The head node takes a few minutes to come
> back up (we kept it down for several minutes).
>
> When it comes back up clientA and clientB try to reconnect to the FreeBSD
> NFS server.  They both use the same source port, but since the head node's
> conntrack table is cleared it's a race to see who gets what port and this
> time clientA:903 appears as headnode:601 and clientB:903 appears as
> headnode:903 (>>>  they essentially switch places as far as the FreeBSD
> server would see<<<  ).

So what you are saying is that the Linux NAT box reuses the same 
source_ip:source_port / destination_ip:destination_port tuple for a new 
connection to the FreeBSD NFS server after the Linux box has rebooted. 
This quickly enough that the connection on the FreeBSD NFS server has 
not timed out yet?

Isn't there a rule in TCP you shouldn't be reusing port numbers within 
the MSL (or 2*MSL?) period?

-- 
Pieter


More information about the freebsd-net mailing list