AlgoInsight

Free lesson · Computer Networking

The Physical Layer Signals Media And Hardware

Easy10 min readnetworkingcomputer-networkstcp-ip

Where Data Becomes Physical

Every piece of data you have ever sent over a network - every HTTP request, every DNS query, every video frame - eventually becomes a physical signal traveling through a physical medium. Before it is a packet, before it is a frame, before it is anything the upper layers understand, it is a voltage change on a copper wire, a pulse of light in a glass fiber, or a radio wave bouncing off walls.

The Physical layer (Layer 1 in the OSI model) is where the digital world meets the physical world. Its job is straightforward but foundational: take the ones and zeros that the Data Link layer hands down and convert them into signals that can travel across a transmission medium to another device. On the receiving side, it does the reverse - converting physical signals back into ones and zeros for the Data Link layer to process.

Most software engineers never interact with the Physical layer directly. You do not write code that manipulates voltage levels or modulates radio frequencies. But understanding what happens at this layer prevents a category of confusion that shows up in System Design discussions - confusion about why bandwidth has limits, why latency has a physical floor, why wireless is less reliable than wired, and why the speed of light is not just a physics concept but a real engineering constraint.

How Bits Become Signals

A bit is an abstraction - a one or a zero. A signal is a physical phenomenon - a voltage, a light pulse, a radio wave. The Physical layer's core function is the translation between these two representations.

Electrical Signals (Copper Cable)

In copper-based Ethernet cables, bits are represented as changes in voltage. The specific encoding scheme varies by Ethernet standard, but the principle is consistent: the transmitting device changes the voltage on the wire according to a defined pattern, and the receiving device reads those voltage changes and reconstructs the bit stream.

Modern Ethernet does not use simple "high voltage = 1, low voltage = 0" encoding. Instead, it uses more sophisticated schemes like Manchester encoding (used in 10BASE-T) or PAM-5 (Pulse Amplitude Modulation with 5 levels, used in Gigabit Ethernet). These encodings provide built-in clocking, error detection, and higher data rates by encoding multiple bits per signal change.

The practical limitation of copper is attenuation - the signal weakens over distance. Standard Ethernet copper cables (Category 5e and Category 6) have a maximum reliable distance of approximately 100 meters (328 feet). Beyond that distance, the signal degrades too much to be read accurately. This is why large buildings and data centers use switches and repeaters to extend network reach.

Optical Signals (Fiber Optic Cable)

Fiber optic cables transmit data as pulses of light through a thin glass or plastic core. A light pulse represents a one; the absence of light represents a zero (in the simplest encoding). More advanced modulation techniques encode multiple bits per light pulse.

Fiber has two fundamental advantages over copper: distance and bandwidth. Single-mode fiber can carry signals tens of kilometers without significant degradation - compared to copper's 100-meter limit. And fiber's bandwidth capacity is orders of magnitude higher because light can be modulated at much higher frequencies than electrical signals.

Fiber comes in two types:

The practical limitation of fiber is cost and fragility. Fiber connectors require precision alignment, fiber cables can break if bent too sharply, and splicing fiber requires specialized equipment. But for any connection that needs to span more than 100 meters or carry more than 10 Gbps, fiber is the only practical option.

Radio Signals (Wireless)

Wireless networking uses radio waves to carry data through the air. Wi-Fi (IEEE 802.11), Bluetooth, cellular networks (4G/5G), and satellite communications all operate at the Physical layer using radio frequency transmission.

In wireless networking, bits are encoded by modulating the properties of a radio wave - its amplitude, frequency, or phase. The receiving antenna detects these modulations and reconstructs the bit stream. Modern Wi-Fi standards like 802.11ax (Wi-Fi 6) use sophisticated modulation techniques like OFDMA (Orthogonal Frequency-Division Multiple Access) that divide the available radio spectrum into multiple subcarriers to transmit data in parallel.

The practical limitations of wireless are significant:

