Vous êtes sur la page 1sur 6

Volume 1 Issue 3

Fall 1999

EXTENSION
This article appears in The Industrial

the
Ethernet Book, issue 1, published by
Fieldbus.pub. For more information on
The Industrial Ethernet Book, please
contact Adrian Chesney, adrian@fieldbus.com
or +44 (0) 1329 846166. A Technical Supplement to c o n t r o l NETWORK

INTRODUCTION TO ETHERNET ETHERNET FRAMES


The two types of Ethernet frames
Ethernet for ControlUnderstanding the Basics used in industry are similar. The
DIX V2.0 frame, frequently referred
to as the Ethernet II frame, consists
of an eight-byte preamble, six-byte
INTRODUCTION and Electronic Engineers (IEEE)
source and destination addresses, a
was attempting to develop open
There has been much discussion network standards through the 802 two-byte type field used to identify
recently regarding the applicability committee. In 1985 the IEEE 802.3 higher layer protocols, a variable
of using Ethernet at various levels committee published IEEE 802.3 data byte field followed by a four-
of the control hierarchy. Since Carrier Sense Multiple Access with byte frame check sequence (FCS)
Ethernet is so prevalent in the Collision Detection (CSMA/CD) field. The IEEE 802.3 frame divides
office and frequently used as the Access Method and Physical Layer the preamble into a seven-byte
enterprise network for high-end Specifications. This technology is preamble followed by a single byte
controllers, it would seem to be called 802.3 CSMA/CD and not start of frame delimiter (SFD). The
a natural to use Ethernet at the Ethernet; however, it is frequently two-byte type field now becomes a
control level or even at the device referred to as Ethernet even two-byte length field. The data
level as proposed by some in our though the frame definition differs field now includes an 802.2 logical
industry. The arguments for its use from DIX V2.0. Although 802.3 and link control (LLC) field that
include low cost, good connectivity DIX frames can coexist on the precedes the actual data. The FCS
and simple migration to higher same cable, interoperability is not remains the same.
speed networks. The cry to use assured. Therefore, when
standard Ethernet for control discussing Ethernet, it is
applications requires an Preamble
necessary to clarify 802.3 frames or
understanding of the basics of DIX V2.0 frames. The DIX preamble consists of 64
Ethernet. bits of alternating 1s and 0s but
To further confuse issues, standard ending with two 1s to indicate
Ethernet sometimes means an that a valid frame is to begin. This
What is standard attached protocolmainly TCP/IP. creates a 10 Mhz signal that
Ethernet? Ethernet only defines the data link synchronizes the receivers on the
We are not sure what standard and physical layers of the Open network before actual data arrives.
Ethernet is but it certainly is not Systems Interconnect (OSI) Ethernet uses Manchester
the 2.94 Mbps version that came Reference Model whereas TCP/IP encoding.
out of Xeroxs Palo Alto Research defines the transport and network
Center (PARC) in the early 70s. In layers respectively of the same
1980, Digital Equipment model. Therefore, when the The IEEE redefined the preamble
Corporation (DEC), Intel and Xerox suggestion is made to use standard to be seven bytes of preamble, the
published the DIX V1.0 standard Ethernet for control does this mean same as the DIX preamble,
which boosted the speed of TCP/IP connectivity as well? followed by a one-byte start of
Ethernet to 10 Mbps while frame delimiter (SFD) which looks
APPLICATION
maintaining Ethernets thick trunk like the last byte of the DIX
PRESENTATION
cabling scheme. In 1982 the DIX preamble. There is no change in
SESSION
V2.0 standard was released which operation between the DIX
TRANSPORT preamble and the IEEE preamble
is now commonly referred to as
NETWORK and SFD byte. Both preambles are
Ethernet II. Xerox then
DATA LINK not considered part of the frame
relinquished its trademark.
PHYSICAL when calculating the size of the
At the time of the first DIX overall frame.
standard, the Institute of Electrical Figure 1Ethernet defines the lower
two layers of the OSI Reference Model.

1
Ethernet II DIX Frame What is important here is that since
64 bits 48 bits 48 bits 16 bits 368 to 12000 bits 32 bits DIX and IEEE frames are identical
(46 to 1500 bytes)
Preamble Individual/ Destination Source Type Data Frame in terms of the number of bits and
Group Address Address Check length of fields, both frames can
Address Bit Sequence coexist on the same network but
may not be able to communicate to
IEEE 802.3 Frame one another. Much of the existing
56 bits 8 bits 48 bits 48 bits 16 bits 368 to 12000 bits 32 bits
TCP/IP software that binds to
(46 to 1500 bytes)
Preamble SFD Individual/ Globally/ Destination Source Length LLC/Data Frame Ethernet uses DIX frames and not
Group Locally Address Address Check 802.3 frames, so care must be
Address Administered Sequence
exercised when selecting or
Bit Address Bit
developing software or claiming
Figure 2Two types of Ethernet frames are used in industry. interoperability.

