Skip to main content

BGP-Peer AS

NetFlow traffic keyed by the peer AS (the first AS in the BGP AS path), that is, the neighbor AS your router hands the traffic to or receives it from.

PropertyValue
GUID{A643654F-2BA3-4832-4FF1-43EBDDE6E655}
LayerFlow Record
InputFlows
Key typeAS number (decimal string)
ImplementationLua — geo-peeras.lua (trisul_geo/src/geometer) defines the group; Native C++ — CPICGASPath (trisul_geo/src/geometer/PICGASPath.cpp) updates it
Bucket / Topper60 s / 300 s
Enabled by defaultNo. Set MeterASPATH to TRUE in Geo.xml and provide a BGP RIB.

What it measures​

The four BGP groups (BGP-ASPATH, BGP-Origin AS, BGP-Peer AS, BGP-Prefix External) are updated together by CPICGASPath for each NetFlow/IPFIX record:

  • Prerequisites. Set MeterASPATH to TRUE in Geo.xml (default FALSE). Trisul needs a BGP RIB per router: <router-ip>_routes.db.sqlite3 in BGPRibsPath (Geo.xml ships /usr/local/var/ramdisk). See Configuring BGP.
  • RIB selection. The plugin picks the RIB whose file name matches the NetFlow exporter (router) address in the flow. If there is none and EnableDownstreamRIBPush is TRUE, it uses the downstream RIB 0.0.0.0_routes.db.sqlite3 downloaded by the Geo feed. Otherwise the flow is skipped.
  • Lookup. Both IPv4 endpoints are looked up (longest prefix match). There is no Home Network check: an endpoint is counted only if its address is in the RIB. Endpoints not in the RIB, such as your own addresses when the RIB holds only upstream routes, add nothing. There is no "unknown" key.
  • Direction. Upload = bytes sent toward the matched prefix. Download = bytes received from it. A flow whose two endpoints both match updates two keys in each group.
  • Packets are not counted. IPv6 is not supported.

Keys​

One key is the first ASN in the AS_PATH of the matched RIB entry, as a decimal string. Key labels come from the ASNumber group: the Lua definition sets resolver_guid to the ASNumber GUID {03E016FC-46AA-4340-90FC-0E278B93C677}.

KeyMeaning
6939Hurricane Electric as next-hop AS
293First hop in path 293 6939 6830 33915
15169Directly peered origin (peer AS = origin AS)

Special keys​

KeyMeaning
SYS:GROUP_TOTALSSum of every update made to this group in the interval. A flow with both endpoints in the RIB updates two peer keys.

Meter list​

IDNameTypeUnitsTopBottomDescription
0Upload to ASVT_RATE_COUNTERBps10010Flow bytes sent toward prefixes whose path starts with this AS.
1Download from ASVT_RATE_COUNTERBps10010Flow bytes received from prefixes whose path starts with this AS.
2Unused Cardinality counterVT_GAUGEUniques2020Reserved cardinality slot. Not populated.
3Unused Cardinality counterVT_GAUGEUniques2020Reserved cardinality slot. Not populated.