pmacct - ENOG

19
ENOG 17 – Nov 2020 Introduction to pmacct Paolo Lucente pmacct

Transcript of pmacct - ENOG

Page 1: pmacct - ENOG

ENOG 17 – Nov 2020

Introduction to pmacct

Paolo Lucentepmacct

Page 2: pmacct - ENOG

whoami

Paolo Lucentepaololucenteplucente@Paolo_Lucente

Digging data out of networks worldwide for fun and profit for more than 15 years

Page 3: pmacct - ENOG

libpcap

pmacct is open-source, free, GPL’ed software

sFlow

BGP

maps

IGP

MySQLPgSQLSQLite

MongoDBBerkeleyDB

flat-files

RabbitMQKafka

memory tables

sFlow

tee

NetFlowIPFIX

NetFlowIPFIX

http://www.pmacct.net/

StreamingTelemetry

BMPGeoIP

Page 4: pmacct - ENOG

pmacct: a few simple use-cases

BMP

flat-files

tee

NetFlowIPFIX

sFlow

Kafka

IPFIXlibpcap

Page 5: pmacct - ENOG

pmacct: a slightly more complex use-case

BGP

flat-files

tee

NetFlowIPFIX

Kafka

MySQL

aggregation method #1

aggregation method #2

BGP dump at regular time intervals

nfacctd

Page 6: pmacct - ENOG

The use-case for message brokers

Page 7: pmacct - ENOG

Sample pipeline for Network Analytics

Forwarding Plane

Control Plane

Topology

Data Collection

Network

Big Data & Analytics

BMP IPFIX

In Situ OAM

sFlow

Netstream

Netflow

gRPC

gNMI

OpenConfigYANG

Network Device Human / Machine

Collector Analytics

Message Broker Data Storage

Data Processing Message Broker

Credits to: T. Graf (Swisscom) @ UBBF 2018

Page 8: pmacct - ENOG

Use cases by industry

Page 9: pmacct - ENOG

Key pmacct non-technical facts

§ 15+ years old project§ Can’t spell the name after the second drink§ Free, open-source, independent§ Under active development§ Innovation being introduced§ Well deployed around, also large SPs§ SP culture and needs part of its DNA

Page 10: pmacct - ENOG

Some technical facts (1/2)

§ Pluggable architecture:• Can easily add support for new data sources and backends

§ Correlation of data sources:• Natively supported data sources (ie. Flows, BGP, BMP,

IGP, Streaming Telemetry)• External data sources via tags and labels

§ Pervasive data-reduction techniques, ie.:• Data aggregation• Filtering• Sampling

Page 11: pmacct - ENOG

Some technical facts (2/2)

§ Build multiple views out of the very same collected network traffic dataset , ie.:• Unaggregated to flat-files for security and forensics; or to

message brokers (RabbitMQ, Kafka) for Big Data• Aggregated as [ <ingress router>, <ingress interface>, <BGP

next-hop>, <peer destination ASN> ] and sent to a SQL DB to build an internal traffic matrix for capacity planning purposes

§ Enable analytics against the collected data sources (ie. BGP, BMP, Streaming Telemetry):• Stream real-time• Dump at regular time intervals (possible state compression)

Page 12: pmacct - ENOG

Ready to scale horizontally

§ Within a single system:• SO_REUSEPORT

§ Among multiple systems:• ‘Tee’ (UDP replication) plugin

oReceivers can be added/changed/removed on the flyo Load-balenced tee’ing (hashed or round-robin)o Selective tee’ing (based on telemetry exporter)

• BGP x-connects (TCP proxying)

Page 13: pmacct - ENOG

It all started like this ..(easy peasy lemon squeezy)

Collector(pmacct)

Telemetry(ie. NetFlow, sFlow)

Backend(ie. Kafka, flat-files)

Page 14: pmacct - ENOG

Adding events, integrating routing information(processing increases and needs tight integration)

Collector(pmacct)

Telemetry(ie. NetFlow, IPFIX,

sFlow)

Backend(ie. Kafka, flat-files)

BGP

Event logs(ie. NetFlow NEL)

Page 15: pmacct - ENOG

Clustering the collector(Nice idea, but not easy to provision ..)

Collector 1(pmacct)

Backend(ie. Kafka, flat-files)Collector 2

(pmacct)

Telemetry(ie. NetFlow, IPFIX,

sFlow)

BGP

Event logs(ie. NetFlow NEL)

Collector N(pmacct)

Page 16: pmacct - ENOG

Clustering the collector(Cluster internals segregated not exposed to the network)

Backend(ie. Kafka, flat-files)

BGPx-connect(Ha’d, anycasted

pmacct)Telemetry(ie. NetFlow, IPFIX,

sFlow)

BGP

Event logs(ie. NetFlow NEL)

Tee(Ha’d, anycasted

pmacct)

Collector 1(pmacct)

Collector 2(pmacct)

Collector N(pmacct)

Page 17: pmacct - ENOG

(Some of the) Works in Progress

• BGP-LS support• Keep pace with BMP protocol development• Make progress on IETF-proposed Streaming

Telemetry (YANG Push)

Page 18: pmacct - ENOG

Further information about pmacct

§ https://github.com/pmacct/pmacct• Official GitHub repository, where star and watch us J

§ http://www.pmacct.net/lucente_pmacct_uknof14.pdf• More about coupling telemetry and BGP

§ http://ripe61.ripe.net/presentations/156-ripe61-bcp-planning-and-te.pdf• More about traffic matrices, capacity planning & TE

§ https://github.com/pmacct/pmacct/wiki/• Wiki: docs, implementation notes, ecosystem, etc.

Page 19: pmacct - ENOG

Thanks! Questions?

Paolo Lucente <[email protected]>

http://www.pmacct.nethttps://github.com/pmacct/pmacct

ENOG 17 – Nov 2020