WWW

How the Internet Works, Chapter 3
The Link Layer: the Physical Network

posted in: How the Internet Works | 0

The physical network is the hardware on which the internet runs. It consists of various connected devices and cables, along with the electrical and radio signals that the devices use to transmit data.

While the actual physical media on which data is moved about are considered to be part of the Link Layer, the TCP/IP model simply assumes that those media exist and doesn’t attempt to define them in any specific way. The layer goes only as far as defining the way that data is sent through these physical media.

Some of the nodes (individual devices) on the physical network are computers, hubs, switches, routers and WiFi transmitters. (Most so-called “routers” in typical residential and small business internet installations are actually a combination of a router, a switch and a WiFi transmitter.)

Hubs and Switches

Both hubs and switches are used to connect nodes together into a local area network, or LAN. Both have a number of cable ports (places to plug a cable into). The cables are used to connect each node’s Network Interface Card (NIC) to the hub or switch. But while the physical connection process is the same for hubs and switches, they behave quite differently.

Hubs

Hubs are an older technology that simply takes an incoming signal and sends it out to every other port. When hubs became available, they made it a lot easier to connect a group of computers into a LAN. However, they are inherently non-scalable. A collision happens when two signals are sent at the same time on the network. When this happens both signals have to be resent (one is resent a little after the other). Obviously, collisions slow down the network, and collisions increase exponentially as nodes are added to the network.

Switches

Switches solved this problem by adding a layer of software to send a signal only to its intended recipient. The nodes on the network plug into a box with a number of switches in it (called, not surprisingly, a switch box). Each switch has a list of all the nodes on its network, and uses each NIC’s specific address (called a Media Access Control address, or MAC address) to send a signal only to the node for which it is intended. This avoids the exponential collision problem when scaling.

Switches also avoid some security issues inherent in hub traffic. If every node receives the traffic from every other node, unauthorized users can find ways to access the information. Since switches don’t send the traffic to any node other than the intended recipient, the traffic is less exposed.

For these reasons, switches have largely replaced hubs in physical networks.

Routers

Routers send traffic from one network to another. Logically, from the standpoint of the LAN, routers are just like any other computer: they have their own MAC address, and switches have them in their “address book.” Traffic that is intended for the internet gets sent to the router, and the router sends it out into the internet. (How it actually does this, and how the traffic eventually gets to its destination node, are defined in the Link, Internet and Transport layers.)

WiFi Transmitters

A WiFi transmitter is a device that sends and receives data via radio waves. (WiFi is a set of protocols that specify how to do this.) A WiFi transmitter is physically connected to a router, and the router is connected to the internet. The “routers” in most homes and businesses are actually a WiFi transmitter and router. The antennae on the top of the device broadcast and receive the radio signals, while the router sends signals through the cable plugged into the wall.

The actual transportation of electrical and radio signals across the physical network also happens on the Link Layer. The next article gives an overview of how that happens.