How does Ethernet work?

The Internet consists of multiple layers, and today we are talking about one of the lowest ones, Ethernet. If you don’t know what this means, that’s fine. To understand how your local network works we need to go back in time about 30 years. Back in those days computing hardware was rather expensive. Instead of the current setup where we plug everything into a router, a much different system was in use. All network-connected hardware had to be linked up to one long coaxial cable.

 At any given time, only one device could send data over the network, so the system had to be designed around that. When a computer wanted to send some data, it first had to “shout” a special set of bits on the network, which basically equates to “everybody please be quiet, I want to send something”. If two devices did this at the same time, they would detect this conflict and wait a random amount of time before trying again. This initial sequence of bits is called the preamble.

Once a device has successfully gotten their preamble out, they could then send data over the network. In order to ensure that every device gets a chance to send data, the amount of data they could send was limited. If they wanted to send more data, they would have to split it up into multiple pieces called Ethernet frames and send them one by one. To locate their target, every network device has a unique number, called a Media Access Control Address, or MAC for short. MAC prefixes are assigned to hardware vendors, and each network chip or card gets a globally unique address. These MAC addresses were used in Ethernet, much like addresses on envelopes. After the preamble and a short pause called the Start Frame Delimiter, devices had to send the MAC address of the target computer, followed by their own MAC.

 If they didn’t know the destination MAC, or they wanted to send something to every machine on the network, they could use the special broadcast MAC of all F’s. This enabled machines to advertise services, such as print availability or file shares, to other devices. Regardless of the destination MAC, however, these Ethernet frames may in some cases be sent to all machines on the network. In other words, you cannot rely on the correct MAC address for security. This is true even with high end datacenter equipment. Following the MAC addresses, the Ethernet frame must also contain one more field, called an Ethertype. This field is a bit tricky, because it can be used for two different purposes. 

If the number in this field is 1500 or lower, it indicates the total length of the Ethernet frame. If it is 1536 or higher, it indicates the type of data contained within this Ethernet frame. Nowadays it is typically used to indicate the contents of the frame rather than the length. After all this addressing information, we are now finally able to send some data over the network. On a typical setup, this information is limited to 1500 bytes, which is followed by a so-called checksum. The checksum verifies that the contents of the frame have not been corrupted in transport. That’s it! The frame is now sent, and after 12 bytes of silence, the race for the preambles can begin again and more data can be sent. If we come back to the present, not much has changed. 
Sure, we have dedicated cables for our devices and we have smart switches and routers that can communicate with multiple devices at the same time, but the Ethernet protocol hasn’t changed much. Apart from some carrier-grade networks, we still use the same frame structure for our local communication. If you want to take a look at Ethernet in action, I recommend you install a program called Wire shark, which lets you take a look at all the traffic on your own computer. As you may notice, Ethernet is a local network cable only. It doesn’t provide us with any means to communicate with devices outside our own environment. That is the task of IP, a protocol that sits on top of Ethernet, which we will discuss in another video. Thank you for watching! If you learned something today, feel free to like, share and subscribe and I will see you next time.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website with WordPress.com
Get started
%d bloggers like this: