[Snort-users] OS options to monitor traffic over a 1GiB and 10 GiB
vineyard at ...15653...
Fri Jun 29 10:41:16 EDT 2012
On 6/29/2012 9:23 AM, Joel Esler wrote:
> Probably BSD. But I think it's less dependent on the OS, and is more dependent on hardware. When you are talking about 10 Gig, there's lots of factors that come into play.
Some hardware options I'd recommend, in decreasing order of cost:
To monitor that much traffic reliably, you're going to have to employ a load-balancing technique. The best way I've found to go about doing that is to use something that can perform a hash function on the 5-tuple of any given flow. The 5-tuple is composed of the source and destination IP addresses, ports, and protocol. Hashing in this manner ensures that traffic is distributed roughly evenly, and that bidirectional conversations are preserved and sent to the same sensor engine.
The more expensive products in my list above can do this in hardware, often using FPGA tricks and DMA buffering to dramatically accelerate the process. When you're trying to monitor a fully-saturated link, every CPU cycle counts.
The less expensive products (typically from Intel or Myricom) can do some of it in hardware, but they really shine when you pair them with capture-optimized drivers like PF_RING DNA (http://www.ntop.org/products/pf_ring/dna/) or Myricom Sniffer10G (http://www.myricom.com/support/downloads/sniffer.html).
In any case you'll want a big server with lots of CPU cores and as much RAM as you can afford. If you'll be logging payloads and/or expect heavy alert volumes, you'll also need fast disk, like SSD or a hardware RAID10 array. The idea is to run multiple sensor engines (Snort, for example) and bind each one to one of the load-balanced virtual network interfaces presented by the setup I just described. If your traffic is fairly predictable or you have plenty of headroom on your sensor box, you can use CPU affinity to peg those engines to individual cores (there are ways to do this for the firehose of interrupts coming from the NIC too) to avoid spurious context-switching and buy yourself a few more precious CPU cycles. You'll want to run one sensor process per core.
On the other hand, if your traffic is bursty and unpredictable, you may want to forgo the CPU affinity and let the kernel scheduler do its job. For cases like that, I prefer to run two sensor processes per core (doubling the number of required virtual interfaces on your packet-capture NIC). That way, the chunks are smaller and if one needs to burst up to consume a full CPU core, the kernel scheduler will happily relocate the lesser-utilized processes to other cores.
Happy sniffing! :-)
-- Robert Vineyard
More information about the Snort-users