This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| network_stuff:flow_information [2023/05/11 22:01] – jotasandoku | network_stuff:flow_information [2023/11/02 14:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 27: | Line 27: | ||
| ip flow monitor Flow-monitor sampler Flow-sampler input | ip flow monitor Flow-monitor sampler Flow-sampler input | ||
| - | Netflow in ubuntu or FRR: | + | Netflow in ubuntu or FRR (agent): |
| \\ | \\ | ||
| FRR01:~# systemctl status pmacctd.service | FRR01:~# systemctl status pmacctd.service | ||
| Line 58: | Line 58: | ||
| pre_tag_map: | pre_tag_map: | ||
| timestamps_secs: | timestamps_secs: | ||
| - | | + | |
| + | SFLOW collector: | ||
| + | * The default open source collector is : [[http:// | ||
| ---- | ---- | ||
| **__SFLOW__** | **__SFLOW__** | ||
| + | * sampled frames + interface counter + flow-tuple data. All in the same packet | ||
| + | * sflow is configurable via SNMP mibs | ||
| + | |||
| + | * Flow sample (conceptually one in each sflow packet but in reality we pack more than 1). It lists things like: ingress egress. ifindex and < | ||
| + | * Flow record (the frame header with a little bit of metadata (like header protocol (eg: Ethernet)) | ||
| + | |||
| + | |||
| \\ | \\ | ||
| - | IN LINUX / FRR: | + | SFLOW IN LINUX / FRR: |
| \\ | \\ | ||
| USE 'HOST SFLOW' PROJECT: [[https:// | USE 'HOST SFLOW' PROJECT: [[https:// | ||
| + | |||
| + | # Example of working config in / | ||
| + | sflow { | ||
| + | polling = 20 | ||
| + | sampling = 100 | ||
| + | collector { ip=10.100.11.143 udpport=6343 } | ||
| + | pcap { dev = ens4 } | ||
| + | nflog { group = 5 probability = 0.01 } | ||
| + | } | ||
| + | | ||
| + | # Then we need to issue this commandsL: | ||
| + | NFLOG_CONFIG=" | ||
| + | echo 1 > / | ||
| + | MOD_STATISTIC=" | ||
| + | NFLOG_CONFIG=" | ||
| + | sudo iptables -I INPUT -j NFLOG $MOD_STATISTIC $NFLOG_CONFIG | ||
| + | sudo iptables -I OUTPUT -j NFLOG $MOD_STATISTIC $NFLOG_CONFIG | ||
| + | | ||
| + | # Ad restart: | ||
| + | sudo systemctl enable hsflowd | ||
| + | service hsflowd start | ||
| + | | ||
| + | # If issues | ||
| + | service hsflowd start | ||
| + | hsflowd -dd | ||
| + | |||
| + | Also see: | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| \\ | \\ | ||
| \\ | \\ | ||
| In Arista: | In Arista: | ||
| + | * Arista Networks DCS-7060CX-32S: | ||
| + | |||
| sflow run | sflow run | ||
| sflow interface disable default | sflow interface disable default | ||
| Line 87: | Line 129: | ||
| ! | ! | ||
| show sflow detail | show sflow detail | ||
| + | | ||
| + | In Junos | ||
| + | set protocols sflow polling-interval 2 # interval for sending data to the collector | ||
| + | set protocols sflow sample-rate ingress 4096 # packet sampling rate. Packets are sampled at random intervals | ||
| + | set protocols sflow source-ip 1.1.1.1 | ||
| + | set protocols sflow collector 2.2.2.2 udp-port 6343 | ||
| + | set protocols sflow interfaces xe-0/ | ||
| + | ibr-0-0-1 protocols sflow | ||
| + | set protocols sflow agent-id 1.1.1.1 | ||
| + | set protocols sflow polling-interval 1 | ||
| + | set protocols sflow sample-rate ingress 1024 | ||
| + | set protocols sflow source-ip 1.1.1.1 | ||
| + | set protocols sflow collector 2.2.2.2 udp-port 6343 | ||
| + | set protocols sflow interfaces xe-0/ | ||
| + | | ||
| + | In Cisco (IOS-XR): [[https:// | ||