Capture Network Packets from AIX


 
Thread Tools Search this Thread
Operating Systems AIX Capture Network Packets from AIX
# 8  
Old 01-15-2009
I am sorry for incomplete information.

Here are the details.
OS-AIX 6.1
User:root
tcpdump on AIX

1. tcpdump Command:
tcpdump -I -i en? host YOUR_PRINTER_DNS_NAME_OR_IP
2. Result:
tcpdump: BIOCSETIF: en0: Do not specify an existing file.

1. iptrace command:
/usr/sbin/iptrace -a -i en0 iptrace.out &
2. Give print to printer:
lp -d queue_name file_name
3. view the process:
ps -ef | grep iptrace
4. Kill the process:
kill -1 process_id
5. Report:
ipreport -r -s iptrace.out >/ipreport.network
6. view ipreport.network:
more ipreport.network

I could see network packets (TCP) captured in ipreport.network.

Reference:
Optimizing AIX 5L performance: Tuning network performance, Part 3

As explained in The Wireshark Network Analyzer 1.1.2, Wireshark can read / import the following file formats:
AIX's iptrace captures

I have configure Wireshark in Windows. I copied ipreport.network to windows pc and then tried to open it using wireshark. I got the error message "The file format is not supported".

Will ethereal compile in AIX 6.1 also..

Please let me know if more information is required.
# 9  
Old 01-16-2009
Hi,

Thank you all for your support.

I am able to capture all network packets using the below commands.

1. startsrc -s iptrace -a "-i en1 /home/testing/iptrace/iptracelog"
2. print
3. stopsrc -s iptrace

Ref:Optimizing AIX 5L performance: Tuning network performance, Part 3

Thank you all...
# 10  
Old 01-16-2009
Hi,

Thank you all for your support.

I am able to capture all network packets using the below commands.

1. startsrc -s iptrace -a "-i en1 /home/testing/iptrace/iptracelog"
2. print
3. stopsrc -s iptrace

Ref:Optimizing AIX 5L performance: Tuning network performance, Part 3

I am able to view the captured file using Wireshark also.

Thank you all...
# 11  
Old 01-16-2009
Thank you
# 12  
Old 01-16-2009
Quote:
Originally Posted by meeraramanathan
[...]1. tcpdump Command:
tcpdump -I -i en? host YOUR_PRINTER_DNS_NAME_OR_IP
2. Result:
tcpdump: BIOCSETIF: en0: Do not specify an existing file.
Does the traffic flow over the first interface? What happens if you just do
# tcpdump host <printer_ip>
If it works add -vvv option to get more packet information.

Quote:
Originally Posted by meeraramanathan
[...]I copied ipreport.network to windows pc and then tried to open it using wireshark. I got the error message "The file format is not supported".[...]
Using iptrace with AIX became somewhat old fashioned since tcpdump entered AIX (at version 4.2 or so) hence I still recommend using tcpdump instead. I consider it possible that AIX iptrace output is somewhat "different" than what current versions of Wireshark expect. If you insist on using iptrace make sure that the file is not damaged during transfer.

