Recent disruptions to two undersea internet cables in the Baltic Sea have yet again...
2.7.1 Irpflowd Configuration
Irpflowd
is a NetFlow/sFlow collector that receives and analyzes network traffic information, generated by your router(s).- NetFlow – an IP network statistics protocol developed by Cisco Systems, Inc. for collecting and transferring statistics regarding IP traffic information from network devices such as switches/routers to network analysis applications.
Irpflowd
currently supports the following NetFlow versions: v1, v5, v9.
- sFlow – is a protocol designed for monitoring network, wireless and host devices. Developed by the sFlow.org Consortium, it is supported by a wide range of network devices, as well as software routing and network solutions.
2.7.1.1 Flow agents #
IPv4/interfaceID
peer.X.flow_agents = 8.8.8.8/1 8.8.8.8/2 8.8.8.8/3 8.8.8.8/4
2.7.1.2 Configuration #
irpflowd
collector, the following steps must be completed:- NetFlow/sFlow/jFlow must be configured on the router(s), which must send traffic flow information to the main IRP server IP (Figure Figure: Flow export configuration). See (Vendor-specific NetFlow configuration examples) for specific network device configuration instructions
- Irpflowd must be enabled (by setting the collector.flow.enabled parameter):
collector.flow.enabled = 1
- A list of all the networks, advertised by the edge routers that IRP will optimize, should be added to the configuration. This information should be specified in the collector.ournets parameter.
- For security reasons, the list of valid Flow sending IP addresses must be configured in the collector.flow.sources, to protect
irpflowd
from unauthorized devices sending Flow data.
Example:
collector.flow.sources = 10.0.0.0/29
- In case the Flow exporters are configured to use non-standard port numbers (
2055
for NetFlow/jFlow and6343
for sFlow), then collector.flow.listen.nf and collector.flow.listen.sf must be adjusted accordingly:
collector.flow.listen.nf = 2055 collector.flow.listen.sf = 6343
2.7.1.3 Vendor-specific NetFlow configuration examples #
NetFlow configuration on Cisco 7600/6500 series routers #
(config)# mls netflow (config)# mls flow ip interface-full (config)# mls flow ipv6 interface-full (config)# mls sampling packet-based 512 8192 (config)# mls nde sender version 7
2055
by default)(config)# ip flow-cache entries 524288 (config)# ip flow-cache timeout inactive 60 (config)# ip flow-cache timeout active 1 (config)# ip flow-export version 9 (config)# ip flow-export destination 10.11.12.14 2055
(config)# int GigabitEthernet 3/6 (config-if)# mls netflow sampling (config-if)# ip flow ingress
Flexible NetFlow configuration on Cisco 6500 series routers IOS 15.0SY series #
(config)# flow monitor IRP-FLOW-MONITOR (config-flow-monitor)# record platform-original ipv4 full (config-flow-monitor)# exporter IRP-FLOW-EXPORTER (config-flow-monitor)# cache timeout inactive 60 (config-flow-monitor)# cache timeout active 60 (config-flow-monitor)# cache entries 1048576
(config)# flow exporter IRP-FLOW-EXPORTER (config-flow-exporter)# destination 10.11.12.14 (config-flow-exporter)# source Loopback0 (config-flow-exporter)# transport udp 2055 (config-flow-exporter)# template data timeout 120
2055
by default). Also replace the source interface with the actual one.(config)# sampler flow-sampler (config-sampler)# mode random 1 out-of 1024
(config)# interface FastEthernet0/0 (config-if)# ip flow monitor IRP-FLOW-MONITOR sampler flow-sampler input (config-if)# ip flow monitor IRP-FLOW-MONITOR sampler flow-sampler output
NetFlow configuration on Cisco 7200/3600 series routers #
2055
by default)Router(config)# ip flow-cache entries 524288 Router(config)# ip flow-cache timeout inactive 60 Router(config)# ip flow-cache timeout active 1 Router(config)# ip flow-export version 9 Router(config)# ip flow-export destination 10.11.12.14 2055
Ingress/egress flow export configuration on peering interfaces #
Router(config)#interface FastEthernet 1/0 Router(config-if)#ip flow ingress Router(config-if)#ip flow egress
Ingress flow export configuration (earlier IOS releases) #
Router(config)#interface FastEthernet 1/0 Router(config-if)#ip route-cache flow
NetFlow/sFlow configuration examples for Vyatta routers (VC 6.3) #
vyatta@vyatta# set system flow-accounting netflow server 10.11.12.14 port 2055 vyatta@vyatta# set system flow-accounting netflow version 5
vyatta@vyatta# set system flow-accounting interface eth0 vyatta@vyatta# commit
jFlow export configuration for Juniper routers #
forwarding-options { sampling { input { family inet { rate 1000; } } } family inet { output { flow-server 10.10.3.2 { port 2055; version 5; source-address 10.255.255.1; } } } }
NetFlow export must be configured on all the interfaces facing the providers. In some cases, it may also be necessary to enable NetFlow forwarding on the interfaces facing the internal network.
interfaces { xe-0/0/0 { unit 0 { family inet { sampling { input output; } } } } }