Network Protocols (AQA GCSE Computer Science): Revision Notes
Network protocols
What are network protocols?
Think of network protocols as the rules of conversation for computers. Just like humans need to agree on a language to communicate effectively, computer devices need to follow agreed rules when they send information to each other.
Network protocols are essentially sets of guidelines that all manufacturers and devices follow to ensure smooth communication - just like having agreed-upon rules for a conversation makes communication more effective.
When a device wants to send data to another device, the information travels along cables or wirelessly until it reaches its destination. This process is controlled by protocols, which work like instruction manuals telling devices exactly how to package, send, and receive data properly.
Physical connection protocols
Ethernet
Ethernet represents the traditional family of protocols used to connect devices in a wired Local Area Network (LAN). Rather than being a single protocol, Ethernet is actually a collection of related protocols that work together.
These protocols determine how data should be physically transmitted between different devices using MAC addresses (unique identifiers for each network device) to decide which device should receive the data. Ethernet protocols also specify what should happen if network collisions occur. Ethernet protocols can operate on both copper and fiber-optic cables, making them versatile for different networking situations.
Wi-Fi
Wi-Fi is a family of protocols that enable network devices to communicate wirelessly using radio waves. Like Ethernet, Wi-Fi isn't just one protocol but a collection of related standards. The Wi-Fi trademark and standards determine which frequency band and channel should be used for communication, along with data transmission rates and device authentication methods when joining a network.
Most Wi-Fi standards work by transmitting data using radio waves in one of two main frequency bands: either 2.4GHz or 5GHz. The 2.4GHz frequency provides greater range but slower data transmission speeds compared to 5GHz frequency. The general term for any wireless network is a wireless LAN (WLAN).
Both Ethernet and Wi-Fi are actually families of protocols rather than single protocols. This is why they can adapt to different networking needs and continue evolving with new standards.
Transport layer protocols
Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP) handles the reliable delivery of data by splitting information from applications into smaller data packets that can be sent across a network. This protocol focuses on accuracy and completeness rather than speed.
Each packet consists of a header and payload. The header contains important information like the sequence number of the packet and a checksum (mathematical technique for error detection). The payload contains the actual data from the application that needs to be transmitted. When a data packet arrives correctly at its destination, an acknowledgement message gets sent back to the original sender to confirm safe delivery.
TCP is perfect for situations where every piece of data must arrive correctly, such as downloading files, sending emails, or loading web pages. If any packets go missing or arrive corrupted, TCP will automatically request those packets to be sent again.
User Datagram Protocol (UDP)
While TCP prioritises accurate delivery with error checking, User Datagram Protocol (UDP) focuses on delivering data as quickly as possible. UDP removes the acknowledgement system that confirms data was safely received, creating a constant stream of data from sender to receiver without any error-checking mechanisms.
Key Difference: TCP vs UDP
- TCP: Reliable but slower - ensures all data arrives correctly
- UDP: Fast but less reliable - prioritises speed over accuracy
This approach makes UDP ideal for activities where speed matters more than perfect accuracy, such as live video broadcasts and online gaming. If some packets get lost during transmission, the video or audio might experience brief distortion, but the content continues playing without interruption. The trade-off is speed versus reliability.
Network layer protocols
Internet Protocol (IP)
Internet Protocol (IP) defines how data packets should travel between different networks. Every device connected to a network receives a unique IP address, which functions like a postal address for your computer's location on the network.
IP Address Format Example
An IP address consists of four 8-bit sections: possible values (0-255) for each section.
Example IP address: 194.83.249.5
- Section 1: 194 (8 bits)
- Section 2: 83 (8 bits)
- Section 3: 249 (8 bits)
- Section 4: 5 (8 bits)
When data needs to be sent, an IP header gets added to each data packet containing both the source and destination IP addresses. Routers use this addressing information to determine whether the packet's destination is on the local network or needs to be passed along to another network. Switches on the destination network then direct the data to the correct device.
Application layer protocols
Hypertext Transfer Protocol (HTTP)
Hypertext Transfer Protocol (HTTP) enables web browsers (clients) to request web servers to send web pages and associated resources to a user's browser. This protocol handles the communication that happens every time you visit a website.
When you type a web address into your browser, HTTP manages the request sent to the web server and handles the response containing the requested web page content.
Hypertext Transfer Protocol Secure (HTTPS)
Hypertext Transfer Protocol Secure (HTTPS) provides a secure version of HTTP by adding Secure Socket Layer (SSL) encryption to communications. This encryption protects sensitive information during transmission, making it essential for activities like internet banking and online shopping.
The main difference between HTTP and HTTPS is that HTTPS scrambles the data being transmitted so that anyone intercepting the communication cannot read the actual information being exchanged.
File Transfer Protocol (FTP)
File Transfer Protocol (FTP) specialises in transferring computer files between a client device and a server. This protocol is commonly used for uploading web pages to web servers, allowing website developers to transfer their completed websites to hosting servers where others can access them online.
Simple Mail Transfer Protocol (SMTP)
Simple Mail Transfer Protocol (SMTP) handles sending emails to an email server or between different email servers. This protocol manages the process when you click "send" on an email, especially in situations where the sender and recipient use different email service providers.
SMTP ensures that your email gets delivered to the correct email server, even when it needs to travel through multiple servers to reach its final destination.
Internet Message Access Protocol (IMAP)
Internet Message Access Protocol (IMAP) manages accessing email messages stored on an email server. This protocol allows multiple devices to maintain synchronised access to the same email inbox, with messages remaining stored on the email server.
Messages can be organised into folders or marked as important, and this organisational information gets updated whenever a device connects to the server. This means the same mailbox view appears across several different devices. IMAP has become the more commonly used email protocol because of its ability to synchronise email accounts across multiple devices seamlessly.
Email Protocol Roles:
- SMTP: Handles sending emails (like posting a letter)
- IMAP: Handles accessing and organising emails (like checking your mailbox from anywhere)
The 4-layer TCP/IP model
To simplify understanding of network communication processes, the different activities involved in sending data packets are organised into layers. Each layer handles a specific task, with relevant protocols assigned to each layer. The layers follow a distinct order for applying their rules, creating what's called the 4-layer TCP/IP model.
The Layered Approach
This layered system helps network engineers understand and troubleshoot network communications by breaking down complex processes into manageable, specialised components - like having different departments in a company, each with specific responsibilities.
The four layers are:
- Application layer - handles user applications and services
- Transport layer - manages reliable data delivery
- Internet layer - routes data between networks
- Link layer - handles physical network connections
This layered approach helps network engineers understand and troubleshoot network communications by breaking down complex processes into manageable, specialised components.
Key Points to Remember:
- Network protocols are like conversation rules - they ensure all devices can communicate effectively by following the same guidelines
- Different protocols serve different purposes - some prioritise speed (UDP), others prioritise accuracy (TCP), and some handle specific tasks like email (SMTP) or web browsing (HTTP)
- Security matters - HTTPS and SSL encryption protect sensitive data during transmission
- The TCP/IP model organises network communication into four distinct layers, each handling specific responsibilities
- Addresses are crucial - MAC addresses identify specific devices while IP addresses identify network locations, working together to ensure data reaches the right destination