Solved: [24.7.4] Some UDP traffic causes packet loss

Started by hifol792, September 23, 2024, 01:55:03 PM

Previous topic - Next topic
September 23, 2024, 01:55:03 PM Last Edit: September 28, 2024, 12:31:11 AM by hifol792
Hello everyone

This mostly comes from 'mtr --udp 8.8.8.8' (the same situation happens when downloading torrents). After the launch, 10 seconds pass and all devices on the network cannot reach via UDP (for example, dns requests) or if ping is started over again. TCP continues to work.

If the ping was started before, then there is no packet loss.

I also ran mtr (with the udp flag) directly on the router and this does not happen

OPNsense 24.7.4_1-amd64

Try a tcpdump on your WAN interface and see if there is any traffic that should occur, like RFC1918 IPs leaking out because of NAT misconfiguration. There is also an obscure bug with the traffic shaper - if you use that, disable it.
Intel N100, 4 x I226-V, 16 GByte, 256 GByte NVME, ZTE F6005

1100 down / 800 up, Bufferbloat A+

Hello, thanks for the reply.

I did the checks and couldn't find the IP leak. I also disabled traffic shaper, but it didn't help

I checked again that the problem is not with my provider. The problem is reproduced only with the router


root@opnsense:/tmp # cat dump | wc -l
    7317
root@opnsense:/tmp # cat dump | grep "MY PPPOEE IP" | wc -l
    7317

If it is only UDP traffic that is causing this, it could be a wrong MTU setting.
Intel N100, 4 x I226-V, 16 GByte, 256 GByte NVME, ZTE F6005

1100 down / 800 up, Bufferbloat A+

I checked the MTU via ping with don't fragment. The same value as was set before (1492) is suitable. I also tried to lower it, it didn't help.

Maybe it has something to do with the firewall? At the time of the test, if I run and do not disable ping, then there is no packet loss in it and it works fine. But at the same time, if I launch a new ping, it doesn't work.

Also, during the test, it affects other devices on the network

I genuinely have no idea.
Intel N100, 4 x I226-V, 16 GByte, 256 GByte NVME, ZTE F6005

1100 down / 800 up, Bufferbloat A+

What is your OPNsense uptime?
Did you try to reboot after disabling the shaper and retest?

Regards,
S.
Networking is love. You may hate it, but in the end, you always come back to it.

OPNSense HW
APU2D2 - deceased
N5105 - i226-V | Patriot 2x8G 3200 DDR4 | L 790 512G - VM HA(SOON)
N100   - i226-V | Crucial 16G  4800 DDR5 | S 980 500G - PROD

September 25, 2024, 12:21:13 PM #7 Last Edit: September 25, 2024, 12:31:14 PM by hifol792
Hello.

I've rebooted it many times. By the way, I tried restarting the router right now. Nothing has changed.

I also deleted almost all custom tunables (also with restart). Now I have only these:

hw.ibrs_disable = 1
net.inet.rss.bits = 2
net.inet.rss.enabled = 1
net.isr.bindthreads = 1
net.isr.dispatch = deferred
net.isr.maxthreads = -1
vm.pmap.pti = 0

Also tried to switch NAT without manual rules, it also did not give anything.

UPD: Traffic shaper was disabled a few days ago. It also didn't help solve the problem.

September 25, 2024, 02:51:21 PM #8 Last Edit: September 25, 2024, 02:53:14 PM by iMx
I'd be disabling RSS and re-testing :)

... i.e defaults, for everything, no custom stuff at all. Re-test.

Don't disable RSS.

This is something that Crowdsec might be responsible for...is it running ?

Hello. Thanks for trying to help

I have just done the following:
- Disabled all LAN rules, leaving only one that allows all traffic (I don't have rules on the WAN)
- Turned off hardware acceleration
- Turned off all gateways leaving only pppoe
- Removed all non-standard tunables
- Switched NAT to automatic

In each step, I restarted the router and checked how it behaves with mtr --udp.

None of this helped


OK, no crowdsec.

What else is running there, what is your setup ? You're triggering something with mtr, the question is what exactly.

Quote from: newsense on September 25, 2024, 03:28:58 PM
Don't disable RSS.

This is something that Crowdsec might be responsible for...is it running ?

This makes zero sense.

The default install, is with RSS disabled.  If you have problems, the absolute first thing anyone should do, is go back to stock/default.

Here is a video with the problem: https://www.youtube.com/watch?v=17CJXPKaLWo

> What else is running there
I had Wireguard running. During the test below, I disabled it.
I attached a screenshot
I don't use anything custom anymore.

> what is your setup ?
What do you mean by that?