graph LR
    subgraph Copper["Copper (Ethernet Cable)"]
        C1["Voltage Changes<br/>on Wire"]
        C2["Max ~100m"]
        C3["Up to 10 Gbps<br/>(Cat 6a)"]
    end

    subgraph Fiber["Fiber Optic"]
        F1["Light Pulses<br/>in Glass"]
        F2["Up to 80+ km<br/>(single-mode)"]
        F3["Up to 400 Gbps+"]
    end

    subgraph Wireless["Wireless (Wi-Fi)"]
        W1["Radio Waves<br/>through Air"]
        W2["~30-100m indoors"]
        W3["Up to 9.6 Gbps<br/>(Wi-Fi 6 theoretical)"]
    end

    style C1 fill:#4f46e5,stroke:#4338ca,color:#fff
    style C2 fill:#4f46e5,stroke:#4338ca,color:#fff
    style C3 fill:#4f46e5,stroke:#4338ca,color:#fff
    style F1 fill:#7c3aed,stroke:#6d28d9,color:#fff
    style F2 fill:#7c3aed,stroke:#6d28d9,color:#fff
    style F3 fill:#7c3aed,stroke:#6d28d9,color:#fff
    style W1 fill:#8b5cf6,stroke:#7c3aed,color:#fff
    style W2 fill:#8b5cf6,stroke:#7c3aed,color:#fff
    style W3 fill:#8b5cf6,stroke:#7c3aed,color:#fff
This diagram compares three physical transmission media side by side. Copper Ethernet cables use voltage changes on wire, reach a maximum of about 100 meters, and support up to 10 Gbps with Category 6a cabling. Fiber optic cables use light pulses in glass, reach up to 80 or more kilometers with single-mode fiber, and support 400 Gbps and beyond. Wireless Wi-Fi uses radio waves through air, reaches about 30 to 100 meters indoors, and supports up to 9.6 Gbps theoretical maximum with Wi-Fi 6.

Bandwidth vs Throughput - Two Concepts That Sound the Same But Are Not

These terms are used interchangeably in casual conversation, but they mean different things, and confusing them leads to wrong conclusions about network performance.

Bandwidth is the maximum theoretical data rate of a link - the capacity of the pipe. A Gigabit Ethernet connection has a bandwidth of 1 Gbps. This is a property of the physical medium and the encoding scheme. Bandwidth is the speed limit posted on the highway.

Throughput is the actual data rate achieved in practice. It is always lower than bandwidth because of protocol overhead, network congestion, packet loss, and processing delays. A Gigabit Ethernet link might achieve 940 Mbps of actual throughput because TCP headers, Ethernet framing, and inter-packet gaps consume some of the raw capacity. Throughput is how fast you are actually driving on the highway.

A useful way to see the difference: if you upgrade your home internet from a 100 Mbps plan to a 1 Gbps plan, you have increased your bandwidth by 10x. But your throughput for any given download depends on the server's upload speed, the number of other users on the network, the quality of the routing path, and the protocol overhead. You might get 800 Mbps throughput on a speed test but only 200 Mbps when downloading a file from a congested server halfway across the world.

Latency is a related but distinct concept - the time it takes for a single bit to travel from source to destination. A satellite internet connection might have high bandwidth (100 Mbps) but very high latency (600+ ms round trip) because the signal travels 35,000 km to a geostationary satellite and back. A local Ethernet connection might have lower bandwidth but much lower latency (under 1 ms). For real-time applications like video calls and online gaming, latency often matters more than bandwidth.

Important: In System Design interviews, the distinction between bandwidth and latency drives many design decisions. A CDN reduces latency by placing content closer to users (shorter physical distance = less propagation delay). A load balancer distributes traffic to increase total throughput across multiple servers. A caching layer reduces latency for repeated requests. Each of these solutions addresses a different physical-layer reality.

Physical Layer Devices

A few network devices operate primarily at the Physical layer:

Hubs receive a signal on one port and retransmit it out every other port. They have no intelligence - they do not read addresses or make forwarding decisions. They simply amplify and repeat the signal. Hubs create a single collision domain where only one device can transmit at a time. If two devices transmit simultaneously, a collision occurs and both transmissions are corrupted. Hubs are essentially obsolete, replaced entirely by switches, but understanding them helps you understand why switches were such an important advancement.

Repeaters amplify and retransmit a signal to extend its reach beyond the cable's distance limit. A repeater at the 90-meter mark of a copper Ethernet cable can extend the connection to 180 meters. Like hubs, repeaters are purely Physical layer devices - they do not understand the content of the signals they repeat.

Network Interface Cards (NICs) are the hardware component in every networked device that performs the physical-to-digital conversion. Your laptop's Wi-Fi adapter is a NIC. The Ethernet port on a server is a NIC. The NIC handles the encoding and decoding of signals, the transmission and reception of data, and the interface between the Physical layer and the Data Link layer above it.