Destination Address
good recordkeeping, will assign Data Field
In the DIX standard the first bit of sequential numbers to each adapter A raw Ethernet frame (no
the 48-bit destination address card he makes thereby creating a encapsulated protocol or LLC) can be
indicates if the address is a worldwide unique address. With 24- up to 1500 bytes long but no less
multicast address or a physical bits to work with, a lot of adapters than 46 bytes. This is the DIX frame.
address. A 0 indicates a unicast can be produced from a single
transmission to the indicated manufacturer. A list of OUI
destination while a 1 indicates a assignments can be found on the Although the total available length
multicast or group address. Internet. of the IEEE data field is the same as
the DIX frame, the LLC header
reduces the amount of field
The IEEE standard further defines Type and Length Field available for actual data or payload
the second bit of the 48-bit
The original intention of Ethernet as it is sometimes referred to. If the
destination to indicate if the address
was never to use its data link layer LLC header and actual payload are
is locally administered or globally
as the means for providing less than 46 bytes, the data field
administered. This bit is a 0 when
guaranteed delivery of data. It was must be padded to 46 bytes to
the address is globally administered;
always the intent that a higher layer ensure that the transmission is not
that is, assigned by the Ethernet
protocol would do that service. interpreted as a runt packet or
interface manufacturer.
Therefore it was only necessary to packet fragment.
identify by number which higher
A 48-bit address of all 1s is a layer protocol was being used
broadcast address in both DIX and through the two-byte field in the
Frame Check Sequence
IEEE formats indicating that the DIX frame. Originally, Xerox Both the DIX and IEEE standard
transmission is directed to all maintained the assignments and use four bytes to hold the CRC-32
devices on the network. now IEEE provides the check on the complete frame from
administration. destination address all the way to
the end of the data field. The
Source Address receiving station calculates its own
The 48-bit source address is The 802.3 standard does not include CRC-32, checks on the received
appended to the transmission as an the type field but instead defines it data and compares the results with
aid to the higher layer protocols. It as a length field. Per the 802.3 the transmitted CRC-32 value for a
is not used for medium access standard, a value in this field of match indicating a successful
control. To avoid duplicate node 1518 or less indicates the length of reception. Note that there is no
IDs for global addresses, the the data field, while values above inherent mechanism in the Ethernet
Ethernet adapter manufacturer this may be ignored, discarded or data link layer protocol to inform
obtains an Organizationally Unique used in a private manner. These out the source node that a reception
Identifier (OUI) from the IEEE (for of bound values could then be used was accepted or rejected due to a
an administration fee). The OUI is to identify higher layer protocols failed CRC-32 check. That task is
24-bits long and is used as the most just like DIX frames. left to the higher layer protocol.
significant portion of the 48-bit
address. The manufacturer, using

