How to capturing packet data so i can see the Version, IHL, TOS, etc?


 
Thread Tools Search this Thread
Special Forums IP Networking How to capturing packet data so i can see the Version, IHL, TOS, etc?
# 1  
Old 10-21-2011
Question How to capturing packet data so i can see the Version, IHL, TOS, etc?

Helo Folks Smilie
i had read an answer in this thread unix[dot]com/programming/117551-calculate-ip-header-checksum-manually.html

i need to know what the software name that was used to capturing packet data in a network, just like the packet's capture output that showed up in the thread.

Thank you Smilie

PS
#Wowww i just shocked with the forum's rules.. very very restricted and hard rules
i am not allowed to write a URL before i ever post at least 5 post. wewww..
# 2  
Old 10-21-2011
tcpdump, wireshark can capture packets in a network, or you can write a perl script using libpcap, it works too.
# 3  
Old 10-23-2011
yes, i had try using tcpdump

yes, i had try using tcpdump but i can't get the expected result.
i jus get output like this :
Code:
22:07:24.594264 IP okaprinarjaya-machine.local > 224.0.0.251: igmp v2 report 224.0.0.251
22:07:24.595606 IP okaprinarjaya-machine.local.59749 > google-public-dns-a.google.com.domain: 7289+ PTR? 251.0.0.224.in-addr.arpa. (42)
22:07:24.778994 IP google-public-dns-a.google.com.domain > okaprinarjaya-machine.local.59749: 7289 NXDomain 0/1/0 (99)
22:07:24.880158 IP6 fe80::290:f5ff:fe51:af16.mdns > ff02::fb.mdns: 0 PTR (QM)? 251.0.0.224.in-addr.arpa. (42)

i can't see where's the Version, IHL, TOS, etc

thank you Smilie
# 4  
Old 10-25-2011
i can't get IHL, etc until now

i can't get Version,IHL,TOS, etc until now using tcpdump. Anybody know how to get Version, IHL, TOS, etc using tcpdump just like what showed up in unix[dot]com/programming/117551-calculate-ip-header-checksum-manually.html
# 5  
Old 10-25-2011
Sorry for my belated reply, in fact, you can redirect the output to a file (in raw mode) then visualize using wireshark (or tcpdump -vv -x -X, i don't have tcpdump installed on my PC right now so I can't show you the output). That way, you can see any information in a packet (version, IHL, TOS...) but they are in HEX so you have to translate them bit by bit.
Hope this helps.
This User Gave Thanks to thanhdat For This Post:
# 6  
Old 10-27-2011
ok thank you... :)

Ok.... thank you very much @thanhdat Smilie
now i can see the packet just like what i want Smilie

---------- Post updated at 07:24 AM ---------- Previous update was at 07:20 AM ----------

Before i forget, i want to add some correction from your answer
tcpdump -w afile.log -x -X
then read it with
tcpdump -r afile.log -x -X

Thank you Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Packet loss coming with big packet size ping

(5 Replies)
Discussion started by: Vishal_dba
5 Replies

2. Shell Programming and Scripting

Perl : not capturing all the data from excel sheet

Hi folks, I am working on assignment that captures all the records(2 columns one column contains names and other contain date of birth) from excel sheet stored in a directory and checks for current date and month. If it matches current date and month then the matched records are printed as... (1 Reply)
Discussion started by: giridhar276
1 Replies

3. Shell Programming and Scripting

capturing selective data from a vcd file

Hi, This is a vcd file.A vcd file may have 'n' modules. 1) I need to capture the data in bold,i.e. the module names (shown in bold) 2) Also i need to capture the data inside each individual module,say for tst_bench_top ,i need to capture data from line 4 to line 20 ... I just want one... (2 Replies)
Discussion started by: veerabahu
2 Replies

4. Red Hat

capturing data of nethogs

I have installed nethogs to see which process is sending load on the network. i would like to know how can i capture its data in a log file. Or is there is a unix command like script or tee which can help me to capture the data using cronjob (0 Replies)
Discussion started by: anshus1
0 Replies

5. Shell Programming and Scripting

Capturing data between patterns

Hii, Friends, I want your help in one of my problem. My problem is as follows. I have a flat file as follows (Just a sample) MHT011 01(DOT)8750707asdfas8609 03(DOT)ASD3453ASD 09(DOT)876JHT87 11(DOT)sfd324ert TTT077 01(MOB)876786klj897 06(MOB)876JHT87 07(MOB)sfd324ert... (4 Replies)
Discussion started by: anushree.a
4 Replies

6. Shell Programming and Scripting

Capturing Particular Data

Hi everyone! Can any one help me out regarding capturing relevant data from a file. For e.g, if i want to capture the comment written after "Prompt:" for a particular date, like for this case what would be the command to capture the tag written after "Prompt:" for Date: 2009-03-20. A... (7 Replies)
Discussion started by: muhmsida
7 Replies

7. Programming

Packet capturing using pcap

Hi, i am using a linux CentOS machine. I have 2 real network interfaces eth0, eth1 and 2 virtual interfaces tap0 and tap1. I am using PCAP library to capture the packets on theses interfaces. If i specify the interface as "any", i cannot find a way to know from which interface the packet... (1 Reply)
Discussion started by: rahulnitk2004
1 Replies

8. UNIX for Dummies Questions & Answers

Keep alive packet for control session in ftp data transfer

I'm new to UNIX. We are using SunOS5.9. In order to maintain the control session active during large file tranfers in ftp, i like to send keep alive packets for every 10 seconds.I like to know the steps to be done to achieve this. Please help me guys.Thanks in advance. (0 Replies)
Discussion started by: rpr
0 Replies

9. Shell Programming and Scripting

Capturing Unix Traceroute data

Hi guys, I need a way to capture the host on the next-to-last hop in a traceroute output. The last output is the destination but I need to capture the router just before the last hop. I can do this in perl but I'm not so sure about Shell... I'm on AIX 5.3 using ksh any ideas? ... (3 Replies)
Discussion started by: TivoliGUY
3 Replies

10. UNIX for Dummies Questions & Answers

Capturing some data from a file into a variable

I have a file with some values in a tab delimted format Eg: 'test' contains: a<tab>b<tab>c<tab>Trk_12345678 now i need to capture this value 'Trk_12345678' into a variable say 'x' and append that value of 12345678 to 12345679 and store is back to a new 'test1' file as : 'test1'... (11 Replies)
Discussion started by: shiroh_1982
11 Replies
Login or Register to Ask a Question