0% found this document useful (0 votes)
69 views

Lab4-Using Wireshark To View Network Traffic

This document describes a lab activity using Wireshark to view network traffic. The objectives are to capture and analyze local and remote ICMP data using Wireshark. Students will ping local and remote hosts and examine the ICMP requests and replies in Wireshark. For the local analysis, students will view MAC and IP addresses within captured frames and compare to their own addresses. For remote analysis, students will ping websites and note the IP addresses received, finding a consistent default gateway MAC address across locations.

Uploaded by

mabrouka gmiden
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views

Lab4-Using Wireshark To View Network Traffic

This document describes a lab activity using Wireshark to view network traffic. The objectives are to capture and analyze local and remote ICMP data using Wireshark. Students will ping local and remote hosts and examine the ICMP requests and replies in Wireshark. For the local analysis, students will view MAC and IP addresses within captured frames and compare to their own addresses. For remote analysis, students will ping websites and note the IP addresses received, finding a consistent default gateway MAC address across locations.

Uploaded by

mabrouka gmiden
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

AlBaha University

Faculty of Computer Science and Information Technology


Department of computer Science

Lab4- Using Wireshark to View Network Traffic

Topology

Objectives
Part 1: Capture and Analyze Local ICMP Data in Wireshark
Part 2: Capture and Analyze Remote ICMP Data in Wireshark

Background / Scenario
Wireshark is a software protocol analyzer, or "packet sniffer" application, used for network troubleshooting,
analysis, software and protocol development, and education. As data streams travel back and forth over the
network, the sniffer "captures" each protocol data unit (PDU) and can decode and analyze its content
according to the appropriate RFC or other specifications.
Wireshark is a useful tool for anyone working with networks and can be used with most labs in the CCNA
courses for data analysis and troubleshooting. In this lab, you will use Wireshark to capture ICMP data packet
IP addresses and Ethernet frame MAC addresses.

Required Resources
 1 PC (Windows 7, 8, or 10with internet access)
 Additional PCs on a local-area network (LAN) will be used to reply to ping requests.

Dr. Sonia BEN BRAHIM Page 1 of 16


Lab - Using Wireshark to View Network Traffic

Part 1: Capture and Analyze Local ICMP Data in Wireshark


In Part 1 of this lab, you will ping another PC on the LAN and capture ICMP requests and replies in
Wireshark. You will also look inside the frames captured for specific information. This analysis should help to
clarify how packet headers are used to transport data to their destination.

Step 1: Retrieve your PC interface addresses.


For this lab, you will need to retrieve your PC IP address and its network interface card (NIC) physical
address, also called the MAC address.
a. Open a command window, type ipconfig /all, and then press Enter.
b. Notethe IP address of your PC interface,its description, and its MAC (physical) address.

c. Ask a team member or team members for their PC IP address and provide your PC IP address to them.
Do not provide them with your MAC address at this time.

Step 2: Start Wireshark and begin capturing data.


a. On your PC, click the Windows Start button to see Wireshark listed as one of the programs on the pop-up
menu. Double-click Wireshark.

Dr. Sonia BEN BRAHIM Page 2 of 16


Lab - Using Wireshark to View Network Traffic

b. After Wireshark starts, click the capture interface to be used.Because we are using the wired Ethernet
connection on the PC, make sure the Ethernet option is on the top of the list.

You can manage the capture interface by clicking Capture and Options:

c. A list of interfaces will display. Make sure the capture interface is checked under Promiscuous.

Dr. Sonia BEN BRAHIM Page 3 of 16


Lab - Using Wireshark to View Network Traffic

Note: We can further manage the interfaces on the PC by clicking Manage Interfaces.Verify that the
description matches what you noted in Step 1b. Close theManage Interfaces window after verifying the
correct interface.

d. After you have checked the correct interface,click Start to start the data capture.

Note: You can also start the data capture by clicking the Wireshark icon in the main interface.

