2
\$\begingroup\$

sorry if this is a bit of a dumb question, but I read somewhere that cat-5 is 4 twisted pairs. so that means at most it's transmitting 4 bits at a time. What determines how often the 4 bits are measured in order to create a packet structure?

I know how the ethernet frame is laid out, but I'm really confused about what defines how often each bit is measured? I assume that there is a standard for each type of wiring, but I haven't been able to find it.

if the 4 bits are 1011 for 2 sec, you get vastly different data based on how many times it's measured in that one second. So that must be defined for each type of wiring somewhere i assume.

\$\endgroup\$
  • \$\begingroup\$ Ethernet transmits bits serially. Look into serial communication. You should probably start learning about serial communication by reading about RS-232, because it's simpler than Ethernet (albeit serves a different purpose). \$\endgroup\$ – Nick Alexeev Oct 31 '15 at 23:19
  • \$\begingroup\$ You are correct that cat5 cable has 4 twisted pairs, but that doesn't mean that all 4 pairs are in use. There are a couple different configurations for the four pairs, but in the most common configuration, 1 pair is used for TX and one pair is used for RX. The other 2 pairs are unused. \$\endgroup\$ – Dan Laks Oct 31 '15 at 23:24
  • 1
    \$\begingroup\$ The answer to your question would be so long and complicated that it cannot possibly be added here. Ethernet signalling has features to it that ensure that the clock can be recovered at the receiver to work around the problem you foresee. Different versions of ethernet use different schemes (10 Mbit, 100 Mbit, 1Gbit). Not all versions of ethernet use all wire pairs, but 1 Gbit ethernet does require all pairs, and does send 4 bits at a time (in both directions simultaneously). \$\endgroup\$ – mkeith Oct 31 '15 at 23:28
  • \$\begingroup\$ You can download the Ethernet standard[s] for free : standards.ieee.org/about/get/802/802.3.html . There are thousands of pages, from 10Mbps to beyond 10Gbps, over copper, fibre... \$\endgroup\$ – TEMLIB Nov 1 '15 at 0:07
  • 1
    \$\begingroup\$ @mkeith: I think I've managed to give him a useful summary. Of course I didn't actually get into any details of the encodings used, but I gave him links where he can read more about each. \$\endgroup\$ – Fizz Nov 1 '15 at 0:43
7
\$\begingroup\$

if the 4 bits are 1011 for 2 sec, you get vastly different data based on how many times it's measured in that one second

This indeed a [potential] problem in communication in general (ignoring the fact that you've got quite a few details about Ethernet wrong). There are numerous schemes to avoid this issue, like encoding a clock signal in the data, e.g. Manchester code, which is used in some (generally older) versions of Ethernet (10Mbit). Fast Ethernet (100BASE-TX) uses 4B5B encoding and also a three-voltages scheme called MLT-3, which serves a dual purpose of combining the data with a clock and to reduce the spectrum.

Gigabit Ethernet over twisted pairs (more precisely 1000BASE-T) uses five different voltage levels so it's a "quinary" code at the wire level. You'll want to look up 4D-PAM5 encoding for details... which are pretty hairy. Essentially every 8 bits of input data (256-symbol space) are converted to a point in a 625-symbol space. But only 512 of the latter are used, and they are selected in complicated manner (only specific sequences are allowed) designed to minimize the likelihood that over-the-wire errors will confuse the receiver.

Here's a nice summary image for the popular Ethernet types over copper from this book:

enter image description here

The other stuff for GigE in that figure is a pseudo-random scrambler (used to spread the spectrum and reduce the DC component) and a Forward Error Correction block, more precisely a trellis encoder (a convolutional encoder); a Viterbi decoder is used at the receiving end to correct errors.

Another interesting bit (in relation to your highlighted question) about Gigabit Ethernet is that whenever two such devices are connected one is chosen to be master and the other one is chosen to be slave. The slave's clock is synchronized to the master's via a continuous stream of symbols. A side-effect of this design is that Gigabit Ethernet sends stuff on wire all the time, even when it got no data to send... in which case it just sends IDLE symbols just so it keeps the slave's clock synchronized. Actually Fast Ethernet did/does the same thing in this respect (IDLE symbols), and it's easier to put that on a graph:

enter image description here

\$\endgroup\$
  • \$\begingroup\$ Good answer. To the OP, for extra credit, you can research how RS-232 data links stay synchronized, and also how do T1 lines stay syncrhonized, and you may find reading about fiberchannel over copper and SERDES schemes also to be interesting. \$\endgroup\$ – mkeith Nov 1 '15 at 1:24
  • \$\begingroup\$ By the way, here is 74-slide presentation that has a lot more details on the Physical Coding Sublayer (PCS) as this layer of Ethernet is called. That presentation is a bit dated and based on a draft of the standard, but should be informative enough. \$\endgroup\$ – Fizz Nov 1 '15 at 3:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.