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

What's the capture filter equivalent to the display filter "(bootp.option.type == 53)" for DHCP?

asked 10 Nov '13, 18:25

metamatrix's gravatar image

metamatrix
56161619
accept rate: 100%

edited 11 Nov '13, 07:52

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
24.8k1039237


The order of option 53 in the frame, and with that the position, is unknown. As capture filters don't have any protocol intelligence, you can't define a capture filter for a certain DHCP option.

The best thing you can do: Capture all DHCP/BOOTP frames and later use a display filter in Wireshark or tshark to filter only those frames with option 53.

Wireshark display filter

bootp.option.type == 53

Alternatively, you can use tshark with a display filter while you are capturing. Downside: you can't write a capture file (-w not supported with display filters). But you can print whatever fields you may need.

tshark -ni eth0 -Y "bootp.option.type == 53" -T fields -e frame.number -e frame.time -e ip.src -e ip.dst -e bootp.option.type -e bootp.ip.client -e xxxx

Replace xxxx with whatever bootp protocol field you may need.

http://www.wireshark.org/docs/dfref/b/bootp.html

Regards
Kurt

permanent link

answered 11 Nov '13, 07:55

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
24.8k1039237
accept rate: 15%

Thank you,Kurt. If I just want to filter all the DHCP/bootp frames, then what's the appropriate capture filter?

(11 Nov '13, 16:39) metamatrix

udp port 68 or port 67

should work.

(12 Nov '13, 03:53) Kurt Knochner ♦
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:

×349
×44

question asked: 10 Nov '13, 18:25

question was seen: 147,693 times

last updated: 12 Nov '13, 03:53

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