Bab6 Dikompresi
Bab6 Dikompresi
Bab6 Dikompresi
6
CHAPTER
NETWORK DATA
TRAFFIC
Chapter Outline
Introduction 6-4 Filtering
6-1 Protocol Analysis/Forensics Summary
6-2 Wireshark Protocol Analyzer Questions and Problems
6-3 Analyzing Network Data Traffic
Objectives
• Review the TCP/IP suite of protocols • The use of SNMP for the gathering of the sta-
• Introduce the use of netstat for troubleshoot- tistical information from network devices
ing TCP and UDP connections • Introduce the use of NetFlow for acquiring IP
• Introduce the use of the Wireshark network traffic operational data
protocol analyzer • Introduce filtering techniques for analyzing
network data traffic
Key Terms
network forensics SYN ACK management information
Internet sockets ACK base (MIB)
well-known ports UDP snmp community
ICANN netstat [community string]
registered ports ARP SNMPv2
transport layer protocols arp –a SNMPv3
TCP show arp NetFlow
connection-oriented ARP Reply Jflow
protocol Echo Request Sflow
SYN SNMP (SNMPv1) collector
227
INTRODUCTION
This chapter looks at the use of a network protocol analyzer to examine data
packets. Section 6-1 introduces the concept of protocol analysis/forensics.
This section reviews the TCP/IP suite of protocols, the TCP connection states,
and the use of the netstat command. Section 6-2 introduces the use of the
Wireshark protocol analyzer. This section introduces the techniques for us-
ing a protocol analyzer to examine how networking packets are exchanged
in a TCP/IP network. Section 6-3 examines analyzing network data traffic.
The first part of the chapter examines SNMP (Simple Network Management
Protocol). The section concludes with a look at NetFlow, which is used for
acquiring IP traffic operational data in order to provide network and security
monitoring, traffic analysis, and IP accounting. This chapter concludes with
Section 6-4, which looks at filtering the captured data packets. Data capture
files can be quite large and it often requires that the network administrator
search the capture files to find specific information. This section examines
techniques to filter the captured data packets using Wireshark.
TCP Connection
Host Host
HTTP(80)
A B
Payload
Before any TCP connection is made, a TCP three-way handshake must happen to
SYN initiate the connection. A TCP three-way handshake is a unique sequence of three
Synchronizing packet. data packets exchanged at the beginning of a TCP connection between two hosts, as
SYN+ACK shown in Figure 6-3. This sequence is as follows:
Synchronizing 1. The SYN (Synchronizing) packet
Acknowledgment packet.
2. The SYN+ACK (Synchronizing Acknowledgment) packet
ACK
Acknowledgment packet. 3. The ACK (Acknowledgment) packet
LISTEN
SYN = 1, Seq. # = X
SYN-SENT
SYN = 1, Seq. # = Y
SYN-RECEIVED
ACK = 1, Ack. # = X+1
ESTABLISHED
ESTABLISHED
The host initiating the connection will send a synchronizing packet (SYN). The
SYN flag is set in the TCP flags field. In this example, Host A issues a SYN packet
to initiate the TCP handshake. The SYN will have a sequence number (SEQ) as-
sociated with it. In the example shown in Figure 6-3, the sequence number is x.
The sequence number is used to keep track of the data packets being transferred
from Host A to Host B. The length of the packet being sent by Host A is 0 (LEN 0),
which indicates that the packet contains no data. At this point, Host A changes its
TCP state to SYN-SENT.
In packet 2, Host B replies with a SYN+ACK packet. Both SYN flag and ACK flag
are set in the TCP flags field. The ACK is an acknowledgment that Host B received
the packet from Host A. A number is attached to the ACK with a value of (x + 1)
that should be the sum of the SEQ# from packet 1 plus the length (LEN) of packet
1. Recall that the length of packet 1 is 0 (LEN 0), but packet 1 counts as one packet;
therefore, Host B replies with an acknowledgment of packet 1 sequence number
plus 1 (x + 1). This acknowledgment notifies Host A that the packet (packet 1) was
received. Packet 2 from Host B will also have a sequence number issued by Host B.
In this packet, the sequence number has a value of y. This sequence number is used
to keep track of packets transferred by Host B. When this happens, Host B changes
its TCP state from LISTEN to SYN-RECEIVED.
In packet 3, Host A acknowledges the reception of Host B’s packet. The ACK num-
ber is an increment of one higher than the SEQ# sent by Host B in packet 2 (y + 1).
Host A also sends an updated SEQ# that is one larger than the SEQ# Host A sent
in packet 1 (x + 1). Remember, Host A and Host B each have their own sequence
numbers. Host A changes its TCP state to ESTABLISHED and, upon receiving the
ACK packet from Host A, Host B changes its TCP state to ESTABLISHED as well.
A B
State State
ESTABLISHED ESTABLISHED
LISTEN
FIN =1
FIN-WAIT-1
ACK =1
CLOSE-WAIT
FIN-WAIT-2
FIN =1
LAST-ACK
ACK =1
TIME WAIT
CLOSED
CLOSED
Both Host A and B are in the TCP ESTABLISHED state. Host A sends a FIN
packet to Host B indicating the data transmission is complete. This puts Host A in
a FIN-WAIT-1 TCP state. Host B responds with an ACK packet acknowledging the
reception of the FIN packet. It signals its application to close the connection and
put itself in a CLOSE-WAIT state. Host A receives an ACK from Host B and for
another FIN packet, and it changes its state to FIN-WAIT-2. Host B then sends Host
A a FIN packet when its application is closed, indicating the connection is being
terminated. At this point, Host B is in the LAST-ACK state. Host A replies with an
ACK packet and changes its state to TIME-WAIT. Upon receiving an ACK, Host
B’s TCP state becomes CLOSED. Table 6-2 summarizes and briefly explains the
TCP connection state.
State Description
LISTEN The host is listening and ready to accept connections.
SYN-SENT The first SYN sent to establish the connection indicates active
open.
SYN-RECEIVED The receiving host receives and acknowledges the SYN.
ESTABLISHED The connection is fully established.
FIN-WAIT-1 The terminating host sends the FIN to terminate the connection
indicates active close.
CLOSE-WAIT The receiving host acknowledges the FIN.
FIN-WAIT-2 The terminating host receives the acknowledgment from the
receiving host.
LAST_ACK The receiving host sends its own FIN to signal the end and wait for
the acknowledgment.
TIME-WAIT The terminating host acknowledges the last FIN and waits for the
connection to close.
CLOSED Connection is closed.
The User Datagram Protocol (UDP) is a connectionless protocol. This means that
UDP
UDP packets are transported over the network without a connection being estab-
User Datagram Protocol.
lished and without any acknowledgment that the data packets arrived at the desti-
A connectionless
nation. UDP is useful in applications such as videoconferencing and audio feeds, protocol that transports
where such acknowledgments are not necessary. data packets to a
Figure 6-5 shows the UDP datagram. It is much simpler than TCP datagram with connection being
established and without
only 8 Bytes of header. Often times, UDP and TCP co-exist in the same application.
any acknowledgment
Many of these applications use TCP to initiate the connection and then use UDP to
that the data packets
deliver connectionless packets. No acknowledgments are sent back from the client. arrived at the
UDP does not have a procedure for terminating the data transfer; either the source destination.
stops delivery of the data packets or the client terminates the connection.
0 4 8 12 16 20 24 28 32 bit
Payload
The preceding output shows all the TCP and UDP connections associated with the
host (172.16.101.7). The Proto column is the connection protocol (TCP or UDP).
The local address is the IP address followed by the port number of the local host
connection immediately following the colon (:) . The Foreign Address is the remote
host and its port, of which the connection belongs. The State is the TCP state of the
connection as previously discussed in the TCP handshakes. Note that UDP does
not have any state. When the connection is in the LISTENING state, the local host
is listening on that port and ready to receive connections. In this state, the local
address will display either 0.0.0.0, which means it is listening on all network inter-
faces (second NIC, modem, tunnel), or 127.0.0.1, which means it is only listening
for connections from the local host itself, or its IP address (172.16.101.7), which
means it is listening for connections from the network.
Active Connections
0 4 8 12 16 20 24 28 32 bit
224Bits
Source Protocol IP Address
(28 Bytes)
Destination Hardware Address
An ARP request is issued on the LAN as a broadcast, which means this message is
being sent to all computers in the local-area network. Additionally, an ARP request
is generated for every network device if the MAC address is not known. This is why
ARP is one of the most seen protocols on a local network. The destination computer
sends an ARP reply back to the source with its MAC address. The ARP request
is sent back as a unicast packet. The ARP conversations are illustrated in the next
section with the Wireshark protocol analyzer. In typical cases, the owner of the IP
address replies to the message, but this is not always the case. Sometimes, another
networking device, such as a router, can provide the MAC address information. In
that case, the MAC address being returned is for the next networking device in the
route to the destination.
To help reduce the amount of ARP broadcast traffic on the network, a network
host or device is generally equipped with an ARP cache. When a destination host
The output may contain different information and may display in different formats
depending on the operating system. The ARP output previously listed shows the show arp
IP addresses and their associated MAC addresses. Along with these, the hostname The command to view
will be displayed if the IP address has a DNS hostname. The ARP cache can also the ARP cache on Cisco
switches and routers.
be viewed on network devices, such as routers and switches. On Cisco routers, the
command to display the ARP cache entries is show ip arp or show arp, as shown
here:
et477-router#sh arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 192.168.247.10 0 a4ba.db1d.190e ARPA Vlan100
Internet 192.168.246.95 3 0018.8b22.9141 ARPA Vlan100
Internet 192.168.245.135 0 0023.ae8a.0831 ARPA Vlan100
Internet 192.168.245.246 216 001e.7aa3.0980 ARPA Vlan30
Internet 192.168.245.242 236 001e.7aa3.0980 ARPA Vlan30
Internet 192.168.245.226 54 000f.8f5d.86e0 ARPA Vlan10
Internet 192.168.245.227 96 000f.8f5d.86e0 ARPA Vlan10
Similar to the ARP output from Linux, the ARP output from the router shows the IP
address, MAC address, and the interface where an ARP entry is learned. Additional
information associated with the show arp command is the age of each ARP entry.
This information is displayed in minutes under the Age (min) column.
ICMP The Internet Control Message Protocol (ICMP) is used to control the flow
of data in the network, to report errors, and to perform diagnostics. Figure 6-7 illus-
trates the ICMP packet. Depending on the type, each ICMP packet serves different
functions. For example, a networking device, such as a router, can send an ICMP
source-quench packet to a host that requests a slowdown in the data transfer. The
ICMP packet then will have the type of 4.
0 4 8 12 16 20 24 28 32 bit
ping is the most common tool used in troubleshooting connectivity on the net-
work. Ping is available on every operating system and on most network devices by
default. A general ping command format is ping hostname/ip address. There are
options that can be used with ping, and these can vary depending on the OS. For
example, there is an option to change the size of the default ICMP packet. This op-
tion is –l for Windows and is –s for the Mac and Linux machines. This option is
useful when trying to simulate bigger size packets and test respond time. Another
useful option is –t, which will allow a continuous ping to the target in a Windows
environment. Typically, Windows sends only four ICMP packets whereas Linux
and Mac machines will send continuous ICMP packets until it is stopped.
Ping is also available on routers and switches. On Cisco routers, one can get more
use of a ping command by using the extended ping option. Typically, a router has
multiple network interfaces. When a ping command is executed, it will use the in-
terface where the packet exits as its source IP address. The extended ping on Cisco
gives users the option to choose a different source IP address. This comes in handy
when testing out connectivity from a different network. Extended ping provides
more ways to perform advanced check of host reach ability and network connectiv-
ity. To do this, simply enter ping at the router prompt and press return. By doing
this, step-by-step extended options will be provided to users. When the extended
ping command is used, the source IP address can be changed to any IP address on
the router. Also, the extended ping command works only at the privileged EXEC
command line. The following is an example of how the extended ping is executed
on a Cisco router:
et477-gate#ping
Protocol [ip]:
Once you open the Ch6-1.cap capture in WireShark, you should see the captured
packets displayed on the detail view screen, as shown in Figure 6-8.
FIGURE 6-8 The captured packets showing the ping from computer 1 to computer 2
In this example, the information on the screen is showing the transfer of packets
that occurs when one computer pings another. In this case, computer 1 pinged com-
puter 2. The MAC and IP addresses are listed for your reference in Table 6-3.
FIGURE 6-9 Computer 2 replying with its MAC address back to computer 1
Echo Request
Figure 6-10 shows computer 1 sending an echo request directly to computer 2.
Part of the ICMP protocol
An echo request is the part of the ICMP protocol that requests a reply from a com-
that requests a reply
puter. Notice in the echo request that the destination address is 00-10-A4-13-6C-6E from a computer.
(computer 2’s MAC address), and the source is 00-10-A4-13-99-2E (computer 1’s
FIGURE 6-12 Initializing Wireshark to capture data packets from your network
To open a saved capture file, click File > Open or click Open from the Wireshark
home screen.
To change capture options, click Capture > Options to change the options to your
preferred settings.
Configuring SNMP
The first step for configuring SNMP on a Cisco router is to enter the router’s con-
figuration mode using the conf t command:
RouterB#conf t
Enter configuration commands, one per line. End with CNTL/Z.
From the router’s (config)# prompt, enter the command snmp community [commu-
nity string] [permissions]. The community string can be any word. The permissions snmp community
field is used to establish whether the user can read only (ro), or read and write (rw). [community string]
The options for configuring SNMP on the router are shown here: SNMP Community string
is a user ID or password
RouterB(config)#snmp community ? that allows access to
WORD SNMP community string a network device’s
statistics.
The router was connected to the computer running the SNMP management soft-
ware, as shown in Figure 6-15. The router’s configuration mode was entered, and
the snmp community public ro command was issued. The word public is used as
the community string. The community string is the password used by the SNMP
software to access SNMP (port 161) on the router. The ro sets the permission to
read only:
RouterB(config)#snmp community public ro
In the next example, the community string password is set to makesecret, and the
permission is set to read write (rw). Once again, the router’s (config)# mode is en-
tered and the command snmp community makesecret rw is entered:
RouterB(config)#snmp community makesecret rw
The configuration for SNMP can be verified using the show run command from
the router’s privileged mode prompt. A portion of the configuration file that lists the
SNMP configuration for the router is shown here:
RouterB#sh run
.
.
Figure 6-15 shows the setup of the configured router and the computer running the
SNMP management software. The SNMP management software issues the SNMP
message to the router at port 161, and the router returns the response.
port 161
MIB SNMP
Management
response Software
10.10.10.1 "string-makesecret"
FIGURE 6-15 The setup for connecting the SNMP management software tool to the router
Figure 6-16 shows another example of using SNMP to obtain interface informa-
tion about a router. The SNMP manager was configured with the host IP address
of 10.10.10.1, a set value (port #) of 161, and the 10 character community string of
makesecret shown as * * * * * * * * * *. The MIB’s object (ifspeed) was sent to
the router and a status for each of the interfaces was provided. The data displayed
shows the speed settings for the router’s interfaces.
FIGURE 6-16 Using an SNMP software management tool to obtain interface speed settings
The SNMP management program collecting the statistics keeps track of the time
interval between measurements and the number of octets that have passed. This
information can be used to calculate the average traffic flow by hour, day, week, or
month, depending on the information needed. A final note about the router’s coun-
ter: The counter does not reset unless the router is rebooted.
Two other versions of SNMP have been developed for network management. These
SNMPv2
versions are SNMPv2 and SNMPv3. SNMPv2 was developed in 1993; however, this
version was not directly compatible with SNMPv1. SNMPv2 attempted to address Simple Network
Management Protocol
security issues, but this led to the development of many variants and SNMPv2
version 2.
was never fully accepted by the networking industry. One of the variants called
SNMPv2c (Community-based SNMP version 2) was adopted more widely than the SNMPv3
others. SNMPv3 was developed in 1998 and achieved the important goal of main- Simple Network
taining compatibility with SNMPv1 and adding security to SNMP. The security Management Protocol
features of SNMPv3 include confidentiality, integrity, and authentication. Confi- version 3.
dentiality means the packets are encrypted to prevent snooping; integrity ensures
the data being transferred has not been tampered with; and authentication means
An example was presented that shows how to obtain the number of octets leaving
a router. This type of information can be used in a campus network to monitor the
flow of data for many points in the network. Statistics can be obtained for hourly,
daily, weekly, and monthly data traffic. This section discusses plots of network
router utilization obtained via the router’s SNMP port.
Figure 6-18 is a plot of a router’s hourly data traffic. The plot shows the average
number of bits coming into the router and the average number of bits out. The net-
work administrator should become familiar with the typical hourly data traffic pat-
tern for their network. Notice the decrease in data traffic in the early morning and
the dramatic increase in data traffic around 12:00. The traffic clearly shows some
type of disturbance around 12:00. The plot is showing that the bit rate significantly
increases for a few minutes. This is not necessarily a problem, but it is something
that a network administrator will want to watch.
In this case, the network administrator looked at the daily log of network activity
for the same router. This plot is shown in Figure 6-19. The cycle of the data traffic
from morning to night is as expected, heavy data traffic about noon and very low
data traffic in the mornings. An interesting note is the noon data traffic spikes on the
first Wednesday and then repeats the following Wednesday. Whatever is causing the
Sometimes, the graph of the network traffic over a longer period of time is needed.
Figure 6-20 shows the data traffic through the router over a six-week period. The
traffic shows some consistency except for a change from week 11 to week 12. Most
likely, this can be explained by examining the network trouble reports and mainte-
nance logs to see if this router was briefly out of service.
Justifying the expansion of a network’s capability (for example, higher data rate or
better core or distribution service) requires showing the manager data traffic statis-
tics. Figure 6-21 is a plot of the router’s monthly data traffic. The summer shows a
significant decrease in data traffic. The plot also shows that the network was down
once in the June–July period and again in January. The manager wants to know if
there is justification to increase the data rate of the router to 1 gigabit (1 GB). (The
router’s current data rate is 100 Mbps.) Is there justification to upgrade the router
to 1 GB? Probably not, at least not immediately. The maximum measured average
data rate is about 16 Mbps. The router’s 100 Mbps data rate does not seem to be
causing any traffic congestion problems.
This section showed how keeping logs of data traffic can be used to spot potential
network problems and help plan for possible future expansion of the network.
NetFlow NetFlow
Used to acquire IP traffic SNMP allows for the gathering of the statistical information from network devices;
operational data in order however, it does not dive deep into IP information, such as source, destination, or
to provide network and protocol of each data packet. NetFlow allows for such data collection. Contrasted
security monitoring,
to SNMP, NetFlow is a push technology where NetFlow data is pushed from a net-
traffic analysis, and IP
accounting.
work device to a collector. NetFlow was created by Cisco in 1996 for acquiring IP
traffic operational data in order to provide network and security monitoring, traffic
analysis, and IP accounting. Currently, there are 10 versions of NetFlow. NetFlow
version 5 is the most common version deployed on many network devices from
different vendors. NetFlow version 9 is the first version to support IPv6 and that
version is now standardized by the IETF to NetFlow version 10 or Internet Protocol
Flow Information Exchange (IPFIX).
Even though NetFlow was developed by Cisco, it is not Cisco proprietary protocol.
Jflow Many network vendors have adopted NetFlow to collect their IP traffic flow statistics.
Juniper’s IP traffic flow Nonetheless, there are still variants of the NetFlow protocol available to the public.
technology. For example, Jflow is Juniper’s IP traffic flow technology. It is similar to NetFlow ver-
Sflow sion 5; however, it is a flow sampler technology, which samples the number of pack-
A traffic flow technology ets as defined in the router configuration. Created by InMon, Sflow (Sampled Flow) is
developed by InMon. another traffic flow technology. Similar to Jflow, Sflow is also a sampling technology
that is designed to collect a large scale of statistical network information. It has many
performance counters that it is collecting, which is different than information col-
lected from NetFlow and Jflow. It can be thought of as SNMP on steroids. Its main
deployment is in high-speed switched networks with big support from HP, Extreme,
and Alcatel. Sflow is not compatible with NetFlow or Jflow.
There is one thing that all these flow technologies have in common: All the flow
Collector information has to be exported or sent to the collector. The collector stores and ana-
Stores and analyzes the lyzes the flow information. There are many flavors of Flow collector software avail-
flow information. able. Some of them can even collect all different type of flows (NetFlow, Jflow, and
Sflow) and are able to correlate information among them. A final note on any flow
technologies is that, because it is a push technology from a network device itself,
enabling flow could increase the CPU utilization of the device. This is true espe-
cially if the device is a busy router with heavy load of network traffic. One should
The NetFlow information can be verified with a show command. The command
show ip flow export shows the NetFlow configuration and its basic statistics. Note
that all the flow information has to be sent to the collector. The collector stores and
analyzes the flow information. There are many flavors of Flow collector software
available. Some of them can even collect all information.
RouterA#sh ip flow export
Flow export v5 is enabled for main cache
Exporting flows to 10.10.101.19 (5000)
Exporting using source interface Loopback0
Version 5 flow records
4196949232 flows exported in 139898308 udp datagrams
138 flows failed due to lack of export packet
178 export packets were sent up to process level
0 export packets were dropped due to no fib
0 export packets were dropped due to adjacency issues
0 export packets were dropped due to fragmentation failures
0 export packets were dropped due to encapsulation fixup failures
6-4 FILTERING
Data capture files can be quite large, and it often requires that the network admin-
istrator search the capture files to find specific information. This could require
searching for a specific IP address, or possibly the contents of a file transfer, or
searching for a network problem. This section examines several filtering techniques
that are available with Wireshark, which include the following:
1. Typing in the display filter
2. Apply saved display filters
3. Right-click filtering
4. Apply conversation filters
FIGURE 6-22 Screenshot of 6-2.cap file showing the location of the filter button
FIGURE 6-25 The addition of the IP only filter to the Wireshark: Display Filter menu
FIGURE 6-26 The addition of the ip = = 10.10.5.2 filter to the Wireshark: Display Filter
menu
Click the Apply button and only data packets with the IP address 10.10.5.2 are dis-
played. The result of applying the ip.addr = = 10.10.5.2 filter is shown in Figure
6–27. Notice that only data packets containing the IP address 10.10.5.2 are dis-
played.
Notice that the Filter String box will change color according to the syntax error
checker. The text box is highlighted green, meaning that the entered filter is the
correct syntax and will produce an output. If an error exists then the text box turns
from green to red. This is a built in error checker that Wireshark uses on its filters.
The red indicates that incorrect syntax is being input. Any enabled display filters
can be cleared at any time using the Clear button on the filter bar.
Another technique for filtering is by right-mouse button clicking the packet you
are interested in. For example, right-mouse button click packet 5 from 6-2.cap.
Select Conversation Filter and IP, as shown in Figure 6-28. This produces the
same results as generated using the ip.addr = = 10.10.5.2 filter. The result is the fil-
tered output showing any traffic that is sent in or out of the machine with the IP of
10.10.5.2. This result is shown in Figure 6-29.
Click Apply, and the packet list is thinned out to 15 total packets relating to the
FTP protocol, as shown in Figure 6-31. From this, we are able to view the username
and password used to establish the FTP connection. In this case, the username and
passwords are listed in plaintext, as well as the file that was accessed. Most times, a
secure version of FTP (SFTP) will be used and this information will be encrypted.
This same rule can also be applied by using the right-click method as previously
shown.
Find a packet that is using the FTP protocol (for example, packet 44). Navigate to
the datagram field and select the FTP row. Right click -> Apply as Filter -> Se-
lected. This will generate the same results provided in Figure 6-32 that are used for
the FTP filter.
FIGURE 6-32 An example of using the right-mouse button click to filter the FTP data
FIGURE 6-33 An example of extracting the data packets from a capture file
Figure 6-33 shows that packet 34 is selected and the FTP data field is expanded.
The boxed area shows the first part of the txt file that was transferred. The user can
scroll right and read more. Each packet is only 1460 bytes so a text file, even a rela-
tively short one, will be split up in multiple packets. This example text file is only
split into four components, but it is a very small text file. When transferring video
or audio files over FTP, the files can get large, and there will be many more packets
to be examined.
In some cases, the network administrator might find it useful to filter out one or
more sets of packets at the same time. For this, the ...or Selected option will be
used. In this example, we want to filter the ARP and DHCP data traffic pertaining
to releasing and renewing an IP address. To start the exercise, open the 6-DHCP.cap
file located in the Chapter 6_Wireshark folder. Both ARP data and the DHCP data
will need to be analyzed, so we need to prepare a filter that will show us both of
these types of data packets. Begin by selecting an ARP packet and, in the datagram
field, right-click -> Prepare a filter -> ...or Selected. This puts ARP in the filter
string box, but we also need DHCP information. Highlight a DHCP packet and do
the same as before. In the datagram field, right-click -> Prepare a filter -> ...or
Selected. Notice the filter string box now and its inclusion of both sets of filter
strings and the newly added or logical operator:
(arp) || (dhcpv6)
This filter string is used to search for both ARP or DHCPv6 packets. Figure 6-35
shows the newly sorted packet list with only ARP and DHCPv6 Solicit information.
Another possibility is to use the Not Selected operator. The objective in this case
is to remove protocols one by one that do not pertain to what we need to analyze.
For this, you would use the Not Selected operator. Start by opening the 6-2.cap
file. Next, remove all occurrences of the NBNS protocol. Select an NBNS packet
and in the datagram field right-click -> Prepare a filter -> ...or not Selected. Next,
find and select an EIGRP data packet and in the datagram field and right-click ->
Prepare a filter -> ...and not Selected. The resulting filter string will list (!(stp))
&& !(eigrp). Apply the filter. All occurrences of STP or EIGRP data packets are
removed.
Filtering DHCP
In this exercise, you learn how to filter DHCP packets from a CAP file in Wire-
shark. You will be using the DHCP.cap file found in the Wireshark folder provided
in the companion CD. The filtering method used for this exercise will be typing
in the display filter. Open Wireshark and open the DHCP.cap file. As you can see
there is a lot of data traffic that was captured in this CAP file. To filter out DHCP,
you must type in bootp in the filter textbox, as shown in Figure 6-36. (Note: This
is case sensitive; do not use BOOTP). The field name for BOOTP can be found by
clicking Expression and scrolling until you see the BOOTP/DHCP filter option.
To apply the bootp filter to the DHCP.cap file, click Apply. What should be dis-
played in the packet pane list? You should only see the DHCP protocol data packets
displayed, as shown in Figure 6-37.
FIGURE 6-37 A screenshot of the DHCP.cap file with the DHCP protocol filtered in the
packet list pane
Section 6-2
29. Expand the acronym ARP.
30. What is the purpose of an ARP request?
31. Expand the acronym ICMP.
32. What is an echo request?
33. What is the purpose of a protocol analyzer?
Included on the companion CD-ROM in the Wireshark capture file folder is a
network packet capture file called Packet11a.cap. Open this file using Wire-
shark. The following five questions refer to this file.
34. What are the MAC addresses of the computers involved?
35. Which IP addresses correspond to each MAC address?
36. Which packet IDs correspond to ARP requests?
37. Which packet IDs correspond to ARP replies?
38. Which computers are pinging which computers?
39. In terms of computer security, a switch offers better security than a hub. Why
is this?
Section 6-4
64. A filter with the ip.addr = = 10.10.10.1 filter is applied to captured network
data traffic. What happens?
65. What filter could be used to display on data packets containing the IP address
192.168.12.5?
66. What filter could be used to only display data files containing the FTP
protocol?
67. What is the purpose of the FTP-DATA filter?
68. What is the purpose of applying the (arp) || (dhcpv6) filter?
69. List a filter to remove all occurrences of STP or EIGRP.
70. List a filter to remove all occurrences of ARP or ICMP.
71. List a filter that can be used to display only data packets containing the IP ad-
dress 208.76.11.230?
Critical Thinking
72. Use the Wireshark protocol analyzer to capture a file transfer to a TFTP server.
Prepare a report on your findings. Identify the port used to establish the TFTP
transfer and the source and destination ports used for the TFTP file transfer.
73. Repeat problem 72 for loading a file from a TFTP server.
74. Open the sample wireless capture.pcap file provided in the Chapter 6 Wire-
shark folder in the textbook CD. Search for the 74.125.239.27 IP address.
Describe what is happening at this address.
75. When issuing a command netstat -an on a server, there are a lot of TCP state of
SYN-RECEIVED and ESTABLISHED showing. Should there be any concerns
with what netstat is reporting?