Quote:
Originally Posted by meeraramanathan
Will ethereal compile in AIX 6.1 also..
Opposed to the link information bakunin supplied Wireshark compiles fine long since at least 0.9.9.5. on AIX 5.3 but you need to know your AIX to prepare the environment correctly. Hint: if you want to compile Wireshark yourself GNU compilers (current versions) seem to me more suitable for this job than the IBM compilers. However, to catch simple TCP packets even Ethereal (Wireshark's predecessor) might suffice. Ethereal 0.8.x.x has been available from the IBM AIX Linux Toolbox for years now.

Last edited by shockneck; 01-16-2009 at 09:04 AM.. Reason: grammar....
# 13  
Old 01-16-2009
The command tcpdump which you have mentioned gives error.

bash-3.2# tcpdump host 10.116.26.156
tcpdump: no suitable device found

I will try to download and use Ethereal.
# 14  
Old 01-16-2009
Quote:
Originally Posted by meeraramanathan
[...]
bash-3.2# tcpdump host 10.116.26.156
tcpdump: no suitable device found[...]
Don't use bash when debuging AIX problems. AIX default shell is ksh. Using this oh so compatible "bash" or other non default shell will work just like AIX ksh in 99.9% of the time and the missing 0.1% compatibility might cause you many headaches.

If tcpdump complains about "no suitable device found" Ethereal/Wireshark won't work either.

Make sure that filest bos.net.tcp.adt is installed on your server. Then check whether the Berkeley Paket Filters are there: /dev/bpfx (with x being a number ranging from 0 to 3, i.e. four devices). These filters are not available per default. You need to run tcpdump from AIX (NOT from the Toolbox or any other source) once to get these filters created. Afterwards any tcpdump version should work.

Last edited by shockneck; 01-16-2009 at 07:04 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

How to set static routes for packets, within the same Network?

I have three systems A,B,C. I want to configure A in such a way that all packets from A to C goes via B. I tried: 1. ip route add 'ip of C' via 'ip of B' 2. route add -net 'net address' netmask gw 'ip of B' These commands work initially when I try a ping or traceroute and expire after... (2 Replies)
Discussion started by: kanak
2 Replies

2. Programming

Why am i getting these strange packets while running my packet capture module written in c.?

I have made an packet capture application running on intel machine, it is capturing packets with src address- 17.0.0.0 destination ip- 66.0.0.0, source port- 0, destination port- 0, and protocol- 0 what does these packets mean ? The code written to interpreter captured bytes is given below.... (5 Replies)
Discussion started by: arunpushkar
5 Replies

3. UNIX for Advanced & Expert Users

[Solved] Capture network disconnect or hung case

Hello folks, Have a process which needs to lock files to prevent simultaneous access. I could catch Ctrl + C, etc signals via the trap command. Often sessions get hung due to network disconnect leaving the lock file in place. Is there a way to catch network disconnects, etc. Thanks in... (4 Replies)
Discussion started by: vibhor_agarwali
4 Replies

4. IP Networking

Capture packets (TcpDump) and forwarding them

Hi, I want to capture a certain type of packets (selected according to the protocol) coming to my PC and then transmit them to another PC. I had the idea to use tcpdump to filter input packets and extract those chosen. Well my questions are: 1- after filtering input packets, those that have not... (1 Reply)
Discussion started by: ziedf
1 Replies

5. Infrastructure Monitoring

capture snmp packets in AIX

Hi, I want to capture snmp packets in AIX. When i give print from AIX6.1, Printer will give its response thru' snmp. I used iptrace command like below, but it is not capturing snmp packets other packets are captured like udp, tcp.. 1. iptrace command: /usr/sbin/iptrace -a -i en0... (1 Reply)
Discussion started by: meeraramanathan
1 Replies

6. UNIX for Dummies Questions & Answers

are dropped packets a sign of network problem?

in a xen environment , i see a lot op dropped packets via netstat -i Is this a sign of network problems, or is it normal to see this kind of numbers? i'm not sure how to interprete the data. is this normal, bad, critical. What are your stats on this? I guess i have a xen issue of some sort,... (1 Reply)
Discussion started by: progressdll
1 Replies

7. UNIX for Dummies Questions & Answers

Dumping network packets

Hi, My Solaris Workstation has got 4 NICS, out of which one of them(bge3) is unplugged from the rest of the external network & connected to other interface(bge1). The isolated NIC serves as a simulated Ethernet Interface for my application under development. Now, I'd like to capture RAW... (1 Reply)
Discussion started by: smanu
1 Replies

8. AIX

New to AIX and got my hands on a RS6000 v.need help getting it on the network

So im fairly new to AIX and my knowledge is very, very limited but i got my hands on an RS6000 43P model and im trying to get it on the network so i can access it from work. I have pretty much tried everything i can/know how to do by reading up as much as i can but im still lost. I have the 43P... (2 Replies)
Discussion started by: IIIII
2 Replies

9. Cybersecurity

How to capture network traffic

Hi, Can someone give me the clue on how to capture network traffic at gateway. Thanx (2 Replies)
Discussion started by: kayode
2 Replies

10. UNIX for Dummies Questions & Answers

how to capture multicast packets using snoop

How do I use snoop command to capture multicast packets in the network? (1 Reply)
Discussion started by: caden312
1 Replies
Login or Register to Ask a Question