3.5 - Network Protocols
Network standards and protocols
Networks rely on agreed rules to ensure devices can communicate effectively and data moves reliably across them. These rules help prevent errors and make sure hardware and software from different manufacturers work together.
Network standards
A network standard is a set of agreed requirements for hardware and software. These standards are essential because they allow different manufacturers to create products that are compatible with each other. For example, if all devices follow the same standard for connecting to a network, a laptop from one company can easily join a network set up with equipment from another.
Network protocols
A network protocol is a set of rules that governs how devices communicate and how data is transmitted across a network. Communication protocols, a type of network protocol, specify key aspects of data exchange.
Communication protocols specify:
- How communication between two devices must start and end
- How the data must be organised
- What actions devices must take if data goes missing during transmission
Without these protocols, data transfer would be chaotic, much like driving without road rules.
MAC addresses for local network communication
Every device on a network needs a way to be uniquely identified so that data can be sent to the correct destination. This is where MAC addresses come in, particularly for communication within the same local network.
Features of MAC addresses
MAC addresses (media access control addresses) are unique identifiers assigned to all network-enabled devices by the manufacturer. They cannot be changed and are used mainly by the Ethernet protocol on LANs (local area networks). A LAN is a network covering a small geographical area, such as a home or office.
MAC addresses are 48 or 64-bit binary numbers, consisting of a long string of 0s and 1s. To make them easier to read and use, they are converted into hexadecimal format, which groups the bits into six hexadecimal numbers separated by hyphens or colons. For example:
- Binary:
0110 0111 1010 1011 1100 1101 1110 1111 0001 0010 0011 0100 - Hexadecimal:
67-AB-CD-EF-12-34
Role in local networks
On a LAN, switches read the MAC addresses in data packets and use them to direct the data to the right device. This ensures efficient communication without data being sent to every device on the network.
IP addresses for communication between networks
When data needs to travel between different networks, such as over the internet, a different addressing system is used. IP addresses handle this by providing a way to route data across larger, interconnected networks.
Features of IP addresses
IP addresses (internet protocol addresses) are used when sending data between TCP/IP networks, for example, over the internet. Unlike MAC addresses, IP addresses are assigned either manually by a network administrator or automatically by the network before a device can access it.
There are two main versions:
- IPv4 - Uses 32 bits, split into four 8-bit chunks, each represented as a denary (base-10) number separated by dots. For example:
105.22.89.210. It provides 232 (over 4 billion) unique addresses. - IPv6 - Uses 128 bits, split into eight 16-bit chunks, each represented as a hexadecimal number separated by colons. It was created to address the shortage of IPv4 addresses, offering 2128 unique addresses – a vastly larger number.
IPv6 became necessary due to the growing number of internet-connected devices, which exhausted the available IPv4 addresses.
Role in wider networks
IP addresses enable data to be routed from one network to another. For instance, when you access a website, your device's IP address helps direct the request to the correct server across the internet.
TCP/IP and related protocols
TCP/IP is the foundational protocol suite for internet communication, dictating how data is sent between networks. It combines two core protocols and supports several others for specific tasks.
Core components of TCP/IP
- TCP (transmission control protocol) - Sets the rules for how devices connect on the network. It splits data into packets (small chunks of data), reassembles them at the destination, and checks that the data is correctly sent and delivered. If packets are lost or corrupted, TCP requests retransmission.
- IP (internet protocol) - Directs packets to their destination across the network using IP addresses. It handles the routing but does not check for errors – that's TCP's job.
Together, TCP/IP ensures reliable data transmission over networks like the internet.
Other protocols built on TCP/IP
Several protocols work with TCP/IP to handle specific internet tasks. These include:
| Protocol | Full name | Purpose |
|---|---|---|
| HTTP | Hypertext transfer protocol | Used by web browsers to access websites and communicate with web servers. |
| HTTPS | Hypertext transfer protocol secure | A secure version of HTTP that encrypts all information sent and received, protecting data like passwords or payment details. |
| FTP | File transfer protocol | Used to access, edit, and move files between devices on a network, such as transferring files from a client computer to a server. |
| POP3 | Post office protocol version 3 | Used to retrieve emails from a server; the email is downloaded and then deleted from the server. |
| IMAP | Internet message access protocol | Used to retrieve emails from a server; a copy is downloaded, but the original remains on the server until deleted. Commonly used by web-based email clients. |
| SMTP | Simple mail transfer protocol | Used to send emails and transfer them between servers. |
The layered structure of network protocols
Network protocols are organised into layers, where each layer handles a specific part of the communication process. This structure simplifies network design and troubleshooting.
Protocol layers
A layer is a group of protocols with similar functions. Layers are self-contained, meaning protocols in one layer do not need to know what is happening in others. Each layer serves the one above it by handling the underlying work. Data can only pass between adjacent layers.
A common model is the 4-layer TCP/IP model:
| Layer | Function | Protocol examples |
|---|---|---|
| 4 (Application) | Turning data into websites, emails, or other applications, and vice versa. | HTTP, FTP, SMTP |
| 3 (Transport) | Controlling data flow, such as splitting data into packets, reassembling them, and checking for correct delivery. | TCP |
| 2 (Internet) | Making connections between networks and directing data using addresses. | IP |
| 1 (Network access) | Passing data as electrical signals over the physical network hardware. | Ethernet |
In this model, an action in layer 4 (e.g., sending an email) triggers processes down through the layers to layer 1, where the data is physically transmitted.
Advantages of using layers
Organising protocols into layers offers several benefits:
- It breaks network communication into manageable pieces, allowing developers to focus on one area without worrying about others.
- Layers can be changed or updated independently without affecting the rest of the system.
- Standards for each layer ensure that hardware and software from different companies are compatible and work in a consistent way.