Trisul Filter Format

Several features of trisul require you to be able to construct rules.

Some examples of rules :

  • Traffic between and
  • HTTP traffic to and from China
  • Traffic on IP and between ports 6000-7000
  • Traffic other than port 80 and other than on subnet

Some of the areas in Trisul where you need to specify rules are :

  • Specify rule chains for full content storage policy
  • Create rule based counter groups for business apps
  • Create key set counter groups to map range of keys to an application
  • Flow taggers to mark flows that matched a rule

These rules are specified in Trisul Filter Format, explained below.


The filter format is a single constraint or a chain of constraints connected by an AND or OR logical operator.

A constraint is a mapping of a counter group with keys in that group.

  A single constraint
      {guid}=k1,k2,k3         (match these keys)
      {guid}!k1,k2,k3         (match all except these keys)
      {guid}=k1,k21~k22,k3    (match these keys k1,k21 through k22, k3)

  A chain of constraints 
      constraint1|constraint2 (constraint1 OR constraint 2 must match)
      constraint1&constraint2 (constraint1 AND constraint 2 must match)

A list of GUIDs can be found here

Online rule builder

Trisul has an online rule builder to help you create these rules in an interactive way.


Some examples will help illustrate the concept.

Applications on ports 80, 81, 82, 83


The GUID in the above example represents the applications counter group and the p-0050,.. represent the keys. So in order to effectively construct the constraint you need to know:

  1. The GUID of the counter group (you can cut and paste from Customize > Counters > All Counter Groups > Click on a group)
  2. How keys are constructed in the group (cut and paste from the Key dashboard)

Hosts,, and all hosts between to

We find that the hosts counter group GUID = {4CD742B1-C1CA-4708-BE78-0FCA2EB01A86}
The hosts are keyed by hex digits separated by a period C0.A8.01.01 =

So our expression is

Countries except US,CA

You need the trisul_geo plugin to enable country / asn metering.


Note that the GUID {00990011-44BD-4C55-891A-77823D59161B} represents the Country counter group.

Chaining constraints

The Trisul Filter Format allows you to construct arbitrary chain of constraints.

Building on the above examples, if you want to filter

  • Traffic on ports 80,81,82,83 only on non USA or Canada traffic