# Linux high speed capture support
tpacket-v3: yes
Aug 14 13:03:59 ac86u suricata[6993]: 14/8/2020 -- 13:03:59 - <Warning> - [ERRCODE: SC_ERR_RUNMODE(187)] - Using tpacket_v3 in IPS mode will result in high latency
pcap functionif I understand correctly it is not necessary to add pf_ring.
YAML:# Linux high speed capture support tpacket-v3: yes
When using that I get this on my AC86U:
Code:Aug 14 13:03:59 ac86u suricata[6993]: 14/8/2020 -- 13:03:59 - <Warning> - [ERRCODE: SC_ERR_RUNMODE(187)] - Using tpacket_v3 in IPS mode will result in high latency
Do you get that too?
Yes, for pcap having an optimized libpcap using PF_RING will improve its performance. af-packet with mmap is the same as PF_RING, both have highly optimized ring buffers and very low overhead userspace access, so PF_RING will be redundant for suricata itself, but libpcap functions within suricata may get performance boost from it.pcap function
Is there a way to host your compiled fw fork?Yes, for pcap having an optimized libpcap using PF_RING will improve its performance. af-packet with mmap is the same as PF_RING, both have highly optimized ring buffers and very low overhead userspace access, so PF_RING will be redundant for suricata itself, but libpcap functions within suricata may get performance boost from it.
Is there a way to host your compiled fw fork?
echo 100 > /proc/sys/vm/swappiness
#insmod /opt/lib/modules/wireguard
insmod /lib/modules/4.1.27/kernel/net/wireguard/wireguard
#insmod /opt/lib/modules/sch_cake.ko 2>/dev/null
insmod /lib/modules/4.1.27/kernel/net/sch_cake/sch_cake.ko 2>/dev/null
I have an AX88U and tried your configuration, but after a few minutes Suricata quits with the following error in the syslog:EDIT: changed tpacket-v3 to tpacket-v2 for better latency
Aug 14 10:46:40 kernel: device eth0 left promiscuous mode
Aug 14 10:46:40 kernel: device br0 left promiscuous mode
Smoothly. I'm used to it.I don't want to overshadow Merlin's work here, so this is just a test release with NO support from me and I may not publish anything further. This was mainly for myself as I like to run my own forks on many open source projects I use myself.
As far as I know, this is not a mistake. Working properly for Suricata.Aug 14 10:46:40 kernel: device eth0 left promiscuous mode Aug 14 10:46:40 kernel: device br0 left promiscuous mode
It seems to be stable with tpacket-v2 instead of tpacket-v3.As far as I know, this is not a mistake. Working properly for Suricata.
I think @RMerlin supports it as best he can for the time being: until Asus includes it in their work/version, this is the best option for those of us who wish to use it.i'm wondering what's the likelihood of merlin's FW including the cakeqos module at some point... sounds like for proper support it would be a requirement?
This is off-topic for this thread, but as you have a higher connection speed than I, I'm curious about your cake-qos settings.I finally got Suricata to operate in IDS/IPS on af-packet mode (which is the ONLY mode available for our Entware build, I was trying to get a PF_RING build but was having some issues with libraries and other Entware dependencies). Below is the relevant yaml code from my own config. mmap (memory mapped ring buffers) must be enabled for IPS to work, without it, it's only running in IDS mode. I'm running this on my AC86U (with suricata, I kinda wish I have the newer AX88U not for its wifi but for its quad core CPU and 1 GB of real RAM). The configuration is a good compromise for my own build, the average load on my router is around 3.50 so your router will be hotter with it. Download speed is close to my native ISP speed (which is around 200 Mbps), upload speed is somewhat limited around 160 Mbps which is far below my normal ISP speed of 225 Mbps (this is due to AC86U's CPU capability). I'm running CakeQoS as well (I don't like the proprietary closed sourced solutions from TrendMicro as it causes some random kernel panics on my own fork with their modules which I can't fix, I much prefer the GPL alternative which is Suricata+CakeQoS). You will experience around 2.1% packet drops (again this is due to dual core and limited real RAM of AC86U). I can live with this small amount of packet drops as I didn't experience any real usage issues with such packet loss.
Thanks to all those who contributed so far, it took me a while to read through tons of source code from Suricata and their piss poor documentations/examples to finally crack this.
YAML:# Linux high speed capture support af-packet: - interface: eth0 ## set your wan interface copy-mode: ips copy-iface: br0 buffer-size: 3072 cluster-id: 99 cluster-type: cluster_flow use-mmap: yes # mmap-locked: yes tpacket-v2: yes ring-size: 3072 - interface: br0 copy-mode: ips copy-iface: eth0 buffer-size: 3072 cluster-id: 98 cluster-type: cluster_flow use-mmap: yes # mmap-locked: yes tpacket-v2: yes ring-size: 3072
EDIT: changed tpacket-v3 to tpacket-v2 for better latency
Actually I just used "best effort" and adjusted the initial bandwidth of my up/down speeds based on my average speedtest speeds. So far default setting is serving me well as my family were doing tons of streaming (youtube, disney+) while I was using video conferencing apps for work. So far I haven't experienced any issues where I needed to tweak cake setting at all.. I'm super happy with the default setting of "best effort". I love cake, just set and forget.. now with Suricata, this is match made in heaven as I now have a complete GPL (open source) software solutions to serve all my needs (I'm willing to give up some bandwidth for IPS/IDS as this will protect my entire family's internet experience).This is off-topic for this thread, but as you have a higher connection speed than I, I'm curious about your cake-qos settings.
Have you, for instance, adjusted your rtt to more closely reflect avg pings recorded by @Jack Yaz 's connmon? I've found that by stepping back from the default (100ms) to regional (30ms) when my avg ping is 7-8ms has smoothed something out on my 50/10 connection and my network feels much more responsive. my "quality" graph is flatlined at 100% indicating zero packet loss, and my speeds are averaging within 1-2% of what I pay for from my ISP. (I don't want to take this down to metro rtt 10ms, because when my ISP rotates my WAN IP, I can end up with 28ms pings, and I don't know what that would do to my connection/network)
complete GPL (open source) software solutions. Just set and forget. That's what I always mention.I love cake, just set and forget.. now with Suricata, this is match made in heaven as I now have a complete GPL (open source) software solutions to serve all my needs (I'm willing to give up some bandwidth for IPS/IDS as this will protect my entire family's internet experience).
it would require a fork for it to be built-in.
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!