Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 May 2016 17:31:24 +0300
From:      Vladimir Zakharov <zakharov.vv@gmail.com>
To:        Jan Bramkamp <crest@rlwinm.de>
Cc:        freebsd-current@freebsd.org
Subject:   Re: CURRENT: ipfw: problems with timeouts and worse network performance
Message-ID:  <20160520143124.GE2371@vzakharov>
In-Reply-To: <0429473a-6bb6-70cb-05ca-fe0e83c173a0@rlwinm.de>
References:  <20160520140152.3ab6fe44@hermann> <20160520125401.GC2371@vzakharov> <38888426-4d91-56ed-9ab3-0d516b0b8d46@rlwinm.de> <20160520135109.GD2371@vzakharov> <0429473a-6bb6-70cb-05ca-fe0e83c173a0@rlwinm.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 20, 2016, Jan Bramkamp wrote:
> On 20/05/16 15:51, Vladimir Zakharov wrote:
> > On Fri, May 20, 2016, Jan Bramkamp wrote:
> >> On 20/05/16 14:54, Vladimir Zakharov wrote:
> >>> Hello
> >>>
> >>> On Fri, May 20, 2016, O. Hartmann wrote:
> >>>> I reported earlier about broken pipes in ssh sessions to remote hosts,
> >>>> which occur on an erratic basis. i'm investigating this problem now and
> >>>> it seems that it is also ipfw-related, but I'm not sure. This problem
> >>>> is present since a couple of weeks now.
> >>>
> >>> Maybe this could help...
> >>>
> >>> I've also experienced problems with broken pipes in ssh sessions some
> >>> time ago. Setting in sysctl.conf
> >>>
> >>> net.inet.ip.fw.dyn_ack_lifetime=3600
> >>>
> >>> fixed problem for me. I didn't experiment with the value though. So,
> >>> possibly, changing default value (300s) to 1 hour is overkill :).
> >>
> >> By default the OpenSSH SSH client is configured to use TCP keepalives.
> >> Those should produce enough packets at a short enough interval to keep
> >> the dynamic IPFW state established.
> >>
> >> Does your traffic pass through libalias?
> > I guess not. How can I be sure?
> 
> Libalias is used by ipfw and the old userland natd to implement IPv4 
> NAT. It requires unmodified access to all packets including their 
> headers. LRO and TSO coalesce packets to reduce save CPU time but the 
> process is loses some of the information required by libalias. Unless 
> your ruleset uses ipfw in-kernel NAT or diverts traffic to natd you 
> don't have to worry about libalias.
> 
> Use `kldstat -v | grep libalias` to check for libalias in the running 
> kernel and `pgrep natd` to search for running natd instances.

Surely, I do not use NAT (and libalias):

root@vzakharov:~ # kldstat -v | grep libalias
root@vzakharov:~ # pgrep natd

I use GENERIC-NODEBUG kernel (r300138) with ipfw module. And
'workstation' firewall type.

-- 
Regards,                 | "In theory there is no difference between theory
  Vladimir Zakharov      | and practice. In practice there is."- Yogi Berra



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160520143124.GE2371>