This is our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

I've been trying to get both IP address and hostname with tshark. From Wireshark it is easy, but from tshark I couldn't figure out how to do it. "-z ip_hosts,tree" parameter just give the IP Addresses even when I specify "-N n" parameter. How can I get this IP addresses and hostnames together?

By the way -z hosts does not give all IPs and hostnames, sometimes does not give anything at all.

asked 30 Jul '15, 07:08

xmikro's gravatar image

xmikro
11225
accept rate: 0%


Try the -T and -e options. For example:

-T fields -e ip.addr

permanent link

answered 30 Jul '15, 09:25

Amato_C's gravatar image

Amato_C
1.1k142032
accept rate: 14%

Thanks! tshark -T fields -e ip.dst_host -e ip.dst is just what I wanted. But do you have any idea why -z hosts parameter does not work?

(31 Jul '15, 00:39) xmikro
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×832
×178
×7
×1

question asked: 30 Jul '15, 07:08

question was seen: 3,244 times

last updated: 31 Jul '15, 00:39

p​o​w​e​r​e​d by O​S​Q​A