---
title: "Sending NetFlow, sFlow and IPFIX to NetSense"
description: "Point your routers and switches at the NetSense flow collector - which protocol to pick, the ports, what sampling means for the volumes you see, the rules every exporter must follow, and links to the commands per vendor and model."
---

> Documentation Index
> Fetch the complete documentation index at: https://netsense-nms.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Sending NetFlow, sFlow and IPFIX to NetSense

The [Flows module](https://netsense-nms.com/docs/guides/flows-and-flow-logs/) shows the traffic records your routers and
switches export. This page covers the device side: which protocol to use, where to send it,
the rules every device must follow, and how to check the result. The commands for each
vendor and model are on the vendor pages:

| Vendor | Models covered | Protocol to use | Page |
| --- | --- | --- | --- |
| Huawei | S-series switches (S5700 to S12700), CloudEngine, NetEngine and AR routers | NetStream (NetFlow v9) where the model has it, else sFlow | [Huawei](https://netsense-nms.com/docs/guides/flow-export/huawei/) |
| Cisco | Catalyst 9000, 3850, 2960-X, ASR and ISR, Nexus 9000, small-business SG and CBS | Flexible NetFlow v9, sFlow on Nexus first generation and SG/CBS | [Cisco](https://netsense-nms.com/docs/guides/flow-export/cisco/) |
| MikroTik | RouterOS 6 and 7: CCR, RB, CHR and x86 | Traffic Flow (NetFlow v9) | [MikroTik](https://netsense-nms.com/docs/guides/flow-export/mikrotik/) |
| Arista | EOS switches | sFlow | [Arista](https://netsense-nms.com/docs/guides/flow-export/arista/) |
| Juniper | MX, ACX, EX and QFX | jFlow (NetFlow v9 or IPFIX) on MX and ACX, sFlow on EX and QFX | [Juniper](https://netsense-nms.com/docs/guides/flow-export/juniper/) |
| Nokia | 7750 SR and 7250 IXR on SR OS | cflowd (NetFlow v9) | [Nokia](https://netsense-nms.com/docs/guides/flow-export/nokia/) |
| Others | EdgeCore and UfiSpace, Dell, D-Link, TP-Link, Optilink, VyOS, Ubiquiti, Linux BNGs | sFlow on switches, NetFlow v9 on routers and Linux | [Other vendors](https://netsense-nms.com/docs/guides/flow-export/other-vendors/) |

Every model section on the vendor pages states how far its commands are verified:

- **Tested by Extreme Labs**: we applied the commands on that model and release and checked
  the flows in NetSense.
- **In production**: NetSense customers export from that model and release today.
- **Not yet verified**: the vendor's documented configuration. Check it against your release
  with the device's `?` help and tell Extreme Labs how it went.
- **Does not work today**: the page says what to use instead.
- **No flow export**: the vendor documents no NetFlow, IPFIX or sFlow for that model. Export
  from the router upstream of it instead.

## Before you start

Extreme Labs switches the Flows module on per tenant, together with your AS number. Inbound
and outbound in every Flows view are relative to that AS.

The flow collector runs on your NetSense agent, so the destination of every export is
**your agent's IP address**. Ask Extreme Labs if you are not sure which address that is.

| Protocol | Versions accepted | Destination port |
| --- | --- | --- |
| NetFlow (Huawei NetStream, Cisco Flexible NetFlow, Juniper jFlow, Nokia cflowd, MikroTik Traffic Flow) | Version 9 only | UDP 2055 |
| IPFIX | Version 10 | UDP 2055 |
| sFlow | Version 5 | UDP 6343 |

- **NetFlow version 5 is not accepted**, nor versions 1, 7 and 8. Several devices default to
  version 5: always set version 9 explicitly.
- Send the export over **IPv4**. The flows themselves can be IPv4 or IPv6.
- Traffic goes **device → agent**. A firewall between them, or on the agent host, must let
  these UDP ports through. If the agent sits behind NAT, the device must reach it through a
  port forward. Working SNMP does not prove any of this: SNMP goes the other way.

## Choose a protocol

| | NetFlow v9 and IPFIX | sFlow |
| --- | --- | --- |
| What the device sends | One record per flow with byte and packet counts | Samples of packet headers, one in every N packets |
| Traffic volume in NetSense | Exact when the device exports every flow, about 1/N of the real traffic when it samples 1 in N | Scaled up by the sampling rate: an estimate of the real total |
| Load on the device | Higher, a flow cache in hardware or CPU | Low |
| Flow Logs | Sessions are listed | Not listed today: sFlow shows in the Flows views only |
| Typical devices | Routers, BNGs, Huawei S-series with NetStream, Cisco Catalyst | Data center and campus switches, Arista |

- Where a device offers both **NetFlow v9 and IPFIX**, use NetFlow v9. Some IPFIX templates
  are not decoded yet (Arista EOS, see the [Arista page](https://netsense-nms.com/docs/guides/flow-export/arista/)).
- Where a device offers both **NetFlow v9 and sFlow**, pick NetFlow v9 if the device can
  export unsampled flows, and sFlow if it can only sample.

## Sampling and traffic volume

NetSense shows the byte and packet counts of NetFlow and IPFIX records exactly as the device
sends them. It does not multiply them by the sampling rate. With sampling 1 in N, the Flows
views show about 1/N of the real traffic:

- **The traffic mix stays correct**: the share of each peer AS, protocol, port and host.
- **The totals do not**: use the [port graphs](https://netsense-nms.com/docs/guides/ports-and-interfaces/) for total
  traffic. They come from SNMP counters, which count every packet.

To see real volumes in Flows, export **unsampled** NetFlow where the hardware can do it, or
use **sFlow**, whose volumes NetSense scales up by the sampling rate. Some devices sample even
when no sampler is configured: the vendor pages say so where we have measured it.

Use the **same sampling rate on every port** of a device. Then at least the shares between
ports are comparable.

## Rules for every device

1. **Export from the IP address the device has in NetSense.** NetSense matches flows to a
   device by address. For NetFlow and IPFIX that is the source address of the export
   packets. For sFlow it is the **agent address** inside the sFlow data. A mismatch puts the
   exporter under **Unknown** in the device picker, without interface names. Pin the source
   (loopback, source interface or agent address) as the vendor page shows.
2. **Export each packet once.** NetSense does not merge an inbound record on one port with an
   outbound record of the same packet on another port. Use one of two patterns:
   - **Border ports, both directions** (the default): enable inbound and outbound on your
     upstream, IX, PNI, peering and CDN cache ports, and nowhere else.
   - **Inbound everywhere it matters**: on devices that only sample inbound traffic (most
     sFlow switches), enable inbound on the border ports **and** on the ports toward your
     customers or BNGs.

   Never enable flow export on the links between your own routers and switches: the same
   traffic then shows once per device.
3. **Export the SNMP interface numbers.** NetSense names the input and output interface of a
   flow from the device's SNMP interface table. Some devices use a different numbering by
   default (Huawei needs `ip netstream export index-switch 32`). A flow on interface 0 has
   no interface name.
4. **Keep export packets at 1500 bytes or less.** Larger (jumbo) export packets are cut off
   and their flows are lost. Set the device's maximum export packet or datagram size where it
   has one.
5. **Send the template often.** NetFlow v9 and IPFIX collectors can only read flows after
   the device sends its template. Set a template interval of a few minutes at most: with a
   30-minute default, a new exporter shows nothing for up to 30 minutes.
6. **Collect bytes and packets.** Keep both the byte and the packet counter in the flow
   record. A record without a packet counter shows every flow with 0 packets.
7. **Keep the device clock right.** Set NTP and the correct time zone. Session times come
   from the device, so a wrong clock shows sessions at the wrong time.

## Check that flows arrive

1. Wait a few minutes (up to the device's template interval), open **Flows** and open the
   **Device** picker. The device should be listed under its type with its hostname.
2. Open the **Interfaces** filter for the device. The ports you configured should be listed
   by name.
3. Compare the busiest port with its port graph. With unsampled NetFlow or with sFlow the
   volumes should be close. With sampled NetFlow expect about 1/N.

## Troubleshooting

| What you see | Likely cause | What to do |
| --- | --- | --- |
| Device not in the picker at all | Export not reaching the agent | Check the device's export statistics, the destination port (2055 or 6343), firewalls and NAT between the device and the agent, then ask Extreme Labs to check the collector |
| Device listed under **Unknown** by an IP address | Export source or sFlow agent address differs from the IP in NetSense | Pin the source address, or correct the device's IP in [your inventory](https://netsense-nms.com/docs/guides/adding-devices/) |
| Nothing for up to 30 minutes after setup | Long template interval | Shorten the template interval |
| Flows on the wrong port or without interface names | Exported interface numbers differ from SNMP | Set the vendor's SNMP interface numbering (Huawei `index-switch 32`), check routed ports that export interface 0 |
| Volumes far below the port graphs | Sampled NetFlow or IPFIX | Expected: see [Sampling and traffic volume](#sampling-and-traffic-volume) |
| The same traffic twice, or on two devices | Export on internal links, or inbound and outbound on two ports of one path | Follow rule 2 above |
| Sessions at the wrong time | Device clock or time zone | Set NTP and the time zone |
| Every flow with 0 packets | No packet counter in the record | Add the packet counter to the flow record |
| Exporter sends version 5 | Device default | Set version 9 |

If none of this helps, ask Extreme Labs: we can check what reaches the collector on your
agent.

Source: https://netsense-nms.com/docs/guides/flow-export/index.mdx
