Transformations of Networking — Part 2

  1. Transformations of Networking — Part 1
  2. Transformations of Networking — Part 2 (this article)
  3. Transformations of Networking — Part 3
  4. Transformations of Networking — Part 4
  5. Transformations of Networking — Part 5

The Hub and 10baseT — 1990

The Wikipedia Network Hub Page

The Wikipedia 10baseT Page

10baseT and the hub freed networks from the limitations of coaxial cabling by creating a single location for all cables to come to — allowing network designers to create a star network design.

But for as much flexibility and growth as the hub made possible, it created other problems as network designs grew to the limits of the technology.

Because the hub was so easy to deploy, the temptation was to deploy these devices all over the network — and use the hardware to extend the network as required. Fundamentally this works, but there is more going on under the surface.

Hubs operate by receiving an electrical signal on a port, and internally amplify and repeat this signal on all the other ports of the device. This means that a signal created by a computer must be processed by the internal amplifier of a hub and re-emitted on the other ports of that hub; if many hubs were chained (often called daisy-chained) together linearly this had the effect of increasing the RTT (round-trip-time) between devices further than is permitted by Ethernet’s CSMA/CD.

You may recall that CSMA/CD is a protocol that detects signal collisions, whereby a host (having detected a collision) will wait a randomized amount of time before transmitting again. These timers are designed for a particular RTT, and if a network consisted of many daisy-chained hubs the time for all hosts to receive a signal transmission could in many cases exceed the timers of CSMA/CD — causing excessive collisions and therefore a slowdown of the network for all hosts. Because of this, a hub-based network is limited to two or three hubs chained together.

If that wasn’t bad enough, the flexibility of this new technology meant that sometimes network administrators would accidently (or maybe intentionally) create a loop in the Ethernet network by plugging two switches together:

A Layer 2 loop (like above) happens because a hub is designed to receive, and re-broadcast all signals it receives. When a Layer 2 loop is created, the effect is immediate and devastating — the entire network will slow to a crawl, the CPU resources of the computers attached are significantly affected as each host of the network must process received signals even if they are not ‘interesting’ to the host.

Despite all of these flaws many people use hubs in their homes, and their simple design means that they’re still useful today for network analysis.

The Network Switch — 1989

Wikipedia Network Switch page

A network switch is in many ways an intelligent hub. The switch tracks the unique MAC address (a 32 bit hexadecimal number associated with every host) in an internal table, and armed with this data is able to achieve the great feat of sending data out only those ports for which that data is destined.

The Wikipedia page on the Ethernet Frame

Confused? I was at first too. In each Ethernet frame, a header precedes the data payload. This header contains (among other things) the source MAC address, and the destination MAC address of the frame. In the early days of Ethernet when every host received every frame put on the network, this header allowed a host to determine if a data payload was interesting; a host would look at the header and if it recognized its MAC address in the destination field the host would further process the data, otherwise it could simply discard the rest of the frame and wait for another.

The switch took advantage of the data in the frame header.

  1. From the source MAC address in each frame, a switch is able to build a historical table of which MAC addresses were associated with particular switch-ports.
  2. However, when a switch is initially turned on this table is empty — so the correct behavior of an Ethernet switch is to operate as a hub for those MAC addresses that it does not know.
  3. Lastly, sometimes hosts come and go, or they can even change switch-ports, so the switch has a timer for each MAC-table entry (this timer is usually 10 minutes — but beware as it is sometimes configurable as some other amount)

This is how the switch brought about the second major transition of networking, which was the isolation of the collision domain. Isn’t that neat? Now instead of hosts being bombarded with traffic that they don’t even care about, the network is finally quiet. Almost too quiet.

Full-duplex Ethernet — 802.3x

the Wikipedia full-duplex page

Software engineers agreed that the network was too quiet, so they devised a way to get more data out of the network — and their solution was full-duplex Ethernet.

The Hub used CSMA/CD because every host on the network was subjected to a veritable cacophony of network traffic. Once hosts were directly connected to switches there was no risk of a collision on the local segment so Ethernet hosts could send and receive data at the same time — bringing us to Full Duplex. In this example, the local segment refers to the physical wire between the host and the switch.

It is for this reason that networks consider a full duplex connection to be double the bandwidth of a half-duplex connection. For example, if a server has a 10baseT, full-duplex network connection it is considered to have 20mbps of bandwidth; 10mbps in each direction.

Now you might say, what if Host A and Host B both transmitted to Host C at the same time, wouldn’t there then be a collision? The engineers who created 802.3x had the same idea, so they included a flow-control protocol into the full-duplex specifications.

The Wikipedia flow-control page

Flow-control essentially allows a host to send a PAUSE frame back to the sender, requesting the sender to stop sending traffic for a while to allow the host time to process the frames.

Layer 2 Loops and Spanning Tree Protocol

the Wikipedia 802.1D page

Remember the horror of the Layer 2 loop? Immediate, devastating network failures — that was bad. But thankfully, some clever network engineer devised a protocol that was able to detect, and close these loops before they got out of hand.

And so STP (Spanning Tree Protocol) was born. Roughly speaking, every switch on the network would consider a newly-activated port with extreme paranoia and would not accept new traffic from that port until it was sure that someone had not created a loop.

STP was able to determine if a loop had been created, by sending out specially crafted L2 frames called BPDUs (Bridge Protocol Data Unit). If a BPDU went through a loop and was received by the same switch that sent it out, the switch would consider that port to be looped and would shut it down.

A single switch was elected as a STP root, which controlled the behavior of all other switches in the STP domain. If a network change was detected, the switch would send out a specially crafted L2 frame called a TCN (Topology Change Notification). When the STP root received this frame, it would send out a BPDU with a special flag set that would instruct all other switches to re-examine any ports which they had previously assumed were loops.

An interesting side-effect of this protocol, is that STP allowed engineers to build fault-tolerance into switching networks. An engineer could intentionally create a loop and let STP resolve the issue — and feel safe knowing that if a network interface or cable was damaged or removed, STP would detect this change and recalculate which ports to use.

In this way STP can not only prevent destructive Layer 2 loops, but it can also recover from network faults automatically. This automation meant that companies could continue to operate in a failure scenario — where otherwise some users would have been offline.

Summary

Hubs changed the face of computer networking, but switches brought intelligence and fault-tolerance to the network. For the first time this allowed companies to invest in self-healing networks that allowed their employees to continue working even when part of the network had failed.

One thought on “Transformations of Networking — Part 2

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