# How to accelerate Bro with PF_RING FT | ntop

[Blog](https://www.ntop.org/blog/)[PF\_RING](https://www.ntop.org/category/pf_ring/)

# How to accelerate Bro with PF\_RING FT

July 29, 20183 min read

We discussed many times about the large quantity of work IDSs have to carry on, and the high CPU load they require, this is the case of Suricata due to the thousands of rules that need to be evaluated for every single packet, but this is also the case of the [Bro Network Security Monitor](https://www.bro.org).  
In a previous post we’ve seen [How to accelerate Suricata with PF\_RING FT](https://www.ntop.org/how-to-accelerate-suricata-bro-snort-with-pf_ring-ft/) in a few steps. In that guide we leveraged on the flow classification and L7 protocol detection provided by [PF\_RING FT](https://www.ntop.org/products/packet-capture/pf_ring-ft/), to filter and shunt meaningless traffic, reducing this way most of the (unneeded) load on the IDS.  
In fact, as we’ve already seen, most of the Internet traffic is multimedia traffic (or encrypted traffic) that the IDS does not care about, and this traffic mainly consists of [elephant flows](https://en.wikipedia.org/wiki/Elephant_flow).

[![](/images/2018/06/pf_ring-ft-ids-ips.webp)](https://www.ntop.org/images/2018/06/pf_ring-ft-ids-ips.webp)

In this post we will see how to enable PF\_RING FT to accelerate Bro, with no change or recompilation to the application (PF\_RING FT is already part of PF\_RING, if you are using PF\_RING or Libpcap-over-PF\_RING as capture library you are ready to go).

## **Running FT with Bro**

First of all we need to compile Bro on top of PF\_RING. PF\_RING should be installed first:

cd ~
git clone https://github.com/ntop/PF\_RING.git
cd ~/PF\_RING/kernel
make && sudo make install
cd ~/PF\_RING/userland/lib
./configure && make && sudo make install

Then we can compile Bro linking it to the PF\_RING-aware libpcap:

cd ~
wget `https://www.bro.org/downloads/release/bro-X.X.X.tar.gz`
tar xvzf bro-X.X.X.tar.gz
cd bro-X.X.X
./configure --with-pcap=/usr/local/lib
make && make install

We can make sure that Bro is linked to the PF\_RING-aware libpcap with the command below:

ldd /usr/local/bro/bin/bro | grep pcap
        libpcap.so.1 => /usr/local/lib/libpcap.so.1 (0x00007fa371e33000)

At this point we can set pf\_ring as capture method and the interface that we want to use in /usr/local/bro/etc/node.cfg. We can also set the number of threads and the cpu affinity in the same file. In this example we will use a basic configuration with just one thread, please read the [PF\_RING documentation](https://www.ntop.org/guides/pf_ring/) for more details about the [Bro configuration](https://www.ntop.org/guides/pf_ring/thirdparty/bro.html) and loading PF\_RING and ZC drivers for maximum capture performance.

\[worker-1\]
type=worker
host=localhost
interface=eth1
lb\_method=pf\_ring
lb\_procs=1
pin\_cpus=2

As we said PF\_RING FT is already part of PF\_RING, however in order to be able to detect and filter L7 protocols, we need to install nDPI:

cd ~
git clone https://github.com/ntop/nDPI.git
./autogen.sh
make && make install

In order to filter or shunt out multimedia or other meaningless traffic, we just need to create a simple configuration file with the list of application/protocol names: PF\_RING FT is based on the [nDPI](https://www.ntop.org/products/deep-packet-inspection/ndpi/) Deep Packet Inspection library for protocols detection, you can specify all the protocols detected by nDPI.

In the example below, we are listing a few L7 protocols that we want to discard, and we are telling the FT library that we want to shunt SSL, specifying the number of packets to forward for each session before discarding them:

cat /etc/pf\_ring/ids-rules.conf
\[filter\]
YouTube = discard
Netflix = discard
Spotify = discard

\[shunt\]
SSL = 10

In order to enable L7 filtering all we need to do is setting the *PF\_RING\_FT\_CONF* environment variable with the path of the configuration file with the filtering rules. This can be done in Bro using the env\_vars setting in /usr/local/bro/etc/node.cfg.

\[worker-1\]
type=worker
host=localhost
interface=eth1
lb\_method=pf\_ring
lb\_procs=1
pin\_cpus=2
env\_vars=PF\_RING\_FT\_CONF=/etc/pf\_ring/ft-rules.conf

At this point we are able to run Bro.

/usr/local/bro/bin/broctl
\[BroControl\] > start

## Validation

For validating this work we used a huge PCAP file with mixed internet traffic, and we replayed the PCAP file using [disk2n](https://www.ntop.org/products/traffic-recording/disk2n/) at 4 Gigabit / ~500 Kpps. We have created a simple Bro configuration, with a single worker in order to check the limit of a single processing unit, using [PF\_RING ZC drivers](https://www.ntop.org/products/packet-capture/pf_ring-zc/) for reducing the packet capture overhead and remove any noise. We ran a few tests with and without PF\_RING FT filtering out all multimedia/meaningless data (NetFlix, Youtube, Spotify, Google, Facebook, SSL) and we compared the results.

Without PF\_RING FT Bro dropped 3.1 Mpkts out of 7.1 Mpkts transmitted, **44%** of packet loss. After enabling PF\_RING FT, Bro was able to process the same traffic dropping just 0.8 Mpkts, **12%** of packet loss, out of 7.1 Mpkts transmitted, as a huge amount of data has been filtered out by FT. After the [amazing results with Suricata](https://www.ntop.org/implementing-pf_ring-based-hardware-flow-offload-in-suricata/), we’ve seen that PF\_RING FT can be used to provide a huge performance improvement also with Bro, and all this with minimal effort.

Have fun!

## Keep reading

centoJan 25, 2026

### [nProbe Cento at Scale: Flow Offload Acceleration on Napatech](https://www.ntop.org/nprobe-cento-at-scale-flow-offload-acceleration-on-napatech/)

High-speed networks continue to push the limits of software-based monitoring and security applications. As link speeds grow and traffic patterns become more complex, efficiently analyzing packets while maintaining per-flow state, for updating…

AnnounceApr 28, 2025

### [Released PF\_RING 9.0.0: Fully Fledged Hardware Flow Tracking](https://www.ntop.org/released-pf_ring-9-0-0-fully-fledged-hardware-flow-tracking/)

This is to announce a new PF\_RING release 9.0.0! This release brings significant improvements for a deeper flow tracking integrations, making PF\_RING even more powerful for building high-performance flow processing networking applications…

PF\_RINGAug 6, 2024

### [Released PF\_RING 8.8.0: Flow Table Offload and nVidia BlueField Support](https://www.ntop.org/released-pf_ring-8-8-flow-table-offload-and-nvidia-bluefield-support/)

This is to announce a new PF\_RING release 8.8.0! This release adds generic support for flow table offload, which is currently supported on Napatech adapters with Flow Manager enabled. This new technology…

## Try it on your own network

Download the free Community edition and see your first flows in five minutes.

[Download ntopng free](https://www.ntop.org/support/documentation/software-installation/)[Talk to an engineer](https://www.ntop.org/support/need-help/contacts/)
Source: https://www.ntop.org/how-to-accelerate-bro-with-pf_ring-ft/