Networks, Topologies & Protocols
A network is two or more computers or devices connected together so that they can share data and resources such as files, printers and a single internet connection. Almost everything you do online depends on networks, so it helps to understand how they are built and the rules that let different devices work together.
Networks are grouped by the area they cover. A Local Area Network (LAN) covers a small area on a single site, such as a school, home or office, and the organisation that runs it usually owns all of the hardware and cabling. A Wide Area Network (WAN) covers a large area and joins together LANs that may be in different towns, countries or even continents. Because a WAN stretches over such distances, its infrastructure is often leased from telecommunications companies rather than owned outright. The internet is the largest WAN of all.
A LAN covers a small area on one site and is owned by the organisation that runs it; a WAN covers a large area, connects LANs together, and usually relies on leased infrastructure. The internet is the largest WAN.
The speed a network feels to its users depends on several factors. The most important is bandwidth, which is the maximum amount of data a connection can carry in a given time. The more devices that are connected at once, the more they must share that bandwidth, so each device can slow down. Performance is also affected by whether a connection is wired or wireless, the quality of the cabling, and the amount of interference.
Computers can take different roles on a network. In a client-server network, one or more powerful central computers called servers provide services, while the other computers, the clients, request them. This makes security, updates and backups easy to manage from one place, but the server is expensive and, if it fails, every client loses access. In a peer-to-peer network the computers are all equal and each can act as both client and server, sharing files directly. This is cheaper and simpler for a small home network, but it is harder to back up and secure, and it slows down as more peers are added.
Turning stand-alone computers into a working LAN needs several pieces of hardware, each with its own job:
- A Network Interface Controller (NIC) lets a single device connect to a network and gives it its MAC address.
- A switch connects devices together inside one LAN and uses their MAC addresses to send data only to the device it is meant for.
- A router connects different networks together, such as joining a home LAN to the internet, and directs data between them using IP addresses.
- A wireless access point lets wireless devices join a wired network over Wi-Fi.
- The transmission media are the cables or signals that actually carry the data, such as copper cable, fibre-optic cable or radio waves.
The internet is a worldwide collection of computer networks — a network of networks — all connected together. To find the computer that stores a particular website, your device uses the Domain Name System (DNS), which is made up of many separate domain name servers. When you type a web address, the DNS looks up the matching IP address so your browser knows which server to connect to. If the first server does not hold that record, the request is simply passed on to another.
The DNS turns a human-friendly web address into the IP address of the server that hosts the website, so your browser can connect to it.
Websites and files are kept available through hosting, where a company stores them on a server that stays connected to the internet all day, every day; a web server then sends those pages to any client that requests them. Many services are now delivered through cloud computing, which means storage, software and processing are provided remotely over the internet instead of running on your own machine.
The cloud lets people work from anywhere, avoids the cost of maintaining local hardware, and can back data up automatically. Its drawbacks are that it depends on a reliable internet connection, charges an ongoing subscription, and raises concerns about the security of data held by someone else.
The topology of a network describes the shape in which its devices are arranged. In a star topology every device has its own cable to a central switch. In a mesh topology devices are connected to many others so that data can travel by more than one route.
A star topology gives each device a dedicated connection, so there are few collisions and performance is good, and if one cable fails only that single device is cut off. Its weakness is that the whole network depends on the central switch: if the switch fails, everything stops, and the design needs a lot of cabling.
A mesh topology has no single point of failure, because if one link breaks the data simply takes another route, which makes it very reliable and good at handling heavy traffic. The drawback is that a fully wired mesh needs a huge amount of cabling and is expensive and complex to set up, which is why mesh networks are often built wirelessly.
Devices connect either by a wired link, usually an Ethernet cable, or wirelessly through Wi-Fi or Bluetooth. A wired connection is faster, more stable and more secure, because an intruder needs physical access to the cable, but it ties devices down and costs more to install. A wireless connection is convenient and lets devices move around freely, but it is usually slower, can suffer interference and dropouts, and is easier to intercept. Bluetooth is a short-range wireless link used to connect personal devices such as headphones or a keyboard.
Because data can be intercepted as it crosses a network, it is often protected by encryption, which scrambles the data using a key so that anyone who intercepts it sees only meaningless characters; only the intended recipient, who holds the key, can turn it back into the original message.
Every device also needs an address so that data reaches the right place. An IP address identifies a device on a network and is used to route data between networks. Older IPv4 addresses are 32 bits long and are written as four numbers from 0 to 255 separated by dots, such as 192.168.0.1; because the world is running out of these, newer IPv6 addresses are 128 bits long and are written as groups of hexadecimal digits. A MAC address, by contrast, is a permanent number built into a device’s network card by its manufacturer, written as twelve hexadecimal digits, and is used to identify a device within a local network.
For devices made by different companies to work together, everyone must follow the same agreed rules, called standards. Without standards, equipment made by one company might not work with equipment made by another. Familiar examples include the agreed character set used to store text and the language used to build web pages.
A protocol is a set of rules that controls how data is transferred between devices, covering things like the format of the data and the order in which messages are sent. Because different jobs need different rules, there are several protocols, each with its own purpose.
Each of these protocols has a specific job:
- TCP/IP is the core set of rules for the internet: it breaks data into packets, addresses them, routes them across networks and reassembles them at the far end.
- HTTP (Hypertext Transfer Protocol) is used to transfer web pages between a web server and a browser.
- HTTPS is the secure version of HTTP, which encrypts the data and is used for logins and payments.
- FTP (File Transfer Protocol) is used to upload and download files to and from a server.
- POP (Post Office Protocol) retrieves emails from a mail server, usually downloading them to one device and removing them from the server.
- IMAP (Internet Message Access Protocol) manages emails while keeping them on the server, so they can be read from several devices.
- SMTP (Simple Mail Transfer Protocol) sends emails and passes them between mail servers.
To keep all of these rules manageable, protocols are organised into layers. Each layer deals with just one part of the communication and only has to work with the layers directly above and below it. This means different teams can develop different layers, a layer can be improved or replaced without breaking the others, and faults are easier to track down. A common teaching model splits the whole process into four such layers.