5.3. Capturing Data
Packet
capture may be done by software running on a networked host or by
hardware/software combinations designed specifically for that
purpose. Devices designed specifically for capturing traffic often
have high-performance interfaces that can capture large amounts of
data without loss. These devices will also capture frames with
framing errors -- frames that are often silently discarded with
more conventional interfaces. More conventional interfaces may not be
able to keep up with high traffic levels so packets will be lost.
Programs like
tcpdump give summary statistics,
reporting the number of packets lost. On moderately loaded networks,
however, losing packets should not be a problem. If dropping packets
becomes a problem, you will need to consider faster hardware or,
better yet, segmenting your network.
Packet capture software works by
placing the network interface in
promiscuous
mode.
[24] In normal operations, the
network interface captures and passes on to the protocol stack only
those packets with the interface's unicast address, packets
sent to a multicast address that matches a configured address for the
interface, or broadcast packets. In promiscuous mode, all packets are
captured regardless of their destination address.
While the vast majority of interfaces can be placed in promiscuous
mode, a few are manufactured not to allow this. If in doubt, consult
the documentation for your interface. Additionally, on Unix systems,
the operating system software must be configured to allow promiscuous
mode. Typically, placing an interface in promiscuous mode requires
root privileges.
| | |
5.2. Access to Traffic | | 5.4. tcpdump |