Skip to content

Flow export from other switches, routers and Linux BNGs

sFlow and NetFlow v9 commands for EdgeCore and UfiSpace (OcNOS, SONiC), Dell, D-Link, TP-Link, ZTE, Ruijie, Optilink, VyOS, Ubiquiti and Linux BNGs (ipt-netflow, pmacct, softflowd), and the switches that have no flow export.

This page covers the switches, routers and Linux servers that do not have a page of their own. Huawei, Cisco, Juniper, Nokia, MikroTik and Arista have their own pages, for example Cisco and Juniper.

Read the overview first: it explains where to send the export (Before you start), the rules for every device and how sampling changes the traffic volume you see.

In every block, <agent-ip> is your NetSense agent, <device-ip-in-netsense> is the IP address the device has in NetSense and <edge port> is a port that carries the traffic you want to see.

Which models, which protocol

Vendor and family Protocol Traffic volume in NetSense Status
EdgeCore and UfiSpace on OcNOS sFlow Estimated real volume Tested by Extreme Labs
EdgeCore on SONiC sFlow Estimated real volume Not yet verified
EdgeCore ECS series (EdgeCore’s own OS) Not covered yet - Ask Extreme Labs
Dell OS9 and OS10 sFlow Estimated real volume Not yet verified
Dell Enterprise SONiC sFlow Estimated real volume Not yet verified
Dell N-series sFlow Estimated real volume Not yet verified
D-Link DGS-1510 and DGS-3000 sFlow Estimated real volume Not yet verified
TP-Link JetStream (T2600G) sFlow Estimated real volume Not yet verified
ZTE and Ruijie switches sFlow Estimated real volume Not yet verified
Optilink, BDCOM-based (OP-MEN 99628, 99812) sFlow, inbound only Estimated real volume Not yet verified
Optilink OP-MEN 95612 (GBN-based) None documented - No flow export
Raisecom and RiKOM, Grandstream GWN, Maipu None documented - No flow export
VyOS 1.4 sFlow, or NetFlow v9 sFlow: estimated real volume. NetFlow: true volume Not yet verified
Ubiquiti EdgeRouter NetFlow v9 True volume Not yet verified
UniFi gateways NetFlow v9 or IPFIX Sampled, below the real volume Not yet verified
Linux BNG (accel-ppp and similar) NetFlow v9 (ipt-netflow or pmacct) True volume Not yet verified
  • Most switches on this page offer sFlow only. NetSense scales sFlow by its sampling rate, so the volume is an estimate of the real traffic.
  • Most of these switches sample inbound traffic only. Enable sFlow inbound on your border ports and on the ports toward customers or BNGs, never on the links between your own switches. See the rules for every device.
  • Keep every export packet at 1500 bytes or less. Where a device has a maximum datagram size setting, the commands below set it to 1400.
  • NetSense does not accept NetFlow v5. Where a device or tool defaults to v5, the commands set version 9.

EdgeCore and UfiSpace

OcNOS (EdgeCore and UfiSpace)

Tested by Extreme Labs on EdgeCore AS5916-54XM with OcNOS: flows arrive in NetSense. The block below follows the configuration we run on UfiSpace S9110 with OcNOS 6.5.4.

OcNOS offers sFlow only. It has no NetFlow or IPFIX export.

feature sflow
sflow agent-ip <device-ip-in-netsense>
sflow collector <agent-ip> port 6343 receiver-time-out 0 max-datagram-size 1400
interface <edge port>
 sflow sampling-rate 8192 direction ingress max-header-size 128
 sflow enable
 sflow poll-interval 30
 sflow collector-id 1
  • sflow agent-ip must be the IP the switch has in NetSense: that is how NetSense matches the samples to it.
  • max-datagram-size 1400 keeps each export packet under the 1500-byte limit. Do not use a larger value.
  • Sample ingress only. Adding direction egress on the same port counts every packet a second time when it leaves the switch.
  • receiver-time-out 0 keeps the collector configured permanently.
  • The rate is one packet in N, from 1024 up. Lower N means more samples and more load on the switch. See sampling and traffic volume.
  • Routed ports: on EdgeCore AS5916-54XM, routed (Layer 3) ports report interface index 0. Their traffic is counted, but the flows carry no interface, so the Interfaces filter cannot select them. Layer 2 ports report normally.
  • LAG: sampling configured on a LAG applies to all its member ports.
  • If the switch reaches the agent through its management VRF, add vrf management to the collector line. Check the keyword with ? on your release.
  • The syntax changes between OcNOS releases (6.6 moves the direction into a sub-mode). The fleet runs OcNOS 6.3 to 6.5: check each line with ?.
  • Check: show sflow detail and show sflow interface <edge port>.
  • Remove: no sflow enable on each port, then no feature sflow.

