netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Clash Resolve Counter Increasing
@ 2024-05-21 10:28 Tim Harman
  2024-05-22  9:43 ` Tim Harman
  0 siblings, 1 reply; 2+ messages in thread
From: Tim Harman @ 2024-05-21 10:28 UTC (permalink / raw)
  To: netfilter

Hi,

How can I debug what's causing this ever increasing number of 
clash_resolve counters on my router?

user@host# sudo conntrack -S
cpu=0           found=11145 invalid=48749 insert=0 insert_failed=1691 
drop=1691 early_drop=0 error=1792 search_restart=0 clash_resolve=901502 
chaintoolong=0
cpu=1           found=10492 invalid=48616 insert=0 insert_failed=1748 
drop=1748 early_drop=0 error=1422 search_restart=0 clash_resolve=907423 
chaintoolong=0

This is on a router with a pretty basic NAT setup - NAT anything on the 
LAN (192.168.0.0/16) to a single WAN IP address.  Two Interfaces, eth0 
(WAN) and eth1 (LAN)

The same output a minute later:

tim@ferrari# sudo conntrack -S
cpu=0           found=11150 invalid=48766 insert=0 insert_failed=1691 
drop=1691 early_drop=0 error=1792 search_restart=0 clash_resolve=901897 
chaintoolong=0
cpu=1           found=10497 invalid=48631 insert=0 insert_failed=1748 
drop=1748 early_drop=0 error=1422 search_restart=0 clash_resolve=907859 
chaintoolong=0

So ~300 clash_resolve's a minute.

Kernel 6.6.30

Is there some way I can debug what's triggering the clashes?

Many Thanks,
Tim

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Clash Resolve Counter Increasing
  2024-05-21 10:28 Clash Resolve Counter Increasing Tim Harman
@ 2024-05-22  9:43 ` Tim Harman
  0 siblings, 0 replies; 2+ messages in thread
From: Tim Harman @ 2024-05-22  9:43 UTC (permalink / raw)
  To: netfilter

> The same output a minute later:
> 
> tim@ferrari# sudo conntrack -S
> cpu=0           found=11150 invalid=48766 insert=0 insert_failed=1691 
> drop=1691 early_drop=0 error=1792 search_restart=0 clash_resolve=901897 
> chaintoolong=0
> cpu=1           found=10497 invalid=48631 insert=0 insert_failed=1748 
> drop=1748 early_drop=0 error=1422 search_restart=0 clash_resolve=907859 
> chaintoolong=0
> 
> So ~300 clash_resolve's a minute.
> 

Replying to myself, but documenting it for future reference in case 
anyone else stumbles on this.

My router has a DNS server on it.  Every query from a LAN client to the 
DNS server, even though it's the same subnet, created a conntrack entry. 
  I have a Zabbix server that generates A LOT of DNS queries, it was this 
Zabbix server and its huge amount of DNS queries causing the 
clash_resolve to kick in.

The fix has been to put in a conntrack ignore rule, so that queries to 
the DNS server from the local LAN aren't conntracked (They don't need to 
be).

This has

a) Removed a bunch of DNS conntrack entries I didn't need taking up 
conntrack space
b) Stopped clash_resolve from incrementing at all.

Hope this helps someone in the future.

Tim

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-22  9:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-21 10:28 Clash Resolve Counter Increasing Tim Harman
2024-05-22  9:43 ` Tim Harman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).