Lab - Using Wireshark To Examine Ethernet Frames: Mininet Topology
Lab - Using Wireshark To Examine Ethernet Frames: Mininet Topology
Mininet Topology
Objectives
Part 1: Examine the Header Fields in an Ethernet II Frame
Part 2: Use Wireshark to Capture and Analyze Ethernet Frames
Background / Scenario
When upper layer protocols communicate with each other, data flows down the Open Systems Interconnection
(OSI) layers and is encapsulated into a Layer 2 frame. The frame composition is dependent on the media access
type. For example, if the upper layer protocols are TCP and IP and the media access is Ethernet, then the Layer 2
frame encapsulation will be Ethernet II. This is typical for a LAN environment.
When learning about Layer 2 concepts, it is helpful to analyze frame header information. In the first part of this lab, you
will review the fields contained in an Ethernet II frame. In Part 2, you will use Wireshark to capture and analyze
Ethernet II frame header fields for local and remote traffic.
Required Resources
• CyberOps Workstation VM
• Internet Access
© Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 1 of 7 www.netacad.com
Lab – Using Wireshark to Examine Ethernet Frames
© Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 2 of 7 www.netacad.com
Lab – Using Wireshark to Examine Ethernet Frames
Preamble Not shown in capture This field contains synchronizing bits, processed by the NIC
hardware.
Destination Address Broadcast Layer 2 addresses for the frame. Each address is 48 bits long, or 6
(ff:ff:ff:ff:ff:ff) octets, expressed as 12 hexadecimal digits, 0-9,A-F.
A common format is 12:34:56:78:9A:BC.
Source Address IntelCor_62:62:6d
The first six hex numbers indicate the manufacturer of the network
(f4:8c:50:62:62:6d) interface card (NIC), the last six hex numbers are the serial
number of the NIC.
The destination address may be a broadcast, which contains all
ones, or a unicast. The source address is always unicast.
Frame Type 0x0806 For Ethernet II frames, this field contains a hexadecimal value that
is used to indicate the type of upper-layer protocol in the data
field. There are numerous upper-layer protocols supported by
Ethernet II. Two common frame types are:
Value Description
0x0800IPv4 Protocol
0x0806 Address resolution protocol (ARP)
Data ARP Contains the encapsulated upper-level protocol. The data field is
between 46 – 1,500 bytes.
FCS Not shown in capture Frame Check Sequence, used by the NIC to identify errors during
transmission. The value is computed by the sending machine,
encompassing frame addresses, type, and data field. It is verified
by the receiver.
Why does the PC send out a broadcast ARP prior to sending the first ping request?
The PC must determine the MAC address of the device (such as the default gateway) associated
with a known IP address. Since the MAC address is unknown initially, it sends an ARP request as a
broadcast to all devices on the LAN, asking "Who has this IP?". Once the correct device replies with
its MAC, communication (like ping) can proceed.
© Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 3 of 7 www.netacad.com
Lab – Using Wireshark to Examine Ethernet Frames
f4:8c:50
f. What is the IP address of the default gateway for the host H3?
10.0.0.1
Step 2: Clear the ARP cache on H3 and start capturing traffic on H3-eth0.
a. In the terminal window for Node: H3, enter arp -n to display the content of the ARP cache.
[root@secOps analyst]# arp -n
© Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 4 of 7 www.netacad.com
Lab – Using Wireshark to Examine Ethernet Frames
b. If there is any existing ARP information in the cache, clear it by enter the following command: arp -d IP-address.
Repeat until all the cached information has been cleared.
[root@secOps analyst]# arp -n
Address HWtype HWaddress Flags Mask Iface
10.0.0.11 ether 5a:d0:1d:01:9f:be C H3-eth0
c. In the terminal window for Node: H3, open Wireshark and start a packet capture for H3-eth0 interface.
[root@secOps analyst]# wireshark-gtk &
a. In the Packet List pane (top section), click the first frame listed. You should see Echo (ping) request under the Info
heading. This should highlight the line blue.
b. Examine the first line in the Packet Details pane (middle section). This line displays the length of the frame; 98
bytes in this example.
© Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 5 of 7 www.netacad.com
Lab – Using Wireshark to Examine Ethernet Frames
c. The second line in the Packet Details pane shows that it is an Ethernet II frame. The source and destination MAC
addresses are also displayed.
What is the MAC address of the PC’s NIC?
5a:d0:1d:01:9f:be
What is the default gateway’s MAC address?
00:00:00:00:aa:01
d. You can click the arrow at the beginning of the second line to obtain more information about the
Ethernet II frame.
What type of frame is displayed?
Ethernet II
e. The last two lines displayed in the middle section provide information about the data field of
the frame. Notice that the data contains the source and destination IPv4 address information.
What is the source IP address?
10.0.0.13
What is the destination IP address?
10.0.0.1
f. You can click any line in the middle section to highlight that part of the frame (hex and ASCII) in the Packet Bytes
pane (bottom section). Click the Internet Control Message Protocol line in the middle section and examine what
is highlighted in the Packet Bytes pane.
g. Click the next frame in the top section and examine an Echo reply frame. Notice that the source and destination
MAC addresses have reversed, because this frame was sent from the default gateway router as a reply to the first
ping.
What device and MAC address is displayed as the destination address?
The device is H3, and its MAC address is 5a:d0:1d:01:9f:be
© Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 6 of 7 www.netacad.com
Lab – Using Wireshark to Examine Ethernet Frames
Step 7: Examine the new data in the packet list pane of Wireshark.
In the first echo (ping) request frame, what are the source and destination MAC addresses?
Source:
5a:d0:1d:01:9f:be
Destination:
00:00:00:00:aa:01
What are the source and destination IP addresses contained in the data field of the frame?
Source:
10.0.0.13
Destination:
172.16.0.40
Compare these addresses to the addresses you received in Step 5. The only address that
changed is the destination IP address. Why has the destination IP address changed, while the
destination MAC address remained the same?
The destination IP address changed because the packet is now targeting a remote host (172.16.0.40).
However, the destination MAC address remained the same (00:00:00:00:aa:01, the router’s MAC
address) because the packet must first go to the default gateway (router). The router will then
forward it to the remote IP address. This is standard in IP routing: the first hop is always to the
default gateway.
Reflection
Wireshark does not display the preamble field of a frame header. What does the preamble
contain?
The preamble contains a pattern of alternating 1s and 0s (10101010...) used to synchronize the
transmission between the sender and receiver. It is 8 bytes long, with the final byte being the Start
Frame Delimiter (SFD). It is processed by the NIC and is not passed to higher layers, which is why
Wireshark does not display it.
© Cisco and/or its affiliates. All rights reserved. Cisco Confidential Page 7 of 7 www.netacad.com