2
ETHERNET PHYSICAL standardized in 1985 as 10BASE2. higher-speed migration, noise
LAYERS Thinnet again was a bus topology immunity and electrical isolation.
but this time with internal There are three media standards:
Although Ethernet was originally transceivers. A thin RG-58/u coaxial
designed as a coaxial bus system, cable interconnects up to 30
alternate physical layers have stations to a maximum length of 10BASE-FLThis fiber link
evolved since the early 80s. The 185 meters. Segments can be standard replaces older FOIRL
IEEE 802 committee has defined repeated up to 740 meters. BNC standard.
several physical layers and that is style connectors, terminators and 10BASE-FBThis backbone
why it is important to specify the taps are used to cable the system. standard is not very popular.
correct option when selecting Although easier to install than
Ethernet. 10BASE-FPThis passive hub
10BASE5, the focus on new technology is also not popular.
installations is towards twisted-pair
10BASE5 cabling. This cable is likewise not
supported by Fast Ethernet. The 10BASE-FL standard requires a
The original Ethernet was duplex 62.5/125m fiber optic
configured as a bus system with a cable for each link. Transmission
thick coaxial cable as the medium. 10BASE-T distances of up to 2km are possible
That is what was specified in the In 1990 the IEEE published as well as full-duplex operation.
1980 DIX standard. An external 10BASE-T after pioneering work
transceiver called a medium was done to introduce twisted-pair
attachment unit (MAU) clamps at cabling and star topology to MEDIUM ACCESS CONTROL
particular points on the cable Ethernet installations. The10BASE-T What follows is a discussion of the
marked by stripes every 2.5 meters. Ethernet adapters have internal medium access control protocol for
From the transceiver, an attachment transceivers and RJ-45 connectors. a 10 Mbps half-duplex Ethernet
unit interface (AUI) cable connects Usually two-pair unshielded cabling network operating with several
to an AUI port on the actual is attached to a hub in a point-to- nodes.
Ethernet adapter that fits into the point fashion. Bus connections are
computer. The AUI port is a DB-15 not allowed. The connection
connector. A coaxial segment can between an adapter and hub When a station wants to transmit, it
be up to 500 meters long and AUI cannot exceed 100 meters in first waits for an absence of a
cables are each restricted to 50 length. Hub-to-hub connection carrier, which would indicate that
meters in length. A total of 100 length can vary depending upon some other station is transmitting.
transceivers can occupy one trunk the medium used. If another As soon as silence is detected, the
segment. Individual trunk segments twisted-pair connection is used, the station waiting to transmit
can be cascaded using repeaters up maximum length is again 100 continues to defer until the
to 2000 meters. In 1985 the IEEE meters. With Thinnet it is 185 Interframe Gap (IFG) time has
standardized this configuration as meters and with thick coaxial cable expired which is a minimum of 96-
10BASE5 to signify 10 Mbps 500 meters. bit times (9.6s). If a carrier still
baseband signaling up to 500 appears to be absent, the station
meters in length. begins to transmit while observing
The star topology is much easier to its collision sense circuitry. If no
troubleshoot than a bus system; collision is detected, the
Thick coaxial cable is indeed bulky however, the reliability of the hub transmitting station assumes the
and its topology is not always now must be considered in the transmission was sent successfully.
convenient to wire in a plant. overall reliability of the system. If the transmitter detects an early
Troubleshooting a 100-station Another reason for the focus on collision, one which occurred
segment could be a nightmare, so twisted-pair is that development of during the preamble, the station
you do not see new 10BASE5 Fast Ethernet is based on twisted- continues to send the preamble
installations. There is no support pair and not coaxial cable plus 32 bits of data called a jam
for this cable with Fast Ethernet providing no migration path for signal. This ensures that other
technology. installed coaxial cable. stations will note the collision as
well. After the collision, the
10BASE2 10BASE-F
transmitting station will backoff
from retransmitting based upon a
The answer to the bulkiness of The 10BASE-F standard is actually a backoff algorithm. If no collisions
10BASE5 along with its expense series of fiber optic standards. Fiber are detected after 512-bit times (not
was Thinnet or Cheapernet optics provides long distance, counting the preamble), the station

