Ethernet Basics

Oguzhan Ozturk
9 min readJul 26, 2021

--

Ethernet frame.

A basic Ethernet frame contains six pieces of information: the MAC address of the frame’s recipient, the MAC address of the sending system, the type of the data, the data itself, a pad (if needed), and a frame check sequence. Appended to the front of the frame is the preamble.

Preamble

All Ethernet frames begin with a preamble, a 7-byte series of alternating ones and zeroes followed by a 1-byte Start Frame. The preamble gives a receiving NIC time to realize a frame is coming and to know exactly where the frame starts. The preamble is added by the sending NIC.

MAC Addresses

Each NIC, often referred to as a node, on an Ethernet network must have a unique identifying address. Ethernet identifies the NICs on a network using special 48-bit (6-byte) binary addresses known as MAC addresses.

Type

An Ethernet frame may carry one of several types of data. The Type field helps the receiving computer interpret the frame contents at a very basic level. This way the receiving computer can tell if the frame contains IPv4 data, for example, or IPv6 data. (See Chapter 7 for more details on IPv4; I cover IPv6 in Chapter 8.) The Type field does not tell you if the frame carries higher-level data, such as an e-mail message or Web page. You have to dig deeper into the data section of the frame to find that information.

Data

The data part of the frame contains whatever payload the frame carries. If the frame carries an IP packet, that packet will include extra information, such as the IP addresses of both systems

Pad

The minimum Ethernet frame is 64 bytes in size, but not all of that has to be actual data. If an Ethernet frame has fewer than 64 bytes of data to haul, the sending NIC will automatically add extra data — a pad — to bring the data up to the minimum of 64 bytes.

Frame Check Sequence

The frame check sequence (FCS) enables Ethernet nodes to recognize when bad things happen to good data. Machines on a network must be able to detect when data has been damaged in transit. To detect errors, the computers on an Ethernet network attach a special code to each frame. When creating an Ethernet frame, the sending machine runs the data through a special mathematical formula and attaches the result, the frame check sequence, to the frame. The receiving machine opens the frame, performs the same calculation, and compares its answer with the one included with the frame. If the answers do not match, the receiving machine asks the sending machine to retransmit that frame. At this point, those crafty network engineers have solved two of the problems facing them: they’ve created frames to organize the data to be sent, and put in place MAC addresses to identify machines on the network. But the challenge of determining which machine should send data at which time requires another solution: CSMA/CD.

CSMA/CD

Ethernet networks use a system called carrier sense multiple access/collision detection (CSMA/CD) to determine which computer should use a shared cable at a given moment. Carrier sense means that each node using the network examines the cable before sending a data frame (Figure 4–4). If another machine is using the network, the node detects traffic on the segment, waits a few milliseconds, and then rechecks. If it detects no traffic — the more common term is to say the cable is “free” — the node sends out its frame.

10BaseT

In 1990, the IEEE 802.3 committee created a new version of Ethernet called 10BaseT to modernize the first generations of Ethernet. Very quickly, 10BaseT became the most popular network technology in the world, replacing competing and now long-gone competitors with names like Token Ring and AppleTalk. Over 99 percent of all networks use 10BaseT or one of its faster, newer, but very similar versions. The classic 10BaseT network consists of two or more computers connected to a central hub. The NICs connect with wires as specified by the 802.3 committees. 10BaseT hubs come in a variety of shapes and sizes to support different sizes of networks. The biggest differentiator between hubs is the number of ports (connections) that a single hub provides. A small hub might have only 4 ports, whereas a hub for a large network might have 48 ports. As you can imagine, the more ports on a hub, the more expensive the hub. Figure 4–10 shows two hubs. On the top is a small 8-port hub for small offices or the home. It rests on a 12- port rack-mount hub for larger networks.

-Ethernet is defined by the IEEE 802.3 standard

-The IEEE has defined many versions of Ethernet

-For the test, be able to recognize the Ethernet naming syntax

-Ethernet frames consist of a preamble, destination MAC, source MAC, data type, data, pad, and FCS

-A jumbo frame can carry 9000 bytes

-FCS is used for error detection

Early Ethernet Networks

Now we have the answers to many of the questions that faced those early Ethernet designers. MAC addresses identify each machine on the network. CSMA/CD determines when each machine should have access to the cable. But all this remains in the realm of theory — you still need to build the thing! Contemplating the physical network brings up numerous questions. What kind of cables should you use? What should they be made of? How long can they be? For these answers, turn to the IEEE 802.3 standard, both true bus, and star bus versions

Bus Ethernet

The original Ethernet networks employed a true bus topology, meaning every computer on a network connected to the same cable, the bus. In a Thicknet (10Base5) network, for example, devices tapped directly into a thick yellow cable that snaked throughout the network.

The last true bus Ethernet standard, called 10Base2 or Thinnet, fudged on the single wire concept by having wires connect at a NIC into a T connector The T connector enabled the bus to carry a single electrical signal that connected every device on the network

10Base2 networks — some are still in use today — use RG-58 coaxial cable with BNC connectors on the end. The complete network is limited to 185 meters. The big quirk with bus networks involves the signal. The ends of the bus have to be terminated, otherwise, the signal reflects and the whole network goes down.

-CSMA/CD stands for carrier sense multiple access/collision detection

-10Base5 and 10Base2 require terminating resistors at both ends of a segment (cable)

-When connecting to 10Base2, always use a “T” connector

UTP

