(under construction) The Quickstart Guide to Ethernet

What the heck is Ethernet actually? Once you get exposed to formal networking concepts (things like OSI Layers), Ethernet actually becomes a little more confusing had you been thinking of it merely as a cable type. But the fact that we can use Ethernet over different mediums such as fiber and then hear things 10BASE-T and MAC addresses and so on, it starts to seem like Ethernet might actually encompass a lot more than just a cable type. This guide is meant to walkthrough the formal make up of Ethernet, but it attempts to do so in a casual way such that you can read through quickly whenever you need a refresher.

What is the goal of Ethernet?

Simply put, Ethernet is concerned with getting a chunk of data (i.e. some bytes) from one host to another host that are physically connected in some way. Further, Ethernet wants to make this exchange of data chunks possible between multiple hosts (more than two). Thus, the implementation of Ethernet need to support this concepts of multiple hosts being able to communicate with one another using a shared physical medium. This idea of having multiple hosts share a single medium is fundamental to what Ethernet is attempting to achieve. For example, if you only need to connect two computer to exchange data, why not use some other technology like USB?

Ethernet is a family of technologies

Another important realization that should be made is that Ethernet is not just "one technology" but rather a family of technologies. This might sound confusing as to why something so succinctly referred to as "Ethernet" can have hundreds of different permutations (e.g. 10BASE-T, 100BASE-TX, 1000BASE-T, ...). We'll expand on this topic, but just realize these are different implementations attempting to acheive the same goal: getting a chunk of data from one host to another host via a shared medium.

MAC Addresses

All Ethernet hosts possess a unique identifiefer called a Media Access Control (MAC) address. Because Ethernet uses a shared medium for hosts to communicate, this MAC address is used for hosts to specifical target one another and ignores received messages that were not intended for them. The MAC address is sometimes referred to as the physical address as it is "burned into" the hardware by manufacture. (contrast this with the separate topic of IP addresses which are software configurable).

The Ethernet Frame

So if Ethernet is just some big happy family, what makes it a family? What do they have in common? Well one of those things is the Ethernet frame. This is the standard message format of messages exchanged between hosts on an Ethernet network. Regardless of physical medium being used (fiber, copper, etc.), the Ethernet frame is the common message format. We're skipping over a few nuances (e.g. VLANs, Ethernet frame types, ...) but looks ignore those for now. Take a look at the diagram below.

Ethernet Frame Diagram

Unicast, Broadcast, and Multicast Messaging

Let's imagine a single host on an Ethernet network wants to communicate the same message to multiple target hosts. Should that host simply send out identifical Ethernet frames and update the destination MAC address each time? It could do that, but that would be rather inefficient. Recall that we're using a shared medium, thus any Ethernet frame could technically be seen by all hosts on the network even if it's not addressed to them. So let's leverage that. But first, let's first define a few message target types.

Benefits of broadcast and multicast support include reduced CPU usage from hosts having to retransmit otherwise identical messages and reduction of overall network bandwidth. But how does Ethernet actually support these different transmission types? The short answer is that we encode that information into the destination MAC address within the Ethernet frame. Let's dig more into that.

Unicast

Recall that unicast is a message that is intended for only one recipient. Ethernet achieves this by simply setting the destination MAC address in the ethernet frame to the specific target host's address.

Broadcast

For broadcast messages intended to all hosts, Ethernet achieves this by using the special destination MAC address of FF:FF:FF:FF:FF:FF. Note that this hex representation is the same as all bits being set in binary. When a host puts this address in an Ethernet frame, all other listening hosts should consume the message.

Multicast

I'll admit, I have actually over simplified Ethernet unicast and broadcast as described above. That will reveal itself as I talk about multicast support below. However, don't dwell on this too much as it may be somewhat confusing to begin. Just realize that multicast is concerned with efficiently sending Ethernet frame to a group of hosts on an Ethernet network. That's the key take away.

In order to understand Ethernet multicast, it's important to know that MAC addresses are not entirely random addresses. Rather, there is some structure encoded within them. One example of that is the I/G bit which is the least significant bit within the first octet of the MAC address. Feel free to pause and think about where that bit is located.

I/G stands for "Individual/Group". Thus the I/G bit indiciates whether the address corresponds to an individual or a group. A value of 0 indicates the address is assocated with an individual host. A value of 1 indicates the address is assocated with a group of hosts.

