Skip to main content

Flow-ASN

Counts traffic per autonomous system using the source and destination AS numbers that the router puts in each NetFlow/IPFIX record.

PropertyValue
GUID{120A3124-E2BB-47BD-6C64-71BBB861C428}
LayerFlow Record
InputFlows
Key typeAS number (decimal)
ImplementationLua — nf-asn.lua (trisul_probe/sysplugs/flowhandlers); updated by CPINetflowMeter (PINetflowMeter.cpp)
Bucket / Topper60 s / 300 s
Enabled by defaultYes

What it measures​

  • The AS numbers come from the record itself: SRC_AS/DST_AS (fields 16/17) in v9/IPFIX, or the 16-bit src_as/dst_as fields in v5. If the template does not carry these fields, the AS is 0 and traffic lands on key 0. The router exports origin AS or peer AS depending on its configuration.
  • Without HomeASNumbers (default): the probe uses Home Networks. When the source IP is outside, the source AS gets Total and Recv from Upstream AS. When the destination IP is outside, the destination AS gets Total and Transmit to Upstream AS. ASes of home-network endpoints are not counted.
  • With HomeASNumbers set (ISP mode): both the source and destination AS keys are updated. An AS in the home/downstream list, or any private AS 64512–65534, gets the Downstream meters. Any other AS gets the Upstream meters. A record with AS 0 is checked against HomePrefixesFile instead.
  • sFlow does not update this group. MeterASN (default TRUE) turns it on or off. IPDR mode turns it off.

Keys​

The key is the AS number as a decimal string. The group's ResolverCounterGUID is the ASNumber group. That means the UI reads key labels (AS names) from ASNumber's key database, which uses the same decimal keys, so you don't need to name ASNs again here.

KeyMeaning
15169AS15169, label from ASNumber (e.g. GOOGLE)
13335AS13335
64512Private AS 64512, label only if you assign one

Special keys​

KeyMeaning
SYS:GROUP_TOTALSSum of every update made to this group in the interval. In HomeASNumbers mode each record updates two AS keys, so Total here is about 2× the flow traffic.
0The record had no AS fields, or the router exported AS 0 (for example, internal prefixes or no BGP route).

Meter list​

IDNameTypeUnitsTopBottomDescription
0TotalVT_RATE_COUNTERBps100Bytes of every update to this AS (sum of meters 1–4).
1Recv from Upstream ASVT_RATE_COUNTERBps100Bytes where this AS is the source and is not home/downstream.
2Transmit to Upstream ASVT_RATE_COUNTERBps100Bytes where this AS is the destination and is not home/downstream.
3Recv from Downstream ASVT_RATE_COUNTERBps100Bytes where this AS is the source and is in HomeASNumbers. HomeASNumbers mode only.
4Transmit to Downstream ASVT_RATE_COUNTERBps100Bytes where this AS is the destination and is in HomeASNumbers. HomeASNumbers mode only.
5Unused Cardinality counterVT_GAUGEUniques2020Reserved cardinality slot. Not populated.
6Unused Cardinality counterVT_GAUGEUniques2020Reserved cardinality slot. Not populated.