3
is assumed to have acquired the Increased network diameter before attempting a new
channel and no late collisions aggravates the collision problem. transmission sequence. The integer
should occur on a properly Silence on the line does not is determined by the equation:
working network. The collision necessarily mean a distant
counter is cleared. This 512-bit transmitter has not already sent a
time (51.2s) is called the slot time packet down the cable, which will 0 < r < 2 k where k = min (n, 10)
and is critical in the way Ethernet eventually result in a collision.
arbitrates access to the cable. The variable k is actually the
number of collisions capped at a
Collision Domain maximum of 10. Therefore, r can
range from 0 to 1023 when k = 10.
This slot time defines the The actual value for r is determined
upper bound limit of the total by a random process within each
propagation delay of a transmitted Ethernet node. As the number of
symbol from one end of the consecutive collisions increases, the
Figure 3For proper operation, a
network to the farthest end and collision domain must be within the range of possible backoff times
back. This includes the time it maximum network diameter. increases exponentially. The number
takes the symbol to travel through of possible retries is also capped but
cables, repeaters and MAUs and at 16.
varies with devices used. However, Collision Detection
regardless of the path, the resulting
propagation delay must be less A collision is defined as two For example, assume two stations
than the slot time. Therefore the stations attempting to transmit at A and B on the network wanting
slot time defines Ethernets the same time. On coaxial cable to transmit. They both wait for an
maximum network diameter which transceivers, there is circuitry to absence of carrier and then wait
limits its collision domain. A detect the DC level of the signal for the IFG time to expire before
collision domain that exceeds the on the cable. This is the indicator initiating a transmission. It does
maximum network diameter of a collision. On fiber optic and not matter if they are 10 meters or
violates Ethernets medium access twisted-pair interfaces with 2500 meters apart. They could both
control mechanism resulting in separate receive and transmit be sensing silence and
unreliable operation. circuitry, a collision is detected by simultaneously begin to transmit
the simultaneous receiving and causing a collision at some point.
transmitting of data. Remember They each sense the collision and
Collisions can generate runt that we are discussing half-duplex back off for either 0 or 1 slot time.
packets that are less than 512 bits Ethernet that allows either The odds are 50-50 they will pick
in length. These can be detected transmitting or receiving but not at the same value and collide again.
by the receiving nodes and the same time. Only transmitters If they do, they will now back off
discarded accordingly. That is why look for collisions and it is their for either 0, 1, 2 or 3 slot times.
it is important that a minimum responsibility to reinforce a The probability of collision is now
valid Ethernet frame always be collision with a jam signal. 25%. Eventually, one will win in
sent to distinguish valid packets Receivers only look for valid which case its collision timer is
from packet fragments. A minimum packets and automatically discard cleared to zero while the other
of 46 bytes in the data field runt packets that are caused by collision timer continues to
ensures that a valid Ethernet frame collisions. Once a collision is increment until a successful
is 512-bits long. Control messages detected by simultaneous transmission.
are typically short so it should be transmitters, these transmitters will
remembered that the shortest follow a backoff algorithm
Ethernet frame is 64 bytes in A high number of retires indicates
length. a busy network with more stations
Backoff Algorithm wanting to transmit than originally
When a collision occurs on the assumed. That is why the backoff
If the network diameter is small, network, the colliding transmitters time range is increased
collision detection is faster and the will backoff from retransmitting for exponentially to provide more
resulting collision fragments are a time determined by a backoff possible slot times for the
smaller. As the network diameter algorithm. This algorithm requires additional stations. At ten retries, it
increases more time is lost each transmitter to wait an integral is assumed that 1024 simultaneous
detecting collisions and the number of slot times (51.2s) transmitters exist. This becomes the
collision fragments get larger.

4
upper bound limit of stations that experienced the first collision and transparent to the application
can coexist on one Ethernet will probably select a much lower program requiring no development.
network. Actually this is the logical timeout allowing it to transmit and
limit. Physically it may be assemble another packet and could
impossible to have that many beat station B again in the backoff Others suggest simply increasing
stations on one collision domain contest. This phenomenon of the data rate to 100 Mbps by using
without violating cabling rules. channel capture is real and Fast Ethernet technology. By simply
demonstrates that access to the using raw horsepower messages
BACKOFF RANGE AS A FUNCTION OF COLLISIONS will get through with or without
Collision Estimate of Range Range network is neither fair nor
on Attempt Number of of Random of Backoff
predictable. The next time around collisions. The collision domain
Number Other Stations Numbers Times (s)
1 1 0..1 0..51.2 station B could get the upper hand decreases by a factor of 10 when
2 3 0..3 0153.6 and limit As access. If another migrating to 100 Mbps Ethernet
3 7 0..7 0358.4
station C decides to transmit as resulting in a maximum network
4 15 015 0768.0 diameter of only 205 meters, which
5 31 031 0..1587.2
well, it could beat out station A
due to the state of As collision is a small size network. Of course
6 63 063 0..3225.6
7 127 0..127 0..6502.4 counter. In actuality a station that all nodes would need to be
8 255 0..255 013056.0 was last to arrive could transmit first. capable of communicating at 100
9 511 0..511 026163.2 Mbps which could be a burden for
10 1023 01023 052377.6 under-powered microcontrollers.
11 1023 01023 052377.6
12 1023 01023 052377.6
Improving Ethernets
13 1032 01023 052377.6
Determinism
One approach is to avoid collisions
14 1023 01023 052377.6 There has been much discussion in
15 1023 01023 052377.6
altogether by using full-duplex
the literature about implementing technology and switched hubs. In
16 Too High N/A Discard Frame
methods to improve the this scheme each node is paired
Table 1Backoff range increases determinism of Ethernet. One with a port on the hub. Each
exponentially with the number of approach is to incorporate a
collisions.
node/port arrangement creates it
master/slave protocol such as own collision domain separate
MODBUS or OPTOMUX on top of from all others. There are no
Ethernet. In this situation, the collisions with a full-duplex link.
Channel Capture slaves only respond to the masters The switching hub directs messages
As shown above, the Ethernet commands thereby controlling the to other links by observing the
backoff algorithm provides a means traffic on the cable and thus destination address within the
for peer stations to each gain avoiding collisions. The downside frame. Switching hubs are more
access to the network. Access is of this approach is that you forfeit expensive than non-switched hubs
provided to all but in an the inherent multimaster capability and they introduce more latency by
unpredictable fashion. The question of Ethernet. their "store and forward" nature.
is if access is fair. The switching hub now becomes
Another suggestion is to develop a an integral component of the
Assume the same two stations token-passing protocol that would control strategy.
A and B as before. This time, be implemented in Ethernets data
however, they both have high field. This would have to be There is an IEEE 802.1p task group
amounts of data to send and they developed and its acceptance studying schemes that would
attempt to send at the same time would have to be sought. The provide higher priorities to the
and collide on the first attempt. software burden would increase transmission of time-critical data.
They both back off but this time and technologies such as ARCNET This activity is mainly addressing
A was successful. As collision already can do this with the way multicast frames are sent.
counter is cleared but Bs does not built-in firmware
clear. If station A has more data to
send and it is quick to assemble
another packet to send, it
might collide with B again.
This time B could be
selecting higher and higher
backoff times as its collision
counter continues to increment.
However, station A feels it has only Figure 4A switching hub, bridge or router is required to interconnect two or
more collision domains.

5
Expanding an Ethernet 5-4-3 Rule ETHERNET MAXIMUM MEDIA SEGMENT LENGTH
Network The 5-4-3 rule states that a Media type Maximum number Maximum
Expanding an Ethernet network is system can have up to five of MAUs per segment segment length (m)
possible by the use of repeaters segments in series, with up Mixing segment
while maintaining one collision to four repeaters and no 10BASE5 100 500 (trunk)
domain. If expansion is required more than three mixing 50 (AUI)
beyond a collision domain, this segments. The remaining
10BASE2 30 185
can only be accomplished by the two segments must be link
use of bridges, switches or routers. segments. A mixing Link segment
To maintain one collision domain, segment is defined as a FOIRL 2 1000
a symbol sent from the extreme segment that may be 10BASE-T 2 100
end of the network must be able connected to more than
10BASE-FL 2 2000
to make a complete round trip two transceivers. In other
within the slot time of 512-bits words, a bus segment. Table 2Expansion rules require that
(51.2s at 10 Mbps). Calculating Only coaxial cable can be used for segments be identified as being either
the complete propagation delay a bus segment (we are ignoring mixing or link.
through adapters, AUI cables, 10BASE-FP) while fiber optic and
transceivers, trunk cables and twisted-pair cable can be used as
repeaters is possible but is also a link segments. A link segment can
challenge. Table 2 provides only have two transceivers and it
information on the maximum must support full-duplex operation case, all segments can be mixing
number of MAUs per segment (separate transmit and receive providing a network diameter of
and the maximum segment length. channels) to speed up collision 2000 meters for 10BASE5 and 740
The maximum allowable segment detection. This simplified rule does meters for 10BASE2. For other
length, as well as the repeaters not address all the possible configurations you need to refer to
themselves, has been assigned combinations but it does yield approach 2.
delay values by the 802.3 some gross network diameters. For
specification. example, all five segments cannot SUMMARY
be 10BASE5 or 10BASE2. If all five
were 10BASE-T then the diameter What has been discussed is the
The 802.3 specification discusses would be 500 meters. With fiber operation of Ethernets physical
ways to interconnect cable optics it is different. You cannot and data link layers. This alone
segments with repeater sets use the maximum segment length does not implement an industrial
without exceeding the collision for all five segments. In the case of communication network. What is
domain. A repeater set is defined 10BASE-F the maximum diameter needed is transport layer for
as repeater electronics and two or is 2500 meters. You need to read reliable transfers of messages and
more attached MAUsone for the standard to understand this an application layer which
each segment to be connected. restriction. provides the actual control
The system designer can use either commands and responses. We will
transmission system model 1 or discuss these topics in the next
transmission system model 2. The 5-4-3 rule does not address issue of the EXTENSION.
Approach 2 is the detailed the three repeater configuration
approach where exact delay which yields four segments. In this
calculations and Interframe Gap
shrinkage calculations are made.
Approach 1 is the simplified
approach, which is not as exacting REFERENCES
Practical Networking With Ethernet, Charles E. Spurgeon, 1997,
as approach 2. Approach 1 has
been further simplified by creating International Thomson Computer Press
the 5-4-3 rule. Switched and Fast Ethernet, Second Edition, Robert Breyer and Sean Riley,
1996, Macmillan Computer Publishing USA

International Standard ISO/IEC 8802-3 ANSI/IEEE Std 802.3, 1996,


The Institute of Electrical and Electronic Engineers, Inc.

www.ccontrols.com