AIX 환경에서 TCP dump 뜨기

2014.12.05 08:54

ischo 조회 수:29320

원문 : http://www.ischo.net -- 조인상 // 시스템 엔지니어

Writer : http://www.ischo.net -- ischo // System Engineer in Replubic Of Korea

+++++++++++++++++++++++++++++++++++++++++++++++++++++++

 

원문 : http://www.ischo.net -- 조인상 //시스템 엔지니어

+++++++++++++++++++++++++++++++++++++++++++++++++++++++

 

<CASE>

서버 : 192.168.0.1

Client : 192.168.0.2

 

Client 에서 서버로 telnet 접속시 들어오는 패킷들을 dump 뜨고자 함.

 

 

 

사용 명령어

iptrace / ipreport

 

iptrace Daemon

Purpose

       Provides interface-level packet tracing for Internet protocols.

Syntax

       /usr/sbin/iptrace [ -a ] [ -b ][ -e ] [ -u ] [ -PProtocol_list ] [ -iInterface ] [ -pPort_list ] [ -sHost [ -b ] ] [ -dHost ] [ -L  Log_size ] [ -B
       ] [ -T ] [ -S snap_length] LogFile

 

 

ipreport Command

Purpose

       Generates a packet trace report from the specified packet trace file.

Syntax

       /usr/sbin/ipreport [ -e ] [ -r ] [ -n ] [ -s ] LogFile

       /usr/sbin/ipreport [ -C ] [ -e ] [ -n ] [ -r ] [ -s ] [ -S ] [ -v ] [-x ] [ -1 ] [ -N ] [ -T ] [ -c count ] [ -j pktnum ] [ -X bytes ] tracefile

Description

       The /usr/sbin/ipreport command generates a trace report from the specified trace file created by the iptrace command. The LogFile parameter
       specifies the name of the file containing the results of the Internet Protocol trace. This file is created by the iptrace command.

 

 

192.168.0.2 호스트로 en0 인터페이스를 통하여 23번 포트로 통신하는 패킷을 tcpdump.bin 으로 저장한다.

# iptrace -b -s 192.168.0.2 -i en0 -p 23 tcpdump.bin

[20906126]

 

 

위 명령어의 결과 background 로 동작하며 덤프를 저장한다.

# ps -ef | grep iptrace
    root  8978508 20971746   0 23:35:47  pts/1  0:00 grep iptrace
    root 20906126        1   0 23:35:23      -  0:00 iptrace -b -s 192.168.0.2 -i en0 -p 23 tcpdump.log

 

 

dump 중단시 kill

# kill -9 20906126       

 

binary 형식인 tcpdump.bin 파일을 ACSII 형태로 바꾸고자 할때

# ipreport tcpdump.bin > tcpdump.txt

 

 

 

번호 제목 글쓴이 날짜 조회 수
공지 [공지] 게시자료 열람자유. 불펌금지입니다. 조인상 2010.12.07 108387
211 AIX 시스템상의 core수 확인하기 ischo 2013.01.10 102072
210 AIX에서 하드웨어구성상태 확인방법 조인상 2010.05.11 81468
209 lsof 설치 없이 해당 포트를 열고 있는 프로세스 확인하는 법 ischo 2012.10.17 58188
208 AIX ssh 설치하기 조인상 2010.05.11 51002
207 AIX 6.1에 Apache 설치하기 ischo 2013.02.01 48701
206 AIX에서 시스템의 hostname 변경하기 ischo 2013.04.30 45204
205 AIX에서의 mirrorvg. 디스크 미러링 조인상 2011.07.06 44426
204 AIX에서 TCP wrapper 사용하기 조인상 2010.05.11 44307
203 IBM AIX Version 6.1 Differences Guide file 조인상 2012.07.26 44143
202 AIX 튜닝포인트 - CPU,MEM,VG + FAQ [1] ischo 2012.11.20 41664
201 AIX 환경에서 usb드라이브 사용하기 조인상 2011.09.01 41014
200 AIX 에서의 Comp , Noncomp 의 메모리 사용확인및 튜닝 조인상 2011.01.03 40809
199 시스템 성능의 병목원인 분석 조회 조인상 2010.05.11 40802
198 AIX 환경에서 NFS port번호 range 지정방법 조인상 2010.06.04 37774
197 errpt 4C41C0D0 : JFS2 LOG RECORDS FORCED OVERWRITTEN 조인상 2010.05.11 36380
196 AIX에서 process 당 thead 개수 (maximum number of thread per process) ischo 2013.02.06 35359
195 p시리즈 펌웨어 업데이트 방법 조인상 2012.07.20 35023
194 IBM AIX Version 7.1 Differences Guide file 조인상 2012.07.26 34700
193 etherchannel (teaming : 티밍) 구성방법 [1] file 조인상 2010.05.11 34372
192 AIX 시스템 퍼포먼스를 그래프로 확인 nmon + nmon analyser file 조인상 2010.05.11 33959
서버에 요청 중입니다. 잠시만 기다려 주십시오...