Ethernet physics for the little ones

Published on November 11, 2012

Ethernet physics for the little ones

  • Tutorial
  • What is a collision domain?
  • How many pairs are used for Ethernet and why?
  • Which pairs are receiving, and by which transmission?
  • What limits the length of a network segment?
  • Why can't a frame be smaller than a certain size?


If you do not know the answers to these questions, but to read the standards and serious literature on the topic of laziness - please, under cat.


Someone believes that these are obvious things, others will say that a boring and unnecessary theory. Nevertheless, during interviews you can periodically hear similar questions. My opinion: what will be discussed below should be known to everyone who has to pick up the “crimp” 8P8C (this connector is usually mistakenly called RJ-45 ). I do not pretend to academic depth, I will refrain from formulas and tables, we will also leave linear coding overboard. It will mainly be about copper wires, not optics, because they are more widespread in everyday life.

Ethernet technology immediately describes the two lower levels of the OSI model . Physical and channel. Further we will talk only about the physical, i.e. about how bits are transmitted between two neighboring devices.

Ethernet technology is part of Xerox PARC 's rich heritage . Earlier versions of Ethernet used a coaxial cable as transmission medium, but over time it was completely replaced by optical fiber and twisted pair. However, it is important to understand that the use of coaxial cable has largely determined the principles of Ethernet. The fact is that coaxial cable is a shared transmission medium. An important feature of the shared environment: several interfaces can use it at the same time, but only one must transmit at any one time. Using a coaxial cable, you can connect not only 2 computers to each other, but also more than two, without the use of active equipment. This topology is called a bus.. However, if at least two nodes on the same bus begin to transmit information simultaneously, then their signals will overlap and the receivers of the other nodes will not understand anything. This situation is called a collision , and the part of the network in which the nodes compete for a common transmission medium is called the collision domain . In order to recognize a collision, the transmitting node constantly monitors the signals in the medium and if its own transmitted signal is different from the observed one, the collision is recorded. In this case, all nodes stop transmitting and resume transmission after a random period of time.

Collision domain diameter and minimum frame size


Now let's imagine what will happen if, in the network shown in the figure, nodes A and C simultaneously begin transmission, but have time to finish it before they receive each other's signal. This is possible with a sufficiently short transmitted message and a sufficiently long cable, because, as we know from the school curriculum, the propagation speed of any signals in the best case is C = 3 * 10 8 m / s. Because each of the transmitting nodes will receive a counter signal only after it has already finished transmitting its message - the fact that a collision has occurred will not be established by any of them, which means there will be no retransmission of frames. But the node B at the input will receive the sum of the signals and will not be able to correctly receive any of them. In order to prevent this situation from happening, it is necessary to limit the size of the collision domain andminimum frame size. It is not difficult to guess that these quantities are directly proportional to each other. If the amount of transmitted information does not reach the minimum frame, then it is increased due to the special pad field, the name of which can be translated as a placeholder.

Thus, the larger the potential size of the network segment, the more overhead it takes to transfer small portions of data. The developers of Ethernet technology had to find a middle ground between these two parameters, and the minimum frame size was set to 64 bytes.

Twisted pair and duplex operation

Twisted pair as a transmission medium differs from a coaxial cable in that it can connect only two nodes and uses separate media to transmit information in different directions. One pair is used for transmission (1.2 pins, usually orange and white-orange wires) and one pair for reception (3.6 pins, usually green and white-green wires). On active network equipment, vice versa. It is not difficult to notice that the central pair of contacts is missing: 4, 5. This pair was specially left free, if you insert RJ11 into the same socket, it will take just free contacts. Thus, one cable and one socket can be used for LAN and, for example, a telephone. The pairs in the cable are selected in such a way as to minimize the mutual influence of the signals on each other and improve the quality of communication.
To connect two devices of the same type, for example two computers, a so-called crossover cable is used , in which one pair connects the contacts of 1.2 on one side and 3.6 on the other, and the second on the contrary: 3.6 contacts of one side and 1 , 2 other. This is necessary in order to connect the receiver to the transmitter, if you use a direct cable, you get a receiver-receiver, transmitter-transmitter. Although now it matters only if you work with some archaic equipment, because almost all modern equipment supports Auto-MDIX - a technology that allows the interface to automatically determine which pair the reception and which transmission.

The question arises: where does the restriction on Ethernet segment length over twisted pair come from if there is no shared medium? The thing is, the first networks built on twisted pair used hubs. A hub (in other words, a multi-input repeater) is a device that has several Ethernet ports and translates the received packet to all ports except the one from which this packet came. Thus, if the hub began to receive signals from two ports at once, then he did not know what to transmit to the other ports, it was a collision. The same was true for the first Ethernet networks using optics (10Base-FL).

Why then use a 4-pair cable if only 4 out of 4 pairs are used? A reasonable question, and here are a few reasons for doing this:

  • A 4-pair cable is mechanically more reliable than a 2-pair cable.
  • The 4-pair cable does not have to be changed when switching to Gigabit Ethernet or 100BaseT4, which already use all 4 pairs
  • If one pair is broken, you can use a free one instead of it and do not shift the cable
  • Ability to use Power over ethernet technology


Despite this, in practice they often use a 2-pair cable, connect 2 computers at once with one 4-pair cable, or use free pairs to connect the phone.

Gigabit ethernet


imageUnlike its predecessors, Gigabit Ethernet always uses all 4 pairs for transmission at the same time. Moreover, in two directions at once. In addition, the information is encoded not by two levels as usual (0 and 1), but by four (00,01,10,11). Those. the voltage level at each particular moment encodes not one, but two bits at once. This is done in order to reduce the modulation frequency from 250 MHz to 125 MHz. In addition, a fifth level has been added to create code redundancy. It makes possible the correction of errors in reception. This type of coding is called five-level pulse-amplitude coding (PAM-5). In addition, in order to use all pairs simultaneouslyto receive and transmit, the network adapter subtracts from the common signal its own transmitted signal to get the signal transmitted by the other side. Thus, full-duplex mode is implemented on a single channel.

Further more


10 Gigabit Ethernet is already in full use by providers, but is not used in the SOHO segment, because Apparently there is enough Gigabit Ethernet. 10GBE as a medium of distribution uses single and multimode fiber, with or without wavelength-division multiplexing , copper cables with an InfiniBand connector as well as twisted-pair cable in the standard 10GBASE-T or IEEE 802.3an-2006.

40 gigabit Ethernet (or 40GbE ) and 100 gigabit Ethernet (or 100GbE ). The development of these standards was completed in July 2010. At the moment, leading manufacturers of network equipment such as Cisco, Juniper Networks and Huawei are already engaged in the development and production of the first routers supporting these technologies.

In conclusion, it is worth mentioning the promising Terabit Ethernet technology . Bob Metcalfe, the creator suggested that the technology will be developed by 2015, and also said:
To implement Ethernet 1 TB / s, many limitations need to be overcome, including 1550-nanometer lasers and 15 GHz modulation. For the future network, new modulation schemes are needed, as well as a new fiber, new lasers, in general, everything is new


UPD : Thanks to Nickel3000 habrayuzer for telling me that the connector that I called RJ45 all my life is actually 8P8C .
UPD2:: Thanks to user Wott for explaining why contacts 1,2,3 and 6 are used.