AIX 환경에서 TCP dump 뜨기

2014.12.05 08:54

ischo 조회 수:29403

원문 : 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 109058
51 Power7, HACMP, Oracle RAC, WAS, PowerVM, VIO [9] 조인상 2010.11.17 20563
50 IBM Power Systems Facts and Features 200907 file 조인상 2010.11.17 14032
49 p5 시리즈 소개자료 file 조인상 2010.11.17 15190
48 Virtual IO Server and Integrated Virtualization Manager Command Reference file 조인상 2010.12.21 17405
47 보안점검용 스크립트 - AIX,Linux,HP-UX,Solaris 조인상 2011.01.03 23320
46 AIX 에서의 Comp , Noncomp 의 메모리 사용확인및 튜닝 조인상 2011.01.03 40866
45 IBM Technical Expert 시리즈 자격증 로드맵 file 조인상 2011.02.23 25095
44 .sh_history 파일에 time stamp 찍는 법 조인상 2011.03.04 18540
43 AIX 5L V5.3 TL5 부터 제공되는 보안 설정 조인상 2011.04.21 14574
42 AIX NIM 설치 및 구성 [7] file 푸른늑대 2011.04.29 26476
41 000-102 HA for AIX 6 secret 조인상 2011.05.24 0
40 IBM p시리즈 2010년 라인업 file 조인상 2011.06.23 16737
39 미러된 rootvg를 alt_disk_install 로 복제하기 [1] 조인상 2011.06.29 24332
38 AIX에서의 mirrorvg. 디스크 미러링 조인상 2011.07.06 44520
37 각종 많이 쓰이는 어플리케이션 서비스 관련 포트번호 조인상 2011.07.21 24301
36 AIX 에서 Hot-Plug 방식으로 카드 추가하기 file 조인상 2011.08.01 19438
35 DAT Tape 사양 로드맵 file 조인상 2011.08.08 17594
34 AIX 환경에서 usb드라이브 사용하기 조인상 2011.09.01 41144
33 GPFS ver.3 Manual [1] 조인상 2011.12.01 20524
32 AIX 튜닝 포인트 secret 조인상 2011.12.01 0
서버에 요청 중입니다. 잠시만 기다려 주십시오...