Dr. Sonia BEN BRAHIM Page 4 of 16


Lab - Using Wireshark to View Network Traffic

Information will start scrolling down the top section in Wireshark. The data lines will appear in different
colors based on protocol.

e. This information can scroll by very quickly depending on what communication is taking place between
your PC and the LAN. We can apply a filter to make it easier to view and work with the data that is being
captured by Wireshark. For this lab, we are only interested in displaying ICMP (ping) PDUs. Type icmp in
the Filter box at the top of Wireshark and press Enter or click on the Apply button(arrow sign) to view
only ICMP (ping) PDUs.

Dr. Sonia BEN BRAHIM Page 5 of 16


Lab - Using Wireshark to View Network Traffic

f. This filter causes all data in the top window to disappear, but you are still capturing the traffic on the
interface. Bring up the command prompt window that you opened earlier and ping the IP address that you
received from your team member.

Notice that you start seeing data appear in the top window of Wireshark again.

Dr. Sonia BEN BRAHIM Page 6 of 16


Lab - Using Wireshark to View Network Traffic

Note: If the PC of your team member does not reply to your pings, this may be because thePC firewall of
the team member is blocking these requests. Please see Appendix A: Allowing ICMP Traffic Through
a Firewall for information on how to allow ICMP traffic through the firewallusing Windows 7.
g. Stop capturing data by clicking theStop Capture icon.

Step 3: Examine the captured data.


In Step 3,examine the data that was generated by the ping requests of your team member PC. Wireshark
data is displayed in three sections: 1)The top section displays the list ofPDU frames captured with a summary
of the IP packet information listed; 2)the middle section lists PDU information for the frame selected in the top
part of the screen and separates a captured PDUframe by its protocol layers; and 3) the bottom section
displays the raw data of each layer. The raw data is displayed in both hexadecimal and decimal form.

a. Click the firstICMP request PDU frames in the top section of Wireshark. Notice that the Source column
has your PC IP address, and the Destinationcolumn contains the IP address of the teammate PCthat
you pinged.

Dr. Sonia BEN BRAHIM Page 7 of 16


Lab - Using Wireshark to View Network Traffic

b. With this PDU frame still selected in the top section, navigate to the middle section. Click the plus sign to
the left of the Ethernet II row to view thedestination and source MAC addresses.

Does the source MAC address match your PC interface (shown in Step 1.b)? ______ Yes
Does the destination MAC address in Wireshark match your team member MAC address?
_____ Yes
How is the MAC address of the pinged PC obtained by your PC?
___________________________________________________________________________________
The MAC address is obtained through an ARP request.
Note: In the preceding example of a captured ICMP request, ICMP data is encapsulated inside an IPv4
packet PDU (IPv4 header) which is then encapsulated in an Ethernet II frame PDU (Ethernet II header)
for transmission on the LAN.

Dr. Sonia BEN BRAHIM Page 8 of 16


Lab - Using Wireshark to View Network Traffic

Part 2: Capture and Analyze Remote ICMP Data in Wireshark


In Part 2, you will ping remote hosts(hosts not on the LAN) and examine the generated data from those pings.
You will then determine what is different about this data from the data examined in Part 1.

Step 1: Start capturing data on the interface.


a. Start the data capture again.

b. A window prompts you to save the previously captured data before starting another capture. It is not
necessary to save this data. Click Continue without Saving.

c. With the capture active, ping the following three website URLs:
1) www.yahoo.com
2) www.cisco.com

Dr. Sonia BEN BRAHIM Page 9 of 16


Lab - Using Wireshark to View Network Traffic

3) www.google.com

Note: When you ping the URLs listed, notice that the Domain Name Server (DNS) translates the URL to
an IP address. Note the IP address received for each URL.
d. You can stop capturing data by clicking the Stop Capture icon.

Dr. Sonia BEN BRAHIM Page 10 of 16


Lab - Using Wireshark to View Network Traffic

