Ref: 05290001 Title: Theory of Operation of Ethernet Date: 4-13-89 Copyright 3Com Corporation, 1991. All rights reserved. Theory of Operation of Ethernet .h1;Acknowledgement Much of the information contained in this and the following two sections is based on: .br;(1) Shoch, J.F., Dalal, Y.K., Redell, D.D., and Crane, R.C.: "Evolution of the Ethernet Local Computer Network, Xerox Office Products Division and Palo Alto Research Center, OPD-T8102, Sept. 1981. Also published in IEEE Computer Magazine. .br;(2) The IEEE 802.3 Standard published by the IEEE in 1985. .br;(3) Kessler, G.: "Ethernet vs. IEEE 802.3", LAN Magazine, July 1987. .h1;Introduction Ethernet is a multi-access, packet-switched communications system for carrying digital data among locally distributed computing systems. The shared communication channel in Ethernet is a passive broadcast medium with no central control point; packet address recognition in each station is used to take packets from the channel. Access to the channel by stations wishing to transmit is coordinated in a distributed fashion by the stations themselves, using a statistical arbitration scheme. .h1;Major Milestones Ethernet was developed at the Xerox Palo Alto Research Center by 3Com's founder Robert M. Metcalfe, and David R. Boggs, starting in 1972. In 1975, "Experimental Ethernet was implemented. In 1980, a cooperative effort involving Digital Equipment Corporation, Intel, and Xerox produced an updated version of the Ethernet design, generally known as the Ethernet Specification (the "Blue Book"), or Ethernet Version 1.0. In 1982, the same companies published Version 2.0. The IEEE 802.3 Working Group developed the IEEE 802.3 standard that was approved by the IEEE Standards Board in 1983, by the American National Standards Institute (ANSI) in 1984, and by the International Organization for Standards (ISO 8802/3) in 1985. The IEEE 802.3 standard is largely based on the CSMA/CD access method earlier described in the Ethernet Specification. It is intended to encompass several media types and techniques for signal rates from 1 Mbps to 20 Mbps; the 1985 edition also provides the necessary specifications and related parameter values for a 10 Mbps baseband implementation on thick coaxial cable, which has a maximum segment length of 500 meters (l0Base5). The IEEE Standards Board approved the 10Base2 specification for thin coaxial cable in 1986 (10 Mbps baseband at 185 meters -- 200 meters rounded up). .h1;OSI Reference Model IEEE 802.3 encompasses the Physical layer and a part of the Data Link layer called The Media Access Control (MAC) layer. .h1;Theory of Operation The general Ethernet approach uses a shared communications channel managed with a distributed control policy known as carrier sense multiple access with collision detection, or CSMA/CD. With this approach, there is no central controller managing access to the channel, and there is no preallocation of time slots or frequency bands. A station wishing to transmit is said to "contend" for use of the shared communications channel (sometimes called the Ether) until it "acquires" the channel; once the channel is acquired, the station uses it to transmit a packet. To acquire the channel, stations check whether the network is busy (that is, use carrier sense) and defer transmission of their packet until the channel is quiet (no other transmission occurring). When quiet is detected, the deferring station immediately begins to transmit. During transmission, the transmitting station listens for a collision (other transmitters attempting to use the channel simultaneously). In a correctly functioning system, collision occurs only within a short time interval following the start of transmission, since after this interval all stations will detect carrier and defer transmission. This time interval is called the collision window or the collision interval and is a function of the end-to-end propagation delay. If no collisions occurs during this time, a transmitter has acquired the channel and continues transmission of the packet. If a station detects a collision, the transmission of the rest of the packet is immediately aborted. To ensure that all parties to the collision have properly detected it, any station involved in the collision invokes a collision consensus enforcement procedure that briefly "jams" the channel, that is briefly transmits onto the network. Each transmitter involved in the collision then schedules its packet for retransmission at some later time. To minimize repeated collision, each station involved in a collision tries to retransmit at a different time by scheduling the transmission to take place after a random delay period. In order to achieve channel stability under overload conditions, a controlled retransmission strategy is used whereby the mean of the random retransmission delay is increased as a function of the channel load. An estimate of the channel load can be derived by monitoring the number of collisions experienced by any one packet. Stations accept packets addressed to them and discard any that are found to be in error. Deference reduces the probability of collision, and collision detection allows the timely retransmission of a packet. It is impossible, however, to guarantee that all packets transmitted will be delivered successfully. For example, if a receiver is not enabled, an error-free packet addressed to it will not be delivered; higher levels of protocol must detect these situations and retransmit. Under very high load, short periods of time on the channel may be lost due to collisions, but the collision resolution procedure operates quickly. Channel utilization under these conditions will remain high, particularly if packets are large with respect to the collision interval. .h1;Basic Ethernet Hardware Components And Their Function Please refer to the section titled "Technical Summary of Ethernet Specifications" for more details on some of the technical terms mentioned below. .br;Controller .br;-Preamble recognition .br;-Address recognition .br;-Checking of packet integrity (CRC) .br;-Packet generation. .br;-Parallel-to-serial conversion (or vice versa) .br;-Packet buffering .br;-Basic CSMA/CD channel management .br;Encoder/Decoder .br;-Manchester encoding/decoding .br;-Carrier generation .br;Transceiver (also called media attachment unit, or MAU) .br;-Transfers transmit data from the controller to the coaxial cable .br;-Transfers receive data from the coaxial cable to the controller .br;-Detects transmission by other stations .br;-Detects collisions .br;-"Heart Beat' (or "Signal Quality Error") tests .br;-Jabber control provides ground isolation between signals from the controller and signals from the coaxial cable .br;Transceiver cable (also called attachment unit interface, or AUI) .br;-Shielded twisted-pair cable .br;-Four pairs for transmit, receive, collision, power .br;-Male 15 pin D-series connector with lock posts on the controller side, and a female 15 pin D-series connector with slide lock assembly on the transceiver side. .br;Repeaters .br;Extend the length of the transmission system beyond the physical limits imposed by the transmission medium. A repeater uses two transceivers to connect two different Ethernet segments; it combines them into one logical channel, amplifying and regenerating signals as they pass through in either direction. Repeaters are transparent to the rest of the system, and packets from stations on different segments can still collide. .h1;Ethernet Configuration Rules Summary of Ethernet Attributes Topology: Bus Access Mechanism: Carrier Sense Multiple Access with Collision Detection (CSMA/CD) Data rate: 10 megabits per second Maximum number of stations per network: 1024 Coaxial cable impedance: 50 Ohms +/= 2 Ohms Coaxial cable signal levels: 0 to -2.05 Volts Thick coaxial cable (10Base5):802.3All 3Com transceivers -------------------------- Maximum segment length500 meters (1640 ft.)1000 meters (3280 ft.) Maximum number of transceivers100100 /segment Minimum transceiver spacing2.5 meters2.5 meters Thin coaxial cable (10Base2):802.3All 3Com transceivers -------------------------- Maximum cable segment length185 meters (607 ft.)305 meters (1000 ft.) Maximum number of transceivers30100 /segment Minimum transceiver spacing0.5 meters0.5 meters .br;Notes: .br;3Com transceivers can save on the number of repeaters, since they can support segments that may be twice as long as in 802.3 Use the IEEE 802.3 specs when mixing 3Com transceivers with other manufacturers' transceivers on a segment. If thick and thin coaxial cables are mixed in a segment, use the following formulas: .br;3.28 x A + B < 1000 meters with 3Com transceivers, .br;or 2.70 x A + B < 500 meters with other transceivers. .br;Where A is the thin cable length expressed in meters, and B the thick cable length expressed in meters. .br;Cable Types: .br;Thick cable type: 50 Ohm, "Ethernet" cable. .br;Thin cable type: 50 Ohm, RG 58 C/U or RG 58 A/U (3Com strongly recommends the use of RG 58 C/U in order to achieve the highest transmission quality; RG 58 "type" cables are not recommended). .br;Terminators .br;50 Ohm terminators must be attached to each end of the cable. Their purpose is to eliminate reflections from the ends of the cable. Use N-series terminators for thick cable, and use BNC terminators for thin cable. Network Connection: the adapter is connected to thin coaxial cable via a BNC connector, or to a transceiver cable via a 15-pin D-series connector. Barrel connectors (N-series for thick, BNC for thin) connect two Ethernet cable segments together. Maximum Length of Transceiver Drop Cable: 5 meters 20 AWG shielded twisted-pair wire (4 pairs), 78 Ohm differential impedance. .h1;Configuration Rules The end-to-end roundtrip propagation delay across all connected segments must be under 51.2 us. Different media will have different propagation velocities and therefore will allow varying distances; repeaters and repeater cables also add to the overall propagation delay. Individual segments have their own limits too, due to the DC loop resistance or the AC attenuation. For instance, thick coaxial cables are limited to 500 meters (1000 meters if 3Com transceivers are used), and thin coaxial cables are limited to 185 meters (305 meters if 3Com transceivers are used). The maximum transmission path permitted between any two stations is five segments, four repeaters (including optional AUI cables), two MAUS, and two AUIs. Of the five segments, a maximum of three may be tapped coaxial segments;the remainder are point-to-point links (untapped segments often used to connect different buildings; may be coaxial or fiber-optic cable). Using IEEE transceivers and thick coaxial cable, the maximum trunk cable connection path between any two MAUs is 2500 meters (five segments of 500 meters each); this does not include the optional repeater cables for the four repeaters, and the two transceiver cables; the maximum distance is therefore 3000 meters when all the AUI cables are included. With thin cable, the maximum trunk cable connection path is 925 meters with IEEE transceivers (five segments of 185 meters each) and 1525 meters with 3Com transceivers. The maximum number of repeaters between two stations is two with tapped segments only, four if one includes point-to-point links. Repeaters do not have to be located at the end of the tapped segments (but they do have to be located at the end of a point-to-point link). There can be several repeaters per segment. In fact repeaters can be used not only to extend the length of channel, but to extend the topology from one to two or even three dimensions. Repeaters occupy transceiver positions on each cable segment. Repeaters also count towards the maximum number of transceivers on a segment .h1;Technical Summary of Ethernet Specifications Ethernet Version 1.0 Packet Format ------------------------------------------------------------------- Preamble |Destination |Source | Type | Data | CRC ----------|------------------|---------|------|---------|---------- 8 bytes |6 |6 | 2 |46-1500 | 4 ------------------------------------------------------------------- Stations must be able to transmit and receive packets on the common coaxial cable with the packet format shown in above chart. Each packet should be viewed as a sequence of 8-bit bytes; the least significant bit of each byte (starting with the preamble) is transmitted first. Maximum packet size: 1526 bytes (8-byte preamble + 14-byte header + 1500 data bytes + 4-byte CRC). Minimum packet size: 72 bytes (8-byte preamble + 14-byte header + 46 data bytes + 4-byte CRC). Preamble: This 64-bit synchronization pattern contains alternating 1s and 0s ending with two consecutive 1s. This is used to establish bit synchronization and then to locate the first bit of the packet. Destination Address: This 48-bit field specifies the station to which the packet is being transmitted. Each station examines the field to determine whether it should accept the packet. The first bit transmitted indicates the PM of address. If it is a 0, the field contains the unique physical address of the one destination station. If it is a 1, the field contains a logical address known as a multicast ID that belongs to a group of recipients. Stations supporting multicast must be able to recognize multicast IDs of interest (done by software). Finally, a special case of multicast address is the broadcast address (to all stations), which is all 1s in the destination address field. Each Ethernet address is unique; no two Ethernet nodes anywhere in the world should have the same Ethernet address. Source Address: This 48-bit field contains the unique address of the station that is transmitting the packet. Type Field: This 16-bit field is used to identify the higher-level protocol type associated with the packet (e.g., XNS, TCP/IP, OSI). It determines how the data field is interpreted. Data Field: This field contains a number of bytes ranging from 46 to 1500. (There is a minimum size to the packet, to ensure that valid packets will be distinguishable from collision fragments.) Packet Check Sequence: This 32-bit field contains a cyclic redundancy check (CRC) code. The CRC covers the destination and source addresses, the type and the data fields. Minimum Packet Spacing: This spacing is 9.6 usec, the minimum time that must elapse after one transmission before another transmission may begin. Round Trip Delay: The maximum end-to-end, round-trip delay for a bit is 51.2 usec. Collision Filtering: Any received bit sequence smaller than the minimum valid packet (with minimum data field) is discarded as a collision fragment. .h1;Control Procedure The control procedure defines how and when a host station may transmit packets into the common cable. The key purpose is fair resolution of occasional contention among transmitting stations. Defer: A station must not transmit into the coaxial cable when the carrier is present, or within the minimum packet spacing time after the carrier has ended. Abort: If a collision is detected, transmission of the packet must terminate and a jam (4-6 bytes of arbitrary data) is transmitted to ensure that all other participants in the collision also recognize its occurrence. Retransmit: After a station has detected a collision and aborted, it must wait for a random retransmission delay, defer as usual, and then attempt to retransmit the packet. The random time interval is computed using the backoff algorithm (see below). If the transmission is not completed successfully after 16 attempts, the transmission is terminated and an error is reported. At a higher level, the software determines whether to continue or abandon the effort. Backoff: Retransmission delays are computed using the Truncated Binary Exponential Backoff algorithm, with the aim of fairly resolving contention among up to 1024 stations. The delay (the number of time units) before the nth attempt is a uniformly distributed random number from (0 to 2**n-1) for 0 < n < or equal to 10 (n=0 is the original attempt). For attempts 11 to 15, the interval is truncated and remains between 0 and 1023. The unit of time for the transmission delay is the time for 512 bits or 51.2 usec. .h1;Channel Encoding Manchester encoding is used on the coaxial cable. It has a 50% duty cycle, and insures a transition in the middle of every bit cell ("data transition"). The first half of the bit cell contains the complement of the bit value, and the second half contains the true value of the bit. A logic high is 0 V, and a logic low is -2.05 V. In quiescent state, the cable has 0 V. .h1;Data Rate Data rate is 10 Mbps, equivalent to 0.1 usec bit cells, +/= 0.01%. .h1;Carrier The presence of data transitions indicates that the carrier is present. If a transition is not seen between 0.75 and 1.25 bit times since the center of the lst bit cell, then the carrier has been lost, indicating the end of a packet. For purposes of deferring, a carrier means any activity on the cable, independent of being properly formed. Specifically, is any activity on either receive or collision detect signals in the last 0.16 usec. .h1;Collision Detection The transceiver detects a collision as a change in the DC signal. When a single packet is being transmitted on the cable, the DC component of the signal has a value of - 1.025 V (average of logic high 0 V and logic low -2.05 V). If other packets are being transmitted at the same time, the DC component will increase and will be detected by the transceiver's collision detection circuitry; it reports the condition back to the controller. .h1;Cyclic Redundancy Check (CRC) The stream of data contained in the destination address, source address, PM, and data fields (from 60 to 1514 bytes) is compressed by a CRC algorithm (based on polynomial division) into a 4-byte field. This CRC field is appended to the packet before transmission. The receiving station separates the CRC field from the other fields and performs the same CRC algorithm on the other fields it just received; it then compares the received CRC with the CRC it just calculated. If they do not match, there are two options: either discard the packet or deliver the packet with an appropriate status indicating a CRC error. CRC algorithms are not infallible: there is always the remote possibility that errors will go undetected, since several different data fields can yield the same CRC field. .h1;Difference In Ethernet Versions Here is a summary of the main differences between Ethernet Version 1.0, Version 2.0, and the IEEE 802.3 standard. .h1;Network Architecture The Ethernet standard contains a physical and a data link specification. The scope of these layers is essentially the same as the IEEE 802.3 physical and medium access control (MAC) layers. Ethernet also specifies the interface to higher layers called client layers. The client layers must provide the logical link between stations, as well as the session connection, error control, and the end-to-end connection. IEEE 802.3 interfaces up to the logical link control (LLC) layer. An Ethernet network may support the IEEE 802.2 LLC, but there is no reason to believe that it does, unless explicitly stated. Thus the data portion of a frame may or may not be in 802.2 LLC format. .h1;AUI Connector Pin Assignments There are a few differences in the AUI connector pin assignment between Version 2.0 and IEEE 802.3, especially in the way the grounding is done. .h1;Half-Step Signaling The signal on the AUI is full-step in Version 1.0, half-step in Version 2.0 and IEEE 802.3. The difference between half-step and full-step signaling is that with half-step the differential signal in the AUI has no DC component, unlike full-step. Half-step offers better immunity to noise. .h1;Signal Quality Error Test (SQE/Heartbeat) The Signal Quality Error test was added to the Ethernet specification when the standard was adopted by the IEEE 802.3 committee. The transceiver puts a short 10 MHz signal on the collision pair 0.6 usec after transmitting a packet. The SQE signal makes it possible for a transceiver to check the proper operation of its own collision circuitry. The software can be configured to check for the signal presence. .h1;Jabber Control Jabber control was added to the Ethernet specification when the standard was adopted by the IEEE 802.3 committee. If a controller goes bad, it has the potential to send out a stream of erroneous bits, tying up the network with a permanent collision. The transceiver will disable this output after a time that must be at least 20 ms and no more than 150 ms. The transceiver is reset by the absence of transmit signal for a period that must be between 250 and 750 ms. .h1;Electrical Characteristics There are also a few minor variations in the electrical characteristics of the different Ethernet specifications; it is beyond the scope of this product line guide to detail them. .h1;Packet Format Ethernet Version 1.0 and 2.0 use the same packet format; however, there are some differences in the packet format between Ethernet and IEEE 802.3. Ethernet Packet Format ------------------------------------------------------------------- Preamble |Destination |Source | Type | Data | CRC ----------|------------------|---------|------|---------|---------- 8 bytes |6 |6 | 2 |46-1500 | 4 ------------------------------------------------------------------- IEEE 802.3 Packet Format ------------------------------------------------------------------- Preamble |SFD|Destination |Source | Len. | Data | Pad | CRC ----------|---|-------------|----------|------|------|-----|------- 7 bytes |1 | 6 |6 | 2 | 46-1500 | 4 ------------------------------------------------------------------- .h1;Preamble The IEEE specification splits the Ethernet Preamble into a 7-byte Preamble and a 1-byte Start Frame Delimiter (SFD). The 802.3 Preamble and SFD, however, are identical to the Ethernet Preamble. .h1;Destination Address Ethernet: 6 bytes, P/M-bit + 47 bit address P/M-bit=0 for a Physical address, 1 for a Multicast address. IEEE 802.3: 6 bytes, I/G-bit + U/L-bit + 46-bit address. I/G-bit = 0 for an Individual address, 1 for a Group address. U/L-bit = 0 for a Universally administered address, 1 for a Locally administered address. (Universal addresses are unique anywhere in the world, local addresses are unique to a specific network.) .h1;Source Address Ethernet: 6 bytes; the high-order bit (P/M-bit) is always 0. IEEE 802.3: 6 bytes; the high-order bit (I/G-bit) is always 0. .h1;Type vs. Length The IEEE 702.3 specification does not include a Type field; instead there is a 2-byte Length field that specifies the length of the data field that will follow. .h1;Data The IEEE 802.3 specification splits the Ethernet Data field into a Data and a Pad field. The Data field has the length specified in the Length field, and the Pad field comprises bytes appended if necessary to the Data field to ensure that the minimum packet length requirement is met (it can contain zero bytes). The combined size of the IEEE 802.3 Data and Pad fields must be between 46 and 1500 bytes, as in Ethernet. .h1;CRC Same for IEEE 802.3 and Ethernet. .h1;3Com Adapters 3Com supports the Ethernet packet format in its 3+ and 3+Open drivers. As far as the hardware is concerned, 3Com adapters can work in Ethernet Version 1.0, Ethernet Version 2.0, and IEEE 802.3 networks, because the network controller and the transceiver are capable of supporting the three different specifications.