16.03.2014 Views

Policy Framework Configuration Guide - Juniper Networks

Policy Framework Configuration Guide - Juniper Networks

Policy Framework Configuration Guide - Juniper Networks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Junos 10.4 <strong>Policy</strong> <strong>Framework</strong> <strong>Configuration</strong> <strong>Guide</strong><br />

packet-capture {<br />

disable;<br />

file filename file-name ;<br />

maximum-capture-size bytes;<br />

}<br />

To disable packet capture, include the disable statement. Packet capture is enabled by<br />

default.<br />

You can capture packets into files. Files are classified based on the physical interface<br />

the packets are captured on (one file per physical interface). You can specify the file<br />

name, maximum size, and maximum number of files. When you capture a file named<br />

pcap-file, packet capture creates one file for each physical interface and appends the<br />

physical interface designator to the filename (for example, at). When the file named<br />

pcap-file.xx reaches its maximum size, the file is renamed pcap-file.xx.0. When pcap-file.xx<br />

reaches its maximum size again, the file is renamed pcap-file.xx.1. This process continues<br />

until the maximum number of files is exceeded. When that happens, the oldest file is<br />

overwritten. The file named pcap-file.xx is always the latest file. The packet capture file<br />

for an interface is created when the first packet is captured on that interface. Once<br />

created, this file is not removed even if packet capture is disabled on the interface. All<br />

packet capture files are stored in the /var/tmp/ directory.<br />

If the PCAP file is deleted from the var/tmp/ directory, the file is not re-created upon the<br />

next packet capture traffic on the interface. You must first disable and then enable PCAP<br />

functionality again to re-create the PCAP file.<br />

To enable capture into files, include the file statement. You can specify the target filename,<br />

maximum file size, and the maximum number of files. To specify the name of the target<br />

file, include the filename statement. To specify the maximum size of the file, include the<br />

size statement. To specify the maximum number of files, include the files statement.<br />

To specify the maximum size of the packet for capture, include the maximum-capture-size<br />

statement.<br />

You can capture packets on a specific interface by configuring either of the following:<br />

• Configure a firewall filter with the action sample and apply it to the interface.<br />

• Configure sampling on the interface in the ingress or egress traffic.<br />

NOTE: Interface sampling does not capture host-originated packets.<br />

Configure firewall filters to capture host-originated packets.<br />

NOTE: A firewall filter applied to a loopback interface (lo0) affects all<br />

packets going to and from the Routing Engine.<br />

You can capture packets on a specific interface. For information about configuring<br />

interfaces, see the Junos OS Network Interfaces <strong>Configuration</strong> <strong>Guide</strong>.<br />

380<br />

Copyright © 2010, <strong>Juniper</strong> <strong>Networks</strong>, Inc.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!