@tcpdump 사용법
tcpdump --help
tcpdump version 4.1-PRE-CVS_2012_03_26
libpcap version 1.4.0
Usage: tcpdump
[-aAdDefIKlLnNOpqRStuUvxX] [ -B size ] [ -c count ]
[ -C file_size ] [ -E algo:secret ] [ -F file
] [ -G seconds ]
[ -i interface ] [ -M secret ]
[ -r file ]
[ -s snaplen ] [ -T type ] [ -w
file ] [ -W filecount ]
[ -y datalinktype ] [ -z
command ] [ -Z user ]
[ expression ]
>> 각
옵션에 대한 내용이며 자세한 설명은 "man tcpdump" 에서 확인이 가능 합니다.
example
#tcpdump -vvv
>> 모든
인터페이스에 대하여
more verbose 모드로 console 에 출력
#tcpdump -vvv > /tmp/tcpdump.txt
>> 모든
인터페이스에 대하여
more verbose 모드로 발생되는
내용에 대하여
">" 리다이렉트로
>> /tmp/tcpdump.txt 에 기록
#tcpdump -i bond0 -vvv
>> bond0 인터페이스에 대하여
more verbose 모드로 console 에 출력
#tcpdump -i bond0 -vvv >
/tmp/tcpdump.txt
>> bond0 인터페이스에 대하여
more verbose 모드로 발생되는
내용에 대하여
">" 리다이렉트로
>> /tmp/tcpdump.txt 에 기록
#tcpdump -i bond0 -vvv -w /tmp/tcpdump2
>> 해당
파일을 binary 형태의 파일로 기록, 해당
파일을 확인하기 위해서는 " tcpdump -r /tmp/tcpdump2
>> or tcpdump -Xqnr /tmp/tcpdump2
" 로 확인
가능
verbose 모드는
상황에 맞게
"none , -v , -vv , -vvv " 을
선택하여 사용 하시기 바랍니다.
관련 내용
첨부:
-v When parsing and printing,
produce (slightly more) verbose output.
For example, the time to live, identification, total length and options
in an
IP packet
are printed. Also enables additional packet integrity
checks such as verifying the IP and ICMP header checksum.
When writing to a file with the
-w option, report, every 10 seconds, the number of packets captured.
-vv Even more verbose
output. For example, additional fields
are printed from NFS reply packets, and SMB packets are fully decoded.
-vvv Even more verbose
output. For example, telnet SB ... SE
options are printed in full. With -X
Telnet options are printed in hex as well