SONiC (EdgeCore)

Not yet verified. EdgeCore switches running SONiC support sFlow through the standard SONiC commands (config sflow ...): enable sFlow, add a collector at <agent-ip> port 6343, set the agent to the interface that holds <device-ip-in-netsense> (for example Loopback0) and set a sampling rate per port. Once enabled, SONiC samples every interface with a default rate based on port speed, so disable sFlow on the links between your own switches. Check with show sflow and show sflow interface, and tell Extreme Labs how it went.

Dell

OS9 (S4810, S4048 on OS9)

Not yet verified. The vendor’s documented configuration. Check it against your release with ? help and tell Extreme Labs how it went.

sflow enable
sflow collector <agent-ip> agent-addr <device-ip-in-netsense> 6343
sflow sample-rate 4096
interface <edge port>
 sflow enable
  • The agent address is set on the collector line. It must be the IP the switch has in NetSense.
  • Sampling is inbound. Enable it only on border ports and ports toward customers.
  • The rate is a power of 2, from 256 to 8388608.
  • If your release offers max-datagram-size on the collector line, set it to 1400.
  • Check: show sflow and show sflow interface <edge port>.
  • Remove: no sflow enable on each port, then no sflow enable globally.

OS10 (S4048-ON, S41xx, S52xx on OS10)

Not yet verified. The vendor’s documented configuration. Check it against your release with ? help and tell Extreme Labs how it went.

sflow enable
sflow sample-rate 4096
sflow max-header-size 128
sflow collector <agent-ip> agent-addr <device-ip-in-netsense> 6343 max-datagram-size 1400
interface <edge port>
 sflow enable
  • If the switch reaches the agent through the management VRF, add vrf management to the collector line (OS10 10.4.3.0 and later). Leave it out for the default VRF.
  • Check: show sflow and show running-configuration sflow.
  • Remove: no sflow enable on each port, then no sflow enable globally.

Dell Enterprise SONiC

Not yet verified. The vendor’s documented configuration. Check it against your release with ? help and tell Extreme Labs how it went.

sflow enable
sflow collector <agent-ip>
sflow agent-id Loopback 0
interface <edge port>
 sflow sampling-rate 4096
  • sflow agent-id names the interface that holds <device-ip-in-netsense>. The default is the management interface: leave it only if NetSense knows the switch by its management IP.
  • sflow enable turns sampling on for every interface. Turn it off on the links between your own switches (check the per-interface command with ?).
  • The collector uses UDP 6343 unless you set another port.
  • Check: show sflow.

N-series (DNOS 6)

Not yet verified. N1500, N2000, N3000 and N4000 support sFlow: point receiver 1 at <agent-ip> port 6343 with a maximum datagram size of 1400 and set a sampling rate on each edge port, following the sFlow chapter of Dell’s N-series CLI guide. The agent address is the switch’s own IP, so it must match the IP in NetSense.

DGS-1510 (firmware 1.81)

Not yet verified. The vendor’s documented configuration. Check it against your release with ? help and tell Extreme Labs how it went.

