124k views
3 votes
What command shown below is using tcpdump to capture traffic from the IP address on the interface eth0 and output the results to the file?

A) tcpdump src host eth0 ' '
B) tcpdump -i eth0 -w ' ' src host
C) tcpdump eth0 ' ' src host
D) tcpdump -i eth0 -w ' ' src host

User Jon Kern
by
7.7k points

1 Answer

5 votes

Final answer:

The correct command to capture traffic from a specific IP address using tcpdump and save it to a file on the eth0 interface is 'tcpdump -i eth0 -w src host '.

Step-by-step explanation:

The command to use tcpdump to capture traffic from an IP address on the interface eth0 and output the results to a file is B) tcpdump -i eth0 -w <filename> src host <IP-address>. Here, -i eth0 specifies the interface eth0, -w <filename> indicates that the captured packets should be written to a file. You need to replace '<filename>' with the actual file name where you want to save the output and '<IP-address>' with the IP address you are interested in capturing traffic from.

User Sirwan Afifi
by
8.2k points