Officially, 10BaseT requires the use of CAT 3 (or higher), two-pair, unshielded twisted-pair (UTP) cable. One pair of wires sends data to the hub, while the other pair receives data from the hub. Even though 10BaseT only requires two-pair cabling, everyone installs four-pair cabling to connect devices to the hub as insurance against the possible requirements of newer types of networking. Most UTP cables come with stranded Kevlar fibers to give the cable added strength, which, in turn, enables installers to pull on the cable without the excessive risk of literally ripping it apart.

10BaseT also introduced the networking world to the RJ-45 connector (Figure 4–12). Each pin on the RJ-45 connects to a single wire inside the cable; this enables devices to put voltage on the individual wires within the cable. The pins on the RJ-45 are numbered from 1 to 8

The 10BaseT standard designates some of these numbered wires for specific purposes. As mentioned earlier, although the cable has four pairs, 10BaseT uses only two of the pairs. 10BaseT devices use pins 1 and 2 to send data and pins 3 and 6 to receive data. Even though one pair of wires sends data and another receives data, a 10BaseT device connected to a hub cannot send and receive simultaneously. The rules of CSMA/CD still apply: only one device can use the segment contained in the hub without causing a collision. NICs that can communicate in only one direction at a time run in half-duplex mode. Later advances (as you’ll see shortly) enabled NICs to send and receive at the same time, thus running in full-duplex mode.

An RJ-45 connector is usually called a crimp, and the act (some folks call it an art) of installing a crimp onto the end of a piece of UTP cable is called crimping. The tool used to secure a crimp onto the end of a cable is a crimper. Each wire inside a UTP cable must connect to the proper pin inside the crimp. Manufacturers color-code each wire within a piece of four-pair UTP to assist in properly matching the ends. Each pair of wires consists of a solid-colored wire and a striped wire: blue/blue-white, orange/orange-white, brown/brown-white, and green/green-white

The ability to make your own Ethernet cables is a real plus for a network tech. With a reel of CAT 5e, a bag of RJ-45 connectors, a moderate investment in a crimping tool, and a little practice, you can kiss those mass-produced cables goodbye! You can make cables to your own length specifications, replace broken RJ-45 connectors that would otherwise mean tossing an entire cable — and, in the process, save your company or clients time and money.

-An RJ-45 (a.k.a 8P8C) connector is used to connect to most network cards

-Watch the position of the wires when crimping to follow 568A or 568B standards

-Straight-through cables are the most commonly used cable in networks

Modern Ethernet

Within a few years of its introduction, 10BaseT proved inadequate to meet the growing networking demand for speed. As with all things in the computing world, bandwidth is the key. Even with switching, the 10-Mbps speed of 10BaseT, seemingly so fast when first developed, quickly found a market clamoring for even faster speeds. This chapter looks at the improvements in Ethernet since 10BaseT.

100-Megabit Ethernet
The quest to break 10-Mbps network speeds in Ethernet started in the early 1990s. By then, 10BaseT Ethernet had established itself as the most popular networking technology (although other standards, such as IBM’s Token Ring, still had some market share). The goal was to create a new speed standard that made no changes to the actual Ethernet frames themselves. By doing this, the 802.3 committees ensured that different speeds of Ethernet could interconnect, assuming you had something that could handle the speed differences and a media converter if the connections were different. Two of the defining characteristics of Ethernet — the frame size and elements, and the way devices share access to the bus (carrier sense multiple access [CSMA]) — stay precisely the same when going from 10-megabit standards to 100-megabit (and beyond). This standardization ensures communication and scalability

100BaseT
If you want to make a lot of money in the technology world, create a standard and then get everyone else to buy into it. For that matter, you can even give the standard away and still make tons of cash if you have the inside line on making the hardware that supports the standard. When it came time to come up with a new standard to replace 10BaseT, network hardware makers forwarded a large number of potential standards, all focused on the prize of leading the new Ethernet standard. As a result, two twisted-pair Ethernet standards appeared: 100BaseT4 and 100BaseTX. 100BaseT4 used CAT 3 cable, whereas 100BaseTX used CAT 5. By the late 1990s, 100BaseTX became the dominant 100-megabit Ethernet standard. 100BaseT4 disappeared from the market and today has been forgotten. As a result, we never say 100BaseTX, simply choosing to use the term 100BaseT.

100BaseTX (100BaseT) Summary
• Speed 100 Mbps
• Signal type Baseband
• Distance 100 meters between the hub/switch and the node
• Node limit No more than 1024 nodes per hub/switch
• Topology Star-bus topology: physical star, logical bus
• Cable type CAT 5 or better UTP or STP cabling with RJ-45 connectors

A baseband network means that only a single signal travels over the wires of the network at one time, occupying the lowest frequencies. Ethernet networks are baseband. Contrast this with broadband, where you can get multiple signals to flow over the same wire at the same time, modulating to higher frequencies. The latter is how cable television and cable Internet work.

100BaseFX Summary
• Speed 100 Mbps
• Signal type Baseband
• Distance Two kilometers between the hub/switch and the node
• Node limit No more than 1024 nodes per hub/switch
• Topology Star-bus topology: physical star, logical bus • Cable type Multimode fiber-optic cabling with ST or SC connectors

-Full-duplex mode allows both sides of a conversation to occur at the same time
-100BaseT (a.k.a 100BaseTX) runs at 100 Mbps up to 100 meters
-100BaseFX, a fiber solution, runs at 100 Mbps up to 2 kilometers.

--

--