Skip to main content
Version: 6.4

Ubiquiti EdgeRouter

Configuring flow accounting on a Ubiquiti EdgeRouter involves enabling NetFlow or IPFIX (Internet Protocol Flow Information Export) on the router, which allows it to collect and export flow data to the Unified Flow Collector. Here's a step-by-step guide on how to configure flow accounting on a Ubiquiti EdgeRouter using the Command Line Interface (CLI):

Access the EdgeRouter CLI

Connect to your EdgeRouter via SSH or a console cable. If connecting via SSH, use a tool like PuTTY or the built-in SSH client in your terminal, and enter the router's IP address, username, and password to log in.

Enter configuration mode

Once logged in, enter configuration mode by typing the following command:

configure

Configure the NetFlow or IPFIX settings

To enable NetFlow or IPFIX on the EdgeRouter, you'll need to configure the settings for the flow accounting protocol, including the interface(s) on which to monitor traffic, the version of the protocol, and the IP address and port of the remote flow collector or analyzer. Use the following commands, replacing the example values with your specific configuration:

For NetFlow:

set system flow-accounting netflow enable-egress
set system flow-accounting netflow interface ethX
set system flow-accounting netflow server x.x.x.x port yyyy
set system flow-accounting netflow version 9

For IPFIX:

set system flow-accounting ipfix enable-egress
set system flow-accounting ipfix interface ethX
set system flow-accounting ipfix server x.x.x.x port yyyy
set system flow-accounting ipfix version 10

Replace ethX with the interface you want to monitor (e.g., eth0), x.x.x.x with the IP address of the Unified Flow Collector, and yyyy with the desired port number for the Unified Flow Collector (e.g., 2055).

Commit and save the changes

After configuring the flow accounting settings, commit and save the changes by entering the following commands:

commit
save

Exit configuration mode

Type exit to leave configuration mode and return to the EdgeRouter CLI.

Verify the configuration

To verify that flow accounting is configured correctly, use the following command:

show system flow-accounting

This command should display the flow accounting settings you just configured.

Once you've completed these steps, your Ubiquiti EdgeRouter will start exporting flow data to the specified flow collector or analyzer. Make sure your that the Unified Flow Collector is set up to receive and process the exported data for analysis and monitoring purposes.