configure terminal
sflow receiver 1 owner NETSENSE expiry infinite max-datagram-size 1400 host <agent-ip> udp-port 6343
interface <edge port>
 sflow sampler 1 receiver 1 inbound sampling-rate 1024 max-header-size 128
  • There is no agent address command. The switch uses its own IP interface address (shown by show sflow agent), so that address must be the one it has in NetSense.
  • Set the owner in the same command as the rest, as above. Once set, the owner cannot be changed: run no sflow receiver 1 and configure the receiver again.
  • Keep inbound. The rate is one packet in N, up to 65536; 0 turns sampling off. The switch can lower the rate on its own when it is overloaded.
  • D-Link names ports ethernet 1/0/1.
  • Check: show sflow, show sflow receiver and show sflow sampler.
  • Remove: no sflow sampler 1 on each port, then no sflow receiver 1.

Not yet verified. The vendor’s documented configuration. Check it against your release with ? help and tell Extreme Labs how it went.

enable sflow
create sflow analyzer_server 1 owner NETSENSE timeout infinite collectoraddress <agent-ip> collectorport 6343 maxdatagramsize 1400
create sflow flow_sampler ports <edge ports> analyzer_server_id 1 rate 4 maxheadersize 128
  • On this family the rate value is multiplied by 256: rate 4 samples one packet in 1024. Check the unit in the CLI guide for your firmware.
  • The agent address is the switch’s IP. Check in show sflow that it is the IP the switch has in NetSense.
  • Check: show sflow, show sflow analyzer_server and show sflow flow_sampler.
  • Remove: delete sflow flow_sampler ports <edge ports>, then delete sflow analyzer_server 1 and disable sflow.

JetStream T2600G

Not yet verified. The vendor’s documented configuration. Check it against your release with ? help and tell Extreme Labs how it went.

TP-Link documents sFlow for T2600G-18TS v2, T2600G-28TS v3, T2600G-28MPS v3, T2600G-28SQ v1, T2600G-52TS v3 and later hardware versions.

configure
sflow address <device-ip-in-netsense>
sflow enable
sflow collector collector-ID 1 ip <agent-ip>
sflow collector collector-ID 1 port 6343
sflow collector collector-ID 1 maxData 1400
sflow collector collector-ID 1 timeout 0
interface <edge port>
 sflow sampler collector-ID 1
 sflow sampler ingRate 1024
  • The default maximum datagram is 300 bytes. Set maxData 1400 (the range is 300-1400).
  • sflow address is the agent address. It defaults to 0.0.0.0 and must be the IP the switch has in NetSense.
  • Sample inbound only: leave egRate at its default of 0. The rate range is 1024-65535.
  • timeout 0 means the collector never expires.
  • TP-Link names ports gigabitEthernet 1/0/1 or ten-gigabitEthernet 1/0/25.
  • On Omada-managed switches, configure sFlow in the Omada controller on the models that offer it. On other JetStream models, check first that the firmware has sflow commands.
  • Check: show sflow global, show sflow collector and show sflow sampler.
  • Remove: no sflow enable.

ZTE and Ruijie

Not yet verified. ZTE ZXR10 and Ruijie RGOS switches support sFlow. Set the agent address to <device-ip-in-netsense> (on ZTE ZXR10 6900 series: sflow agent-config ipv4-address), the collector to <agent-ip> port 6343, and inbound sampling on each edge port, following the sFlow chapter of your model’s configuration guide. The command set differs between ZTE families. Tell Extreme Labs how it went.

BDCOM-based models (OP-MEN 99628, 99812)

Not yet verified. Configuration from BDCOM’s sFlow commands. Check it against your release with ? help and tell Extreme Labs how it went.

These Optilink switches run BDCOM software and use the BDCOM sFlow commands.

sflow agent ip <device-ip-in-netsense>
sflow collector ip <agent-ip> 6343
interface <edge port>
 sflow enable ingress sampling-rate 2048
  • Sample ingress only. Do not add sflow enable egress: that counts the same packets twice.
  • Check with sflow ? for a maximum datagram size option and set 1400 if it exists.
  • Check: show sflow.

OP-MEN 99810B, 99216B and other models

Not yet verified. The OP-MEN 99216B datasheet lists sFlow, but we have found no command reference for it. Check for sflow commands with ? and tell Extreme Labs what your firmware offers. No Optilink model offers NetFlow.

OP-MEN 95612 (GBN-based)

