AIX 환경에서 TCP dump 뜨기

2014.12.05 08:54

ischo 조회 수:29369

원문 : 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 108879
51 파일 시스템 용량 증가시 "물리적 구획이 부족합니다."(0516-1034) 라는 메세지가 오류메세지 조인상 2010.05.11 17862
50 메모리 정보 확인 조인상 2010.05.11 17347
49 LV name과 마운트 이름 변경하기 조인상 2010.05.11 17686
48 미러링된 디스크중 하나의 상태가 none으로 나타날때. 조인상 2010.05.11 12947
47 Log device 에 관한 에러와 수정하는 방법 조인상 2010.05.11 14835
46 AIX OS에서 time zone을 변경 하는 방법 조인상 2010.05.11 18149
45 VMM memory tuning 방법. 조인상 2010.05.11 14914
44 Backup OS Disk만들기(alter disk 백업 방법) 조인상 2010.05.11 15556
43 시스템부팅이상시조치사항 조인상 2010.05.11 17214
42 JFS2 파일시스템 수퍼블록이 훼손 되었을 경우 조인상 2010.05.11 13690
41 AIX L1, L2, L3 cache 사이즈 확인하는 방법 조인상 2010.05.11 17727
40 root 패스워드 잊어 버렸을때 지우는 방법 조인상 2010.05.11 14570
39 AIX 5.2 DNS setting 조인상 2010.05.11 24597
38 IBM Ess800 storage 관련 조인상 2010.05.11 13875
37 네트웍 관련 (IP 세팅, 라우팅 세팅, 속도 세팅) [1] 조인상 2010.05.11 20236
36 OS 변경 후 이전 유저 환경 유지시키려면.. 조인상 2010.05.11 12375
35 보안 점검 시 유용한 명령어 모음 조인상 2010.05.11 15738
34 메뉴얼 링크 [1] 조인상 2010.05.11 19607
33 cpu clock 확인하는 방법 조인상 2010.05.11 25788
32 AIX ssh 설치하기 조인상 2010.05.11 51034
서버에 요청 중입니다. 잠시만 기다려 주십시오...