NetFlow is configured on each input interface, then global commands are used to specify the export destination. To ensure a consistant source address address Loopback0 is configured as the export source.
ip cef distributed
ip flow-export version 5 origin-as
ip flow-export destination 10.0.0.100 5004
ip flow-export source Loopback0
interface Loopback0
ip address 10.1.1.1 255.255.255.255
interface FastEthernet0/1/0
ip address 10.0.0.1 255.255.255.0
no ip directed-broadcast
ip route-cache flow
ip route-cache distributed
Juniper
源码:--------------------------------------------------------------------------------interfaces {
ge-0/3/0 {
unit 0 {
family inet {
filter {
input all;
output all;
}
address 10.0.0.1/24;
}
}
}
firewall {
filter all {
term all {
then {
sample;
accept;
}
}
}
}
forwarding-options {
sampling {
input {
family inet {
rate 100;
}
}
output {
cflowd 10.0.0.100 {
port 9800;
version 5;
}
}
}
}