No flow export. We found no documented flow export for this model. Export from the upstream router instead and use the SNMP port graphs for this switch.

Raisecom, RiKOM, Grandstream and Maipu

No flow export. We found no documented flow export for these switches:

  • Raisecom, including RiKOM-branded models (ISCOM, S2400, S3400, RI511, RI521, RAX): the datasheets and command references we checked have no sFlow or NetFlow.
  • Grandstream GWN (GWN7830, GWN7831, GWN7832 and other GWN78xx): the datasheets list sFlow as pending, not shipped. There is no NetFlow.
  • Maipu (S3330, SM4320, NSS5810 and others): no public document describes sFlow or NetFlow.

Export from the upstream router or BNG instead: it sees the same subscriber traffic. Use the SNMP port graphs for these switches. If your firmware has sflow commands, tell Extreme Labs.

VyOS 1.4

Not yet verified. The vendor’s documented configuration. Check it against your release and tell Extreme Labs how it went.

VyOS offers both sFlow and NetFlow v9. VyOS recommends sFlow on busy routers. Run only one of them.

sFlow (preferred):

set system sflow agent-address <device-ip-in-netsense>
set system sflow interface <edge port>
set system sflow sampling-rate 1000
set system sflow polling 30
set system sflow server <agent-ip> port 6343
commit
  • Repeat interface for each edge interface. The default rate is one in 1000.

NetFlow v9 (flow accounting):

set system flow-accounting interface <edge port>
set system flow-accounting disable-imt
set system flow-accounting netflow version 9
set system flow-accounting netflow server <agent-ip> port 2055
set system flow-accounting netflow source-ip <device-ip-in-netsense>
set system flow-accounting netflow engine-id 1
set system flow-accounting netflow timeout expiry-interval 60
commit
  • Flow accounting records inbound traffic only, which is what NetSense needs. Do not set enable-egress: it counts every packet a second time.
  • Do not set netflow sampling-rate. NetSense shows NetFlow volumes as the router sends them, so unsampled export gives the true volume.
  • disable-imt turns off the in-memory table, which VyOS advises in production.
  • VyOS has more flow timeouts under netflow timeout. If your release offers an active flow lifetime, set it to 60 seconds.
  • Check: show flow-accounting interface <edge port>.
  • Remove: delete system sflow or delete system flow-accounting, then commit.

Ubiquiti

EdgeRouter (EdgeOS)

Not yet verified. EdgeOS uses the same flow accounting commands as VyOS: set system flow-accounting interface <edge port>, netflow version 9, netflow server <agent-ip> port 2055, netflow timeout expiry-interval 60 and disable-memory-table. EdgeOS has no documented option to set the source address: packets leave from the interface that routes toward the agent. Make sure that is the interface holding <device-ip-in-netsense>, or add the EdgeRouter to NetSense with the address it sends from.

UniFi gateways

Not yet verified. UniFi gateways export flows from Settings → CyberSecure → Traffic Logging in UniFi Network (the NetFlow (IPFIX) option). Set the collector to <agent-ip> port 2055 and pick the networks to export. If your UniFi Network version offers NetFlow version 9, choose it over IPFIX.

  • UniFi cannot pin the source address. Add the gateway to NetSense with the address it sends from, or its flows appear under Unknown.
  • UniFi describes the export as sampled traffic, so NetSense shows less than the real volume. Use the SNMP port graphs for totals.
  • UniFi switches have no documented sFlow or NetFlow.

Linux BNGs (accel-ppp and similar)

Not yet verified. The tools’ documented configuration. Check it on your server and tell Extreme Labs how it went.

A Linux BNG forwards every subscriber packet through the kernel. Export from the forwarding path, unsampled, so NetSense shows the true volume. Three rules:

  • Count each packet once. Account the FORWARD chain only. The INPUT and OUTPUT chains carry the server’s own traffic, and accounting a second chain or a second hook counts forwarded packets twice.
  • Export from the server’s NetSense address. NetSense matches the export by its source address.
  • Set version 9. ipt-netflow and softflowd default to NetFlow v5, which NetSense does not accept.

