Macro 32 Ramblings

Mind Archive

Activating Netflow in JunOS

Juniper supports flow exports by sampling packet headers with the routing engine and aggregating them into flows. Packet sampling is acheived by defining a firewall filter to accept and sample all traffic, applying that rule to an interface, and then configuring the sampling forwarding option.

interfaces {
    ge-0/1/0 {
        unit 0 {
            family inet {
                filter {
                    input all;
                    output all;
                }
                address /  (< - This is in binary notation)
            }
        }
    }
}
		
firewall {
    filter all {
        term all {
            then {
                sample;
                accept;
            }
        }
    }
}
		
forwarding-options {
    sampling {
        input {
            family inet {
                rate 100;
            }
        }
        output {
            cflowd  {
                port ;
                version ;
            }
        }
    }
}

Leave a Reply