Ethernet Protocol Debugging Guide
Ethernet Protocol Debugging Guide
com
Introduction
The Internet changes the way we work and play by providing All references to the MSO/DPO4000B with DPO4ENET in
instant information and worldwide access to products and this application note refer to the MSO/DPO4000B Series
services. The Internet is a global network of computers that Oscilloscope with the DPO4ENET Serial Application Module.
can communicate with each other using Internet Protocol The Internet example used in this application note is a laptop
Suite standards. Because of the Internet popularity and its computer running Microsoft Internet Explorer (IE) that uses the
ease of use there is a growing number of embedded products Internet to control an instrument. In this case the instrument
from cameras to instruments that are connected to the is a second MSO4104B that operates as an embedded
Internet. Designing these embedded products is challenging web server.
and time consuming without the right verification and
This application note begins with an overall view of the
debug tools.
operation of the Internet Protocol Suite which is the foundation
The mixed signal oscilloscope (MSO) is the tool of choice of the Internet implementation. Next, the operation of
to debug embedded systems that have a mixture of analog each Internet Protocol layer is discussed. Throughout the
and digital signals. For quick verification and debugging application note the MSO/DPO4000B with DPO4ENET is
the MSO4000B Series Oscilloscope with the DPO4ENET used to show the examples of the protocol with its data.
Serial Application Module captures and decodes TCP/IPv4/ At the end of this application note is a section on working
Ethernet protocol and data on 10BASE-T/100BASE-TX local with Ethernet 10BASE-T and 100BASE-TX signals with the
area networks (LANs). The MSO4000B Series Oscilloscope MSO/DPO4000B with DPO4ENET.
provides embedded system visibility of time correlated analog
signals, digital signals, parallel buses, serial buses and the
LAN interface to the Internet.
Application Note
2 [Link]/ethernet
TCP/IPv4 and Ethernet 10BASE-T/100BASE-TX Debugging with the MSO/DPO4000B Series Oscilloscopes
Figure 3. TCP ports to different application types and data encapsulation between
layers.
In the oscilloscope each of protocol layers message To quickly identify different packet fields the MSO/DPO4000B
information is decoded and processed as the web page with DPO4ENET decode uses the following color codes. See
request travels up the Internet protocol layers to the HTTP Figure 4.
server in the Application layer. Upon receiving the web page
Start of an Ethernet frame is a green vertical bar
request the oscilloscope HTTP server replies by sending a
HyperText Markup Language (HTML) file to the laptop. Ethernet Preamble (PRE) and Start of Frame Delimiter (SFD)
This HTML file travels down the oscilloscope Internet protocol are purple
layers, across the twisted pair wires and up the laptop Ethernet header is yellow
Internet protocol layers to the IE application. IE displays
IPv4 header is white
the oscilloscope HTML file upon receiving it (see Figure 2).
TCP header is brown
TCP can work with many applications at the same time.
Figure 3 shows TCP having two ports to work with two Data is cyan
different application types. In this case port 80 is for HTTP Ethernet Frame Check Sequence (FCS) is purple
and port 20 is for File Transfer Protocol (FTP).
End of Ethernet frame is a red vertical bar
In Figure 3 the bottom three layers use a formatted unit of
information called a packet. Ethernet standard uses the term
frame instead of packet. Some packets are composed of a
header field and a data field. Usually lower protocol packets
encapsulate higher level packets in their data fields. For
example, a TCP packet with an HTTP application message
is in the IPv4 data field. The IPv4 packet is in an Ethernet
10BASE-T or 100BASE-TX frame data field (see Figure 3).
[Link]/ethernet 3
Application Note
4 [Link]/ethernet
TCP/IPv4 and Ethernet 10BASE-T/100BASE-TX Debugging with the MSO/DPO4000B Series Oscilloscopes
[Link]/ethernet 5
Application Note
Ethernet
The Ethernet frame is a basic unit of data transfer on the LAN
and the frame flows in a one direction.
Ethernet frame is a sequence of seven fields. Ethernet
frame includes information on the Ethernet source address,
destination address, packet size, length/frame type and data
(see Table 4). The Ethernet frame size has a minimum length
in order for collision detection to work in half duplex mode.
The frame transmission begins with a Preamble (PRE) Figure 8. Ethernet 10BASE-T MAC Destination Address and MAC Source Address.
and the PRE is used by a 10BASE-T receiver for start-up
synchronization. The PRE is at least seven bytes long and is
an alternating pattern of ones and zeros (see Figure 7). The Start-of-frame Delimiter (SFD) indicates the start of a
frame after it and the SFD immediately follows the PRE. The
The PRE starts with one and ends with zero. The first PRE
SFD is the second part of the PRE. The SFD is one byte long
bit (one) may have phase violations or invalid amplitude since
with pattern of 10101011. The frame fields follow the SFD.
it is starting from zero volts. Also, some PRE implementations
may have additional one-zero pairs beyond the required The Destination Address and the Source Address follow the
seven bytes. SFD and they are both six bytes long (see Figure 8). These
addresses are physical addresses and they are also called
100BASE-TX has the same PRE field for backward
Media Access Control (MAC) addresses. A MAC address is a
compatibility but does not need the PRE for receiver
hardware address unique to the network node hardware. Each
synchronization because the 100BASE-TX electrical encoding
network node has a unique factory installed MAC address.
is different than 10BASE-T. The 10BASE-T signals are
This hardware address guarantees a unique identity to each
zero when the 10BASE-T frame is not transmitting. The
network node on the LAN.
100BASE-TX transmits an idle signal between frames
and never stops transmitting like 10BASE-T. Therefore,
100BASE-TX receiver always has a signal for keeping
synchronization.
6 [Link]/ethernet
TCP/IPv4 and Ethernet 10BASE-T/100BASE-TX Debugging with the MSO/DPO4000B Series Oscilloscopes
Figure 10. Ethernet 10BASE-T Length/Type (MAC Type) with the Internet protocol type
0800 hexadecimal. After the Length/Type is the Ethernet frame data field which contains
the IPv4 packet.
The IEEE Registration Authority allocates and registers An idle signal (TP_IDL) is transmitted when 10BASE-T packets
Organizationally Unique Identifiers (OUI). The OUI is the first are not being transmitted. At the end of the 10BASE-T FCS
three bytes of the MAC address. The OUI is assigned to a may be a start of idle (TP_IDL). A TP_IDL always starts with a
manufacturer of Ethernet interfaces. For example, the OUI one at the end of the FCS and stays one for two bit times (at
08-00-11 is assigned to Tektronix, Inc. The manufacturer least 250 ns for 10BASE-T, see Figure 10).
[Link]/ethernet 7
Application Note
Figure 13. Ethernet 10BASE-T Manchester 11000101 coding with a transition in the
middle of each bit.
10BASE-T
Figure 12. During 10BASE-T IDLE the link test pulse is transmitted every 16 ms ±8 ms. Ethernet 10BASE-T defines a specific physical connection
between networks nodes. 10BASE-T uses Category 3 (CAT3)
cable or better with two unshielded twisted-pair (UTP) wires.
These twisted-pair wires are referred to as the media in the
IEEE specifications. One pair is for transmit and the other pair
is for receive. Each pair is a differential signal. None of the
cable wires are connected to ground at the network nodes.
8 [Link]/ethernet
TCP/IPv4 and Ethernet 10BASE-T/100BASE-TX Debugging with the MSO/DPO4000B Series Oscilloscopes
Figure 15. An Ethernet 10BASE-T Manchester code of all ones is a 10 MHz waveform. Figure 16. An Ethernet 10BASE-T Manchester code of all zeros is a 10 MHz waveform.
All zeros pattern is different from an all ones pattern by the phase offset.
Serial Application
Ethernet Oscilloscope Probe Module
MSO/DPO4104B TDP0500 500
10BASE-T
MSO/DPO4054B MHz Differential DPO4ENET
100BASE-TX
MSO/DPO4034B Probe
Table 5. 10BASE-T and 100BASE–TX recommend equipment configuration.
An all ones burst or all zero burst is a 10 MHz waveform (see There are two methods to quickly check that the TDP0500
Figures 15 and 16). The difference between all ones and probe is connected correctly. The first method, the link test
all zeros is the phase of the square wave which is very pulse is a solitary positive pulse when the 10BASE-T LAN is in
difficult to determine in the middle of a data stream. The the idle state. The link test pulse first goes positive (minimum
MSO/DPO4000B with DPO4ENET saves your time by 585 mV and maximum of 3.1 V) for minimum of 60 ns (Figure
automatically decoding the Ethernet 10BASE-T Manchester 18). In the idle state link test pulses repeat 16 ms ±8 ms and
coded signal after each acquisition. between the link pulses the signal is at 0 mV ± 50 mV (see
Figure 12).
Working with Ethernet 10BASE-T
The MSO/DPO4000B Series Oscilloscope with DPO4ENET
Serial Application Module triggers, decodes and searches
on TCP, IPv4 and Ethernet frame protocol on 10BASE-T and
100BASE-TX signals. Table 5 shows the recommend equipment
configurations for 10BASE-T and 100BASE-TX signals.
[Link]/ethernet 9
Application Note
Figure 19. Two bit positive TP_IDL signal at the end of the Ethernet 10BASE-T Figure 20. Ethernet 10BASE-T frame acquisition triggered on SFD.
frame confirms the differential probe is correctly connected to the Ethernet 10BASE-T
twisted pair.
10 [Link]/ethernet
TCP/IPv4 and Ethernet 10BASE-T/100BASE-TX Debugging with the MSO/DPO4000B Series Oscilloscopes
Figure 21. Ethernet 10BASE-T frame acquisition interframe gap is measured at 9.6 µs Figure 22. Ethernet 10BASE-T frame acquisition interframe gap is 12.68 µs on the
with the cursors and a collision between the two signals. bottom 10BASE-T waveform after the first collision. A second collision occurred on the
right side of the display after the bottom channel started transmitting its PRE.
[Link]/ethernet 11
Application Note
7 0111 01111
8 1000 10010 4B5B binary encoding is used to prevent a long string of zeros
9 1001 10011 resulting in no data edges for the receiver clock synchronization.
A 1010 10110 See Table 7. 4B5B binary encoding transforms four bits into
five bits with a data pattern of a maximum of one leading zero
B 1011 10111
and a maximum of two trailing zeros. The bit rate changes
C 1100 11010
from the 4B5B input of 100 Mbps (10 ns per bit) to 125 Mbps
D 1101 11011 (8 ns per bit) at the output.
E 1110 11100
The four bit data uses 16 five bit output codes. This leaves
F 1111 11101
16 other output codes to be used for protocol. For example,
Table 7. 100BASE–TX 4b5b encoding. see Table 8 that shows output codes definitions for IDLE (I),
Control (J, K, T and R) and Transmit Error (H). The rest of
the unused five bit output codes are undefined and are
100BASE-TX 4B5B, Scrambling and invalid codes.
MLT-3 Code
Ethernet 100BASE-TX encoding is based on ANSI X3.263-
1995 (TP-PMD) standard. The transmission goes through
three transformations. First, the transmission is 4B5B binary
encoded to prevent a string of zeros that may cause the
receiver to lose clock synchronization lock. Second the
transmission is scrambled to minimize electromagnetic
emissions. Last the transmission in encoded with Multi-Level
Transmit -3 (MLT-3) to reduce the high frequency content
of the signal. These three transformations make it almost
impossible to hand decode a 100BASE-TX signal.
12 [Link]/ethernet
TCP/IPv4 and Ethernet 10BASE-T/100BASE-TX Debugging with the MSO/DPO4000B Series Oscilloscopes
Figure 23. 100BASE-TX scrambled waveform. Compare this waveform with Figure 24 Figure 24. 100BASE-TX scrambled waveform. Compare this waveform with Figure 23
which is the same data at a different time with a different waveform. which is the same data at a different time with a different waveform.
[Link]/ethernet 13
Application Note
14 [Link]/ethernet
TCP/IPv4 and Ethernet 10BASE-T/100BASE-TX Debugging with the MSO/DPO4000B Series Oscilloscopes
Figure 27. A 100BASE-TX acquisition that triggered on the HTTP “GET” command in
the TCP data field.
Figure 28. 100BASE-TX template mask test based on IEEE Std 802.3-2008.
Summary
MSO/DPO4000B Trigger & Search Ethernet and related serial buses are industry standards and
The MSO/DPO4000B Series Oscilloscopes with the DPO4ENET can be found in many of embedded designs today. Traditional
Serial Application Module provides a comprehensive set of manual decoding methods being used to decode these buses
trigger functions for Ethernet 10BASE-T and 100BASE-TX are time-consuming. Debugging and finding the cause of the
signals. Higher level trigger functions include TCP/IPv4 design problems can be simplified with automated tools for
protocol and client data as is shown in Tables 9 and 10. triggering, decode and search.
Figure 27 shows a 100BASE-TX acquisition that triggered
The MSO/DPO4000B Series oscilloscope with the DPO4ENET
on the HTTP GET command in the TCP data field.
Serial Application Module quickly captures and analyzes TCP/
IPv4/Ethernet frame protocols on 10BASE-T and 100BASE-
10BASE-T and 100BASE-TX Physical TX signals. These decoded protocols and waveforms are time
Layer Compliance correlated on the oscilloscope display with other serial/parallel
Without proper signal fidelity system interoperability may be buses, analog signals and digital signals to provide complete
unreliable. With the wide range of operating conditions found design visibility to quickly verify and debug an embedded
in networking systems determining the impact of design system. The TDSET3 Ethernet Compliance Test Software
variances on signal integrity performance is important. Testing with the appropriate oscilloscope offers comprehensive analog
Ethernet requires basic parametric measurements such validation, compliance testing, and device characterization
as amplitude and rise time as well as jitter, mask tests and of the Ethernet 10BASE-T, 100BASE-TX and 1000BASE-T
many others. Tektronix provides Ethernet 10BASE-T and physical layers.
100BASE-TX electrical signal compliance testing with the
TDSET3 Ethernet Compliance Test Software with the
MSO/DPO5000 Series, DPO7000 Series and DPO/DSA/
MSO70000 Series oscilloscopes.
[Link]/ethernet 15
References Contact Tektronix:
ASEAN / Australasia (65) 6356 3900
IETF RCFs are available at [Link] and check to Austria* 00800 2255 4835
see what other RFCs are related to the one you are accessing. Balkans, Israel, South Africa and other ISE Countries +41 52 675 3777
Belgium* 00800 2255 4835
1. IETF RFC-1122 Requirements for Internet Hosts -- Brazil +55 (11) 3759 7600
Communication Layers. Canada 1 (800) 833-9200
Central East Europe, Ukraine and the Baltics +41 52 675 3777
2. IETF RFC-2616 Hypertext Transfer Protocol -- HTTP/1.1.
Central Europe & Greece +41 52 675 3777
3. W3C HTML 4.01 Specification is at Denmark +45 80 88 1401
[Link] Finland +41 52 675 3777
France* 00800 2255 4835
4. IETF RFCs related to TCP are RFC 3168, RFC 2581, Germany* 00800 2255 4835
RFC 1122, RFC 793 and RFC 675. Hong Kong 400-820-5835
India 000-800-650-1835
5. IETF RFCs related to IPv4 are RFC 3260, RFC 3168,
Italy* 00800 2255 4835
RFC 2474, RFC 1349 and RFC 791. Japan 81 (3) 6714-3010
6. The Physical Layer Compliance Testing for 100BASE-TX Luxembourg +41 52 675 3777
Mexico, Central/South America & Caribbean 52 (55) 56 04 50 90
(61W-17381-2) application note describes how TDSET3
Middle East, Asia and North Africa +41 52 675 3777
Ethernet Compliance Test Software provides wide range of
The Netherlands* 00800 2255 4835
100BASE–TX tests that ensure validation. Norway 800 16098
7. IETF RFC-1180 A TCP/IP Tutorial. People’s Republic of China 400-820-5835
Poland +41 52 675 3777
8. 10BASE-T and 100BASE–TX specifications are part of Portugal 80 08 12370
the IEEE Std 802.3TM-2008 Part 3: Carrier sense multiple Republic of Korea 001-800-8255-2835
access with Collision Detection (CSMA/CD) Access Russia & CIS +7 (495) 7484900
Method and Physical Layer Specifications. IEEE Std 802.3™- South Africa +27 11 206 8360
Spain* 00800 2255 4835
2008 are located at [Link] getieee802/
Sweden* 00800 2255 4835
[Link]
Switzerland* 00800 2255 4835
Taiwan 886 (2) 2722-9622
United Kingdom & Ireland* 00800 2255 4835
USA 1 (800) 833-9200