Wireshark LAB Solution
Wireshark LAB Solution
Lab 07
Introduction to Wireshark
HTTP and DNS on Wireshark
Lab Manual 07
Objectives
• Introduction to Wireshark
• Running Wireshark
• Explore Wireshark Filters
• DNS
• HTTP on Wireshark
• Tracing DNS with Wireshark
Reference Material
Introduction to Wireshark:
Wireshark, a network analysis tool, captures packets in real time and display them in human-
readable format. Wireshark is a powerful tool for understanding what happens behind the scenes
when devices communicate over a network. By focusing on HTTP, you can inspect web traffic,
and with DNS, you can analyze domain lookups—making it essential for troubleshooting,
learning, and securing networks.
Running Wireshark:
When you run the Wireshark program, the Wireshark graphical user interface. Initially, no data
will be displayed in the various windows.
Wireshark Filters
The simplest filter allows you to check for the existence of a protocol or field. If you want to see all
packets which contain the IP protocol, the filter would be "ip" (without the quotation marks).
1. Comparison operators
Fields can also be compared against values. The comparison operators can be expressed either
through English-like abbreviations or through C-like symbols:
eq, == Equal
ne, != Not Equal
gt, > Greater Than
lt, < Less Than
ge, >= Greater than or Equal to
le, <= Less than or Equal to
Example
ip.addr == 10.0.0.1 [Sets a filter for any packet with 10.0.0.1, as either the source or dest]
tcp.time_delta > .250 [sets a filter to display all tcp packets that have a delta time of greater than
250mSec in the context of their stream
4. Logical expressions
Tests can be combined using logical expressions. These too are expressible in C-like syntax or with
English-like abbreviations:
and, && Logical AND
or, || Logical OR
not, ! Logical NOT
Example
ip.addr==10.0.0.1 && ip.addr==10.0.0.2 [sets a conversation filter between the two defined IP
addresses]
!(arp or icmp or stp) [masks out arp, icmp, stp, or whatever other protocols may be background noise.
Expressions can be grouped by parentheses as well. The following are all valid display filter
expressions:
tcp.port == 80 and ip.src == 192.168.2.1
not llc
http and frame[100-199] contains "wireshark"
(ipx.src.net == 0xbad && ipx.src.node == 0.0.0.0.0.1) || ip
Wireshark allows users to capture and filter traffic to focus on specific protocols like HTTP and
DNS. Here's how you can use it:
1. List up to 4 different protocols that appear in the protocol column in the unfiltered
packet-listing window.
ANS:
ANS:
3. Is your browser running HTTP version 1.0 or 1.1? What version of HTTP is the
server running?
1. Locate the DNS query and response messages. Are they sent over UDP or TCP?
ANS:
• Details:
o DNS queries and responses are typically sent over UDP.
o If packet size exceeds 512 bytes, DNS may switch to TCP.
2. What is the destination and source ports for the DNS query message?
3. Examine the DNS query message. What “Type” of DNS query is it? Does the query
message contain any “answers”?
4. Examine the DNS response message. How many “answers” are provided? What does
each of these answers contain?
5. Consider the subsequent TCP SYN packet sent by your host. Does the destination IP
address of the SYN packet correspond to any of the IP addresses provided in the DNS
response message?