Media converters translate between different physical media - for example, converting an electrical Ethernet signal to an optical fiber signal. They operate purely at the Physical layer, changing the signal format without touching the data content. In data centers, you frequently see media converters or SFP (Small Form-factor Pluggable) transceivers at the boundary between copper and fiber segments - where short copper runs from servers meet longer fiber runs between racks or buildings.

Ethernet Cable Categories - A Practical Reference

If you have ever shopped for a network cable, you have encountered category designations. Here is what they mean:

Category Max Speed Max Distance Common Use
Cat 5 100 Mbps 100 m Legacy - avoid for new installations
Cat 5e 1 Gbps 100 m Home and small office networks
Cat 6 1 Gbps (10 Gbps at 55m) 100 m (55 m for 10G) Office networks, data centers
Cat 6a 10 Gbps 100 m Data centers, high-performance networks
Cat 7 10 Gbps 100 m Shielded environments, minimal interference
Cat 8 25/40 Gbps 30 m Short-distance data center connections

The category determines the cable's shielding, wire twist rate, and connector quality - all physical properties that affect how much data the cable can carry and how resistant it is to electromagnetic interference.

graph TD
    subgraph DataCenter["Data Center Typical Setup"]
        SRV1["Server Rack 1"] -->|"Cat 6a<br/>10 Gbps"| TOR1["Top-of-Rack<br/>Switch"]
        SRV2["Server Rack 2"] -->|"Cat 6a<br/>10 Gbps"| TOR1
        TOR1 -->|"Fiber (SMF)<br/>40-100 Gbps"| SPINE["Spine Switch"]
        TOR2["Top-of-Rack<br/>Switch"] -->|"Fiber (SMF)<br/>40-100 Gbps"| SPINE
        SPINE -->|"Fiber (SMF)<br/>100-400 Gbps"| BORDER["Border Router<br/>(to Internet)"]
    end

    style SRV1 fill:#a78bfa,stroke:#8b5cf6,color:#fff
    style SRV2 fill:#a78bfa,stroke:#8b5cf6,color:#fff
    style TOR1 fill:#7c3aed,stroke:#6d28d9,color:#fff
    style TOR2 fill:#7c3aed,stroke:#6d28d9,color:#fff
    style SPINE fill:#4f46e5,stroke:#4338ca,color:#fff
    style BORDER fill:#4f46e5,stroke:#4338ca,color:#fff
This diagram shows a typical data center physical network layout. Server racks connect to top-of-rack switches using Category 6a copper cables at 10 Gbps. The top-of-rack switches connect to a spine switch using single-mode fiber at 40 to 100 Gbps. The spine switch connects to a border router using single-mode fiber at 100 to 400 Gbps. This illustrates how faster and longer-distance media are used at higher levels of the network hierarchy.

Why the Physical Layer Matters for Software Engineers

You will almost never work directly with Physical layer concerns in your daily engineering work. But the Physical layer imposes constraints that affect every system you build:

Interview: You will almost never be asked about the Physical layer directly in a FAANG interview. But physical constraints come up indirectly in System Design:

"How would you reduce latency for users in Europe?" - The answer involves CDN edge nodes (shorter physical distance), and understanding that you cannot beat the speed of light across the Atlantic.

"What happens when the network link between two data centers is saturated?" - The answer involves physical bandwidth limits and the need for either increased link capacity (bigger pipe) or reduced traffic (compression, caching, smarter routing).

Understanding that these are Physical layer constraints - not software bugs - demonstrates systems thinking.

What Comes Next

Now that you understand how bits become signals and travel across physical media, the next topic covers Ethernet - the dominant Data Link layer technology that organizes those bits into frames, adds addressing, and manages access to the physical medium. Ethernet is the bridge between the physical world of signals and the logical world of network addresses.

Exercise: Starter: Check what type of network connection your current device is using. Is it Wi-Fi or Ethernet? If Wi-Fi, which 802.11 standard (look in your network adapter settings)? If Ethernet, can you determine the cable category by looking at the text printed on the cable jacket?

Intermediate: Calculate the minimum round-trip latency between two data centers: one in Virginia (us-east-1) and one in Frankfurt (eu-central-1). The straight-line distance is approximately 6,700 km. Assuming fiber travels at 200,000 km/s, what is the theoretical minimum round-trip time? How does this compare to actual measured latency between these AWS regions (search for published numbers)?

Advanced: Research how submarine fiber optic cables work. Companies like Google and Meta are investing billions in private submarine cables. How many submarine cables connect North America to Europe? What happens when one is damaged? How does redundancy work at the physical layer across ocean crossings?

Back to Computer Networking