To configure traffic sampling, you must perform at least the following tasks:
- Create a firewall filter to apply to the logical interfaces being sampled by including the
filterstatement at the[edit firewall familyfamily-name]hierarchy level. In the filterthenstatement, you must specify the action modifiersampleand the actionaccept.[edit firewall family family-name]filterfilter-name{termterm-name{then {sample;accept;}}}- Apply the filter to the interfaces on which you want to sample traffic:
[edit interfaces]interface-name{unitlogical-unit-number{family family-name {filter {inputfilter-name;}addressaddress{destinationdestination-address;}}}}- Enable sampling and specify a nonzero sampling rate:
[edit forwarding-options]sampling {input {family inet{ratenumber;}}}