Part 3 - Layers 1 and 2

At the beginning there was only one computer, sitting alone.

Single Computer

There were other computers around but there was no way for them to communicate.

Two Disconnected Computers

Then, someone came along with a cable and connected them using small electrical signals. The computers were happy, they could finally talk to other computers.

Two Connected Computers

Physical Layer

The connection that we have to make between two computers has to be some physical connection. We can think of the connection as a physical wire that carries some signal using electricity or light, or we can also think about wireless connections where the signal is carried by electromagnetic waves travelling through space-time.

Whatever we choose as the physical connection layer, though, needs to provide facilities to ensure that data can be communicated in both directions (maybe not simultaneously) and there is a clear boundary between when a data packet starts and ends.

The physical layer of the network stack, is thus, responsible for ensuring that the digital bits handed off to it is converted to the appropriate physical signals and transmitted over the connecting medium. Moreover, since each media has a certain capacity for how much communication it can handle, the physical layer is also responsible for ensuring that it is not sending data faster than what the connection can handle.

Common physical layers are the twisted pair CAT-5 or CAT-6 cables for Ethernet, electromagnetic waves at 2.4GHz or 5Ghz frequency for WiFi, etc.

An interesting thing to notice for the physical layer is what happens if we connect more than two computers together. How should data flow in that case?

Since these networks are packet switched, there are no circuits of communication as it exists over phone lines for example. So we can’t just split a CAT6 cable and run it to two different computers, we need an active device in between to duplicate the signal across to the other cable.

Three computers connected

The thing that sits in the middle there is called a “hub” and does something very simple: it just receives signals on any port and broadcasts the same signal over all the other ports. Thus, there is no logic in a simple hub and, for that reason, it is quite wasteful. But it is also the simplest network device you can build.

Since a Hub operates on the physical layer, it is called a Layer 1 (or L1) device.

By the way, each data unit that is sent over this layer is called a “Symbol”

Remember that the data carried in an Ethernet frame is nothing more than the data packet passed to the Data-Link layer from the layer above, which is the Network layer. That layer we will cover in our next part