Thus for unicast messages, the destination MAC address will always feature a value of 0 since the address corresponds to an individual target. If you were to look at your PCs Ethernet MAC address, you'll notice that this bit will be a value of 0. Whenever a host receives an Ethernet frame whose destination MAC address is a individual address but it does not match its own address, the host will simply drop that frame.

Looking back at our broadcast address of FF:FF:FF:FF:FF:FF, you'll notice that the I/G bit in this address corresponds to it being a group address. And that's exactly correct. The broadcast address is actually just a special case group address. Think of it as a group address in which all hosts are members.

So that brings us back to our original topic of multicast message. If a host a receives an Ethernet frame whose destination MAC address is a group address, it will ask itself if it's a member of the specific group. If the host is a member, it will consume the message. Otherwise it will drop the message.

Pause for a Moment

Here's what we know so far about Ethernet:

This is actually pretty simple so far. Ethernet is simply a concept in which hosts can communicate data to one another using a common messsage frame structure. However, we haven't even talked about things like switches, bit rates, fiber versus copper, etc. Aren't those things also important to Ethernet?

They absolutely are. Yet those are simply implementation details that enable Ethernet frames to be passed to hosts. This implemention is also known as the physical layer of Ethernet which could be considered a bit more complex to understand. We'll attempt to break down the physical layer for the remainder of this tutorial, however, it's very important to realize that they are simply the means to allows hosts to pass Ethernet frames to one another. So feel free to get lost in the details of the physical layer, but don't forget that it's simply the means to support the concepts we've described thus far.

Ethernet Physical Layer (PHY)

The Ethernet physical layer is the 'nuts and bolts' to enabling the higher level concepts we've discussed so far and attempts to answer questions that touch on topics of:

When creating a solution to answer these questions, the phsyical layer will end up making decisions on

Take a moment and search "Ethernet Physical Layer" on Wikipedia. You will find over a hundred different implementation standards of Ethernet that run over a variety of mediums (twisted pair, fiber, coax). The hardware circuits that make up these implementations are often referred to as PHYs. The reason there are so many different implementation is that there a continuous strive to build more capable Ethernet systems (e.g. faster, greater distances, ...).

Ethernet Over Twisted-Pair (Copper)

Most of us interact with Ethernet in the twisted-pair variants. This is the form of Ethernet that uses the commonly termed "Ethernet Cable" which contains pairs of twisted insulated wires (quickly Google "twisted-pair" if you need a visual reference). Three of the most common twisted-pair Ethernet variants are shown in the table below.

Name Year Speed [Mbits/sec] Signal Bandwidth [MHz] Cable Max Distance [m] Twisted Pairs Required Pairs Per Direction [Rx/Tx]
10BASE-T 1990 10 10 CAT3 100 2 1
100BASE-TX 1995 100 31.25 CAT5 100 2 1
1000BASE-T 1999 1000 62.5 CAT5 100 4 4

Let's make a few key observations from this table.

Ethernet Over Fiber

TODO

Connecting Things Together

Ethernet relies on the existence of a shared medium that hosts access in order to communicate with one another. This medium is referred to as 'shared' since it used by all hosts independently of one another. For example, hosts A and B may be trying to have a conversation with one another at the same time as hosts C and D. It is important that each host be aware of this behavior such hosts play as nicely as possibe to one another. But how do we actually connect these hosts to one another? Let's walk through a short history of this topic while making some important definitions.

The first commercially available Ethernet variant 10Base5 used a coaxial cable as its shared medium. Hosts would be terminated onto this cable through use of things like 'Vampire Taps' (seriously, take 2 minutes to Google this to appreciate the name). In this configuration, hosts literally share the same communication medium and have the freedom to step on one another and corrupt each others message. When Ethernet hosts are able to corrupt each others messages, they're considered to be in the same collision domain. Thus, Ethernet hosts must implement things like carrier-sense multiple access with collision detection (CSMA/CD) in an attempt to nicely co-exist with one another

Ethernet hubs were

But how do we actually connect multiple hosts one another to a create Ethernet networks? Well the answer to that question has varied over the years (e.g. do a quick search on 'Vampire Taps'), but modern Ethernet typically uses switches. Switches allow hosts to be terminated to form junctions (e.g. 16 port switch), but more precisely switches enable Ethernet frames to be intelligently passed between hosts on a network.

To Be Continued...