Step 2: Examining and analyzing the data from the remote hosts.
a. Review the captured data in Wireshark and examine the IP and MAC addresses of the three locations
that you pinged.List the destinationIP and MAC addresses for all three locations in the space provided.
1stLocation: IP: _____._____._____._____ MAC: ____:____:____:____:____:____
2nd Location: IP: _____._____._____._____ MAC: ____:____:____:____:____:____
rd
3 Location: IP: _____._____._____._____ MAC: ____:____:____:____:____:____
IP addresses: 98.139.180.180, 23.13.155.188, 216.58.194.100 (these IP addresses may vary)
MAC address: This will be the same for all three locations. It is the physical address of the default-
gateway LAN interface of the router.
b. What is significant about this information?
____________________________________________________________________________________
The MAC addresses for all three locations are the same.
c. How does this information differ from the local ping information you received in Part 1?
____________________________________________________________________________________
____________________________________________________________________________________
Aping to a local host returnstheMAC address of the PC NIC. A ping to a remote host returns the MAC
address of thedefaultgateway LAN interface.

Reflection
Why does Wireshark show the actual MAC address of the local hosts, but not the actual MAC address for the
remote hosts?
_______________________________________________________________________________________
_______________________________________________________________________________________
MAC addresses for remote hosts are not known on the local network, so the MAC address of the default-
gateway is used. After the packet reaches the default-gateway router, the Layer 2 information is stripped from
the packet and a new Layer 2 header is attached with the destination MAC address of the next hop router.

Appendix A: Allowing ICMP Traffic Through a Firewall


If the members of your team are unable to ping your PC, the firewall may be blocking those requests. This
appendix describes how to create a rule in the firewall to allow ping requests. It also describes how to disable
the new ICMP rule after you have completed the lab.

Dr. Sonia BEN BRAHIM Page 11 of 16


Lab - Using Wireshark to View Network Traffic

Step 1: Create a new inbound rule allowing ICMP traffic through the firewall.
d. From the Control Panel, click the System and Securityoption.

e. From the System and Security window, click Windows Firewall.

f. In the left pane of the Windows Firewall window, click Advanced settings.

Dr. Sonia BEN BRAHIM Page 12 of 16


Lab - Using Wireshark to View Network Traffic

g. On the Advanced Security window, choose the Inbound Rules option on the left sidebar and then click
New Rule… on the right sidebar.

h. This launches the New Inbound Rulewizard. On the Rule Type screen, click the Custom radio button
and click Next

Dr. Sonia BEN BRAHIM Page 13 of 16


Lab - Using Wireshark to View Network Traffic

i. In the left pane, click the Protocol and Ports option and using the Protocol Type drop-down menu,
select ICMPv4, and then click Next.

j. In the left pane, click the Name option and in the Name field, type Allow ICMP Requests. Click Finish.

Dr. Sonia BEN BRAHIM Page 14 of 16


Lab - Using Wireshark to View Network Traffic

This new rule should allow your team members to receive ping replies from your PC.

Step 3: Disabling or deleting the new ICMP rule.


After the lab is complete, you may want to disable or even delete the new rule you created in Step 1. Using
the Disable Ruleoption allows you to enable the rule again at a later date. Deleting the rule permanently
deletes it from the list of inbound rules.
a. On the Advanced Security window, click Inbound Rules in the left pane and then locate the rule you
created in Step 1.

b. To disable the rule, click the Disable Rule option. When you choose this option, you will see this option
change to Enable Rule. You can toggle back and forth between Disable Rule and Enable Rule; the
status of the rule also shows in the Enabled column of the Inbound Rules list.

Dr. Sonia BEN BRAHIM Page 15 of 16


Lab - Using Wireshark to View Network Traffic

c. To permanently delete the ICMP rule, click Delete. If you choose this option, you must re-create the rule
again to allow ICMP replies.

Dr. Sonia BEN BRAHIM Page 16 of 16

You might also like