Kaigai Blog living abroad in my twenties

【My Study Note】Ethernet and Mac Addresses

Infotech Networking

Ethernet and Mac Addresses

Ethernet

Ethernet is the most widely used protocol to send data across individual links. Ethernet and the data link layer provide a means for software at higher levels of the stack to send and receive data.

One of the primary purposes of this layer is to essentially abstract away the need for any other layers to care about the physical layer and what hardware is in use. By dumping this responsibility on the data link layer, the Internet, transport, and application layers can all operate the same no matter how the device they’re running on is connected.

So, for example, your web browser doesn’t need to know if it’s running on a device connected via a twisted pair or a wireless connection. It’s the job of the data link layer.

History of the Ethernet

Ethernet is a fairly old technology. It first came into being in 1980 and saw its first fully polished standardization in 1983.

Since then, a few changes have been introduced primarily in order to support ever-increasing bandwidth needs. For the most part though, the Ethernet in use today is comparable to the Ethernet standards as first published all those years ago.

In 1983, computer networking was totally different than it is today. One of the notable differences in land topology was that the switch or switchable hub hadn’t been invented yet. This meant that frequently, many or all devices on a network shared a single collision domain.

What is Collision Domain?

A collision domain is a network segment where only one device can speak at a time. This is because all data in a collision domain is sent to all the nodes connected to it. If two computers were to send data across the wire at the same time, this would result in literal collisions of the electrical current representing our ones and zeros, leaving the end result unintelligible.

Collision Domain is often caused by using Hub

CSMA/CD

Ethernet, as a protocol, solved this problem by using a technique known as CSMA/CD (carrier sense multiple access with collision detection).

CSMA/CD is used to determine when the communications channels are clear and when the device is free to transmit data. The way CSMA/CD works is actually pretty simple.

If there’s no data currently being transmitted on the network segment, a node will feel free to send data. If it turns out that two or more computers end up trying to send data at the same time, the computers detect this collision and stop sending data.

Each device involved in the collision then waits a random interval of time before trying to send data again. This random interval helps to prevent all the computers involved in the collision from colliding again the next time they try to transmit anything.

Mac Address

When a network segment is a collision domain, it means that all devices on that segment receive all communication across the entire segment. This means we need a way to identify which node the transmission was actually meant for.

This is where something known as a MAC (Media Access Control) address comes into play. A MAC address is a globally unique identifier attached to an individual network interface.

It’s a 48-bit number normally represented by six groupings of two hexadecimal numbers.
e.g. 00-B0-D0-63-C2-26

Another way to reference each group of numbers in a MAC address is an octet.

An octet, in computer networking, is any number that can be represented by 8 bits.

In this case, two hexadecimal digits can represent the same numbers that 8 bits can.
——

How can it be unique identifier?

Since the Mac Address is represented by 48-bit, the total number of possible MAC addresses that could exist is 2 to the power 48 or 281,474,976,710,656 unique possibilities.

Mac Address is split into 2 sections.

OUI (Organizationally Unique Identifier)

The first three octets of a MAC address are OUI. These are assigned to individual hardware manufacturers by the IEEE (Institute of Electrical and Electronics Engineers).

This means you can always identify the manufacture of a network interface purely by its Mac address.

The last three octets of MAC address

The last three octets of MAC address can be assigned in any way that the manufacturer would like with the condition that they only assign each possible address once to keep all MAC addresses globally unique.

Ethernet uses MAC addresses to ensure that the data it sends has both an address for the machine that sent the transmission, as well as the one that the transmission was intended for.

In this way, even on a network segment, acting as a single collision domain, each node on that network knows when traffic is intended for it.