When you enable packet capture on a device, all packets flowing in the direction specified in packet capture configuration (inbound, outbound, or both) are captured and stored. Configuring an interface to capture all packets might degrade the performance of the device. You can control the number of packets captured on an interface with firewall filters and specify various criteria to capture packets for specific traffic flows.
You must also configure and apply appropriate firewall filters on the interface if you need to capture packets generated by the host router, because interface sampling does not capture packets originating from the host router.
To configure firewall filters for packet capture, see Configuring a Firewall Filter for Packet Capture (Optional).
For more information about firewall filters, see the JUNOS Software Interfaces and Routing Configuration Guide.