ipt-netflow is a kernel module that adds a NETFLOW iptables target. Install it from your distribution (iptables-netflow-dkms on Debian and Ubuntu) or build it from source.

# /etc/modprobe.d/ipt_NETFLOW.conf
options ipt_NETFLOW protocol=9 destination=<agent-ip>:2055@<device-ip-in-netsense> active_timeout=60 inactive_timeout=15 engine_id=1

# load the module and account forwarded traffic once
modprobe ipt_NETFLOW
iptables  -I FORWARD -j NETFLOW
ip6tables -I FORWARD -j NETFLOW
  • destination=<agent-ip>:2055@<device-ip-in-netsense> sends to the agent and binds the source to the server’s NetSense address. Both parts are needed.
  • protocol=9 is required: the default is NetFlow v5.
  • The default active timeout is 1800 seconds, which delays long sessions by up to half an hour. active_timeout=60 and inactive_timeout=15 keep NetSense current. To change them at runtime: sysctl net.netflow.active_timeout=60.
  • Put the NETFLOW rule in FORWARD only, at the top of the chain. Do not add it to PREROUTING, INPUT or OUTPUT as well.
  • Leave the module’s sampler off. NetSense does not scale sampled NetFlow.
  • Export packets stay below 1500 bytes.
  • If the server does NAT, the FORWARD chain sees the subscribers’ private addresses, not the public ones.
  • Interface names can be wrong on long-running accel-ppp servers. ipt-netflow exports a 2-byte interface index. Each PPPoE session creates a new ppp interface with a higher index, and after enough sessions the index passes 65535 and is cut. NetSense then shows the wrong interface name, or none. Interfaces created at boot, such as the uplinks, keep small indexes and stay correct. NetSense names only the interfaces it polls over SNMP on the server.
  • Check: cat /proc/net/stat/ipt_netflow shows the export counters and the destination.
  • Remove: iptables -D FORWARD -j NETFLOW, ip6tables -D FORWARD -j NETFLOW, then rmmod ipt_NETFLOW.

pmacct (alternative)

pmacct runs in user space. uacctd reads packets from an iptables NFLOG rule, and its nfprobe plugin exports NetFlow v9.

# iptables rule feeding uacctd (forwarded traffic only)
iptables -I FORWARD -j NFLOG --nflog-group 5

# /etc/pmacct/uacctd.conf
daemonize: true
uacctd_group: 5
plugins: nfprobe
nfprobe_receiver: <agent-ip>:2055
nfprobe_source_ip: <device-ip-in-netsense>
nfprobe_version: 9
nfprobe_engine: 1
nfprobe_timeouts: tcp=60:udp=60:icmp=60:general=60:maxlife=60:expint=15
aggregate: src_host, dst_host, src_port, dst_port, proto, tos, tcpflags, in_iface, out_iface
  • nfprobe_version defaults to 10 (IPFIX). Set 9.
  • The default timeouts are an hour or longer. Set them as above so sessions appear within a minute.
  • nfprobe_source_ip pins the source address.
  • pmacctd is the same tool reading one interface through libpcap (pcap_interface). Use it on the uplink only, so each packet is seen once.
  • pmacct can also send sFlow (plugins: sfprobe, sfprobe_receiver: <agent-ip>:6343, sfprobe_agentip: <device-ip-in-netsense>).

softflowd (small servers only)

softflowd captures packets in user space and suits low traffic only, not a multi-gigabit BNG. It defaults to NetFlow v5, so always pass -v 9:

softflowd -i <edge port> -n <agent-ip>:2055 -v 9 -t maxlife=60 -t general=15 -t expint=15

softflowd has no source address option. Its packets leave from the interface that routes toward the agent, so that interface must hold <device-ip-in-netsense>.

Check that flows arrive

Follow Check that flows arrive on the overview. sFlow exporters appear in the Flows views but not in Flow Logs today. If a device is listed under Unknown, its agent address (sFlow) or source address (NetFlow) is not the IP it has in NetSense. More causes are in Troubleshooting.

Type to search…

↑↓ navigate↵ selectEsc close