Hello
Today we’ll show you how to configure your Huawei router to export NetFlow (IP NetStream).
Here we have the Network topology and the Netflow Server information

These are the steps required to configure the Huawei Router to export Netflow v5/v9 via Netstream IP
- Configure the NTP Server
- Configure the slot to export information
- Configuring Netstream IP with Netflow Server
- Configure the interface to enable Netflow on the interface
Let’s go to the step-by-step configuration
1.Configuring the NTP Server
It is important to configure an NTP server because flow data uses a timestamp based on the router’s time. If the router’s time differs from the server’s, the data will not match the time, resulting in a discrepancy in the information.
It is important that you configure at least 2 NTP servers and also your router’s timezone.
ntp-service server disable
ntp-service ipv6 server disable
ntp-service unicast-peer 200.160.0.8
ntp-service unicast-peer 200.189.40.8
2. Configure the slot to export information
On Huawei routers, you need to configure the slot to export information. To do this, use the following commands:
slot 3
ip netstream sampler to slot self
ipv6 netstream sampler to slot self
3. Configuring Netstream IP with Netflow Server
On Huawei routers you must configure the netstream IP to say which server will receive the Netflow data, which sampling (sampler), which Netflow version and Netflow source IP. For configuration use the following commands:
ip netstream timeout active 1
ip netstream timeout inactive 15
ip netstream export version 9
ip netstream export index-switch 32
ip netstream export template timeout-rate 1
ip netstream sampler fix-packets 500 inbound
ip netstream sampler fix-packets 500 outbound
ip netstream export source 192.168.210.49
ip netstream export host 192.168.210.47 2055
ip netstream export template option sampler
ip netstream export template option timeout-rate 1
ip netstream as-mode 32
ipv6 netstream as-mode 32
ipv6 netstream timeout active 1
ipv6 netstream timeout inactive 15
ipv6 netstream export version 9
ipv6 netstream export index-switch 32
ipv6 netstream export template timeout-rate 1
ipv6 netstream sampler fix-packets 500 inbound
ipv6 netstream sampler fix-packets 500 outbound
ipv6 netstream export source 192.168.210.49
IPv6 netstream export host 192.168.210.47 2055
IPv6 netstream export template option sampler
IPv6 netstream export template option timeout-rate 1
IPv6 netstream as-mode 32
4. Configure the interface to enable Netflow on the interface
Finally, we need to enable NetFlow on the interfaces that will export it. To do this, use the following commands on each interface:
ip netstream inbound
ipv6 netstream inbound
Below is the complete configuration of the Router:
ntp-service server disable
ntp-service ipv6 server disable
ntp-service unicast-peer 200.160.0.8
ntp-service unicast-peer 200.189.40.8
slot 3
ip netstream sampler to slot self
ipv6 netstream sampler to slot self
ip netstream timeout active 1
ip netstream timeout inactive 15
ip netstream export version 9
ip netstream export index-switch 32
ip netstream export template timeout-rate 1
ip netstream sampler fix-packets 500 inbound
ip netstream sampler fix-packets 500 outbound
ip netstream export source 192.168.210.49
ip netstream export host 192.168.210.47 2055
ip netstream export template option sampler
ip netstream export template option timeout-rate 1
ip netstream as-mode 32
ipv6 netstream as-mode 32
ipv6 netstream timeout active 1
ipv6 netstream timeout inactive 15
ipv6 netstream export version 9
ipv6 netstream export index-switch 32
ipv6 netstream export template timeout-rate 1
ipv6 netstream sampler fix-packets 500 inbound
ipv6 netstream sampler fix-packets 500 outbound
ipv6 netstream export source 192.168.210.49
IPv6 netstream export host 192.168.210.47 2055
IPv6 netstream export template option sampler
IPv6 netstream export template option timeout-rate 1
IPv6 netstream as-mode 32
interface eth-trunk0.100 (example interface)
ip netstream inbound
ipv6 netstream inbound
If you have an NE40, here is a sample configuration:
ntp-service server disable
ntp-service ipv6 server disable
ntp-service unicast-peer 200.160.0.8
ntp-service unicast-peer 200.189.40.8
slot 3
ip netstream sampler to slot self
ipv6 netstream sampler to slot self
ip netstream as-mode 32
ip netstream timeout inactive 15
ip netstream export version 9
ip netstream export index-switch 32
ip netstream export template timeout-rate 1
ip netstream sampler fix-packets 500 inbound
ip netstream sampler fix-packets 500 outbound
ip netstream export source 192.168.210.49
ip netstream export host 192.168.210.47 2055
ip netstream export template option sampler
ip netstream export template option timeout-rate 1
#
ipv6 netstream as-mode 32
ipv6 netstream timeout inactive 15
ipv6 netstream export version 9
ipv6 netstream export index-switch 32
ipv6 netstream export template timeout-rate 1
ipv6 netstream sampler fix-packets 500 inbound
ipv6 netstream sampler fix-packets 500 outbound
ipv6 netstream export source 192.168.210.49
ipv6 netstream export host 192.168.210.47 2055
ipv6 netstream export template option sampler
ipv6 netstream export template option timeout-rate 1
On all interfaces, add `
` `ip netstream inbound` `
` `ipv6 netstream inbound`
If you have a router that isn’t listed here, send us a message on WhatsApp and we’ll send you the settings.
I hope I have helped you and until next time.
Big hug.
