Lab Ethernet Homework
Lab Ethernet Homework
Objective
To explore the details of Ethernet frames. Ethernet is a popular link layer protocol that is covered in 4.3
of your text; modern computers connect to Ethernet switches (4.3.4) rather than use classic Ethernet
(4.3.2). Review section 4.3 before doing this lab.
Requirements
Wireshark: This lab uses the Wireshark software tool to capture and examine a packet trace. A packet
trace is a record of traffic at a location on the network, as if a snapshot was taken of all the bits that
passed across a particular wire. The packet trace records a timestamp for each packet, along with the
bits that make up the packet, from the lower-layer headers to the higher-layer contents. Wireshark runs
on most operating systems, including Windows, Mac and Linux. It provides a graphical UI that shows the
sequence of packets and the meaning of the bits when interpreted as protocol headers and data. It color-codes packets by their type, and has various ways to filter and analyze packets to let you investigate
the behavior of network protocols. Wireshark is widely used to troubleshoot networks. You can download it from www.wireshark.org if it is not already installed on your computer. We highly recommend
that you watch the short, 5 minute video Introduction to Wireshark that is on the site.
ping: This lab uses ping to send and receive messages. ping is a standard command-line utility for
checking that another computer is responsive. It is widely used for network troubleshooting and comes
pre-installed on Window, Linux, and Mac. While ping has various options, simply issuing the command
ping www.bing.com will cause your computer to send a small number of ICMP ping requests to
the remote computer (here www.bing.com), each of which should elicit an ICMP ping response.
Proceed as follows to capture a trace of ping packets; alternatively you may use a supplied trace. We will
use ping simply as an easy way to collect a small trace. Perhaps surprisingly, you can capture a trace for
this lab from a computer connected to the Internet using either wired Ethernet or wireless 802.11.
1. Pick a remote web server or other publicly reachable Internet host and use ping to send some
ping messages and check that it sends replies. For example, ping www.bing.com. You
should see several replies indicating that the pings reached the remote host and were returned.
The figure below shows a successful example. Note that some versions of ping will continue to
bounce messages off of a remote server until you tell the program to stop by signaling it with
^C. If your ping test does not succeed then try another server.
2012 D. Wetherall
2012 D. Wetherall
2012 D. Wetherall
Figure 3: Trace of ping traffic, showing Ethernet details of the first packet
Select any packet in the trace (in the top panel) to see details of its structure (in the middle panel) and
the bytes that make up the packet (in the bottom panel). Now we can inspect the details of the packets.
In the figure, we have selected the first packet in the trace. Note that we are using the term packet in
a loose way. Each record captured by Wireshark more correctly corresponds to a single frame in Ethernet format that carries a packet as its payload; Wireshark interprets as much structure as it can.
In the middle panel, expand the Ethernet header fields (using the + expander or icon) to see their details. Our interest is the Ethernet header, and you may ignore the higher layer protocols (which are IP
and ICMP in this case). You can click on the Ethernet header to see the bytes that correspond to it in the
packet highlighted in the bottom panel. We have performed both steps in the figure.
If you are capturing traffic over an 802.11 interface, you may wonder why you have an Ethernet header
at all, instead of an 802.11 header. This happens because we asked Wireshark to capture packets in
CN5E Labs (1.0)
2012 D. Wetherall
Ethernet format on the capture options (in Figure 2). In this case, the OS software converted the real
802.11 header into a pseudo-Ethernet header. We are seeing the pseudo-Ethernet header.
Compare the fields you see with the picture of an Ethernet frame in Fig. 4-14 of your text. You will see
both similarities and differences:
There are two kinds of Ethernet shown in your book, IEEE 802.3 and DIX Ethernet. IEEE 802.3 is
rare and you are not likely to see it. The frames in the figure and likely your capture are DIX
Ethernet, called Ethernet II in Wireshark.
There is no preamble in the fields shown in Wireshark. The preamble is a physical layer mechanism to help the NIC identify the start of a frame. It carries no useful data and is not received
like other fields.
There is a destination address and a source address. Wireshark is decoding some of these bits in
the OUI (Organizationally Unique Identifier) portion of the address to tell us the vendor of the
NIC, e.g., Dell for the source address.
There is a Type field. For the ping messages, the Ethernet type is IP, meaning the Ethernet payload carries an IP packet. (There is no Length field as in the IEEE 802.3 format. Instead, the
length of a DIX Ethernet frame is determined by the hardware of a receiving computer, which
looks for valid frames that start with a preamble and end with a correct checksum, and passed
up to higher layers along with the packet.)
There is no Data field per se the data starts with the IP header right after the Ethernet header.
There is no pad. A pad will be present at the end if the frame would otherwise be less than 64
bytes, the minimum Ethernet frame size.
There is no checksum in most traces, even though it really does exist. Typically, Ethernet hardware that is sending or receiving frames computes or checks this field and adds or strips it. Thus
it is simply not visible to the OS or Wireshark in most capture setups.
There are also no VLAN fields such as the Tag shown in Fig. 4-49. If VLANs are in use, the VLAN
tags are normally added and removed by switch ports so they will not be visible at host computers using the network.
To show your understanding of the Ethernet frame format, draw a figure of the ping message that shows
the position and size in bytes of the Ethernet header fields. Your figure can simply show the frame as a
long, thin rectangle. The leftmost fields come first in the packet and are sent on the wire first. On this
drawing, show the range of the Ethernet header and the Ethernet payload. Add a dashed box at the end
to represent the 4-byte checksum; we know it is there even if Wireshark does not show us this field.
To work out sizes, observe that when you click on a protocol block in the middle panel (the block itself,
not the + expander) then Wireshark will highlight the bytes it corresponds to in the packet in the lower panel and display the length at the bottom of the window. You may also use the overall packet size
shown in the Length column or Frame detail block.
Turn-in: Hand in your drawing of an Ethernet frame.
2012 D. Wetherall
2012 D. Wetherall
Figure 4: IEEE 802.3 frames with Ethernet and LLC header detail
Have a look at the details of an IEEE 802.3 frame, including the LLC header. The figure shows the details
for our trace. Observe that the Type field is now a Length field. In our example, the frame is short
enough that there is also padding of zeros identified as a Trailer or Padding. The changes lead to a few
questions for you to ponder:
CN5E Labs (1.0)
2012 D. Wetherall
1. How long are the combined IEEE 802.3 and LLC headers compared to the DIX Ethernet headers?
You can use Wireshark to work this out. Note that the Trailer/Padding and Checksum may be
shown as part of the header, but they come at the end of the frame.
2. How does the receiving computer know whether the frame is DIX Ethernet or IEEE 802.3? Hint:
you may need to both use Wireshark to look at packet examples and read your text near where
the Ethernet formats are described.
3. If IEEE 802.3 has no Type field, then how is the next higher layer determined? Use Wireshark to
look for the demultiplexing key.
Turn-in: Your answers to the above questions.
[END]
2012 D. Wetherall