Home / GCSE · Edexcel / Computer Science / Networks

CPX13Protocols, the TCP/IP Model and Topologies

Edexcel 1CP2 · 4.1.6

What a protocol is and why networks need them

A protocol is a set of rules governing data transmission between devices.

  • Devices on a network are made by different manufacturers and run different operating systems. They can only exchange data if they all follow the same rules.
  • Protocol rules cover things such as: how data is formatted and addressed, how big each packet is, how errors are found and dealt with, and how a connection is started and ended.
  • Each protocol has one job. Your spec names nine: Ethernet, Wi-Fi, TCP/IP, HTTP, HTTPS, FTP, and the email protocols SMTP, POP3 and IMAP.
Exam tipProtocols are rules, not programs, cables or file types. If asked for a protocol to download a music file, ‘MP3’ is a file format, not a protocol: the answer is FTP.
Protocol
A set of rules governing data transmission between devices.
Edexcel 1CP2 · 4.1.6

HTTP, HTTPS and FTP

These three application-layer protocols move web pages and files.

ProtocolStands forWhat it does
HTTPHypertext Transfer ProtocolA web browser uses it to request a web page from a web server, and the server uses it to send the page back.
HTTPSHypertext Transfer Protocol SecureHTTP with the data encrypted between the browser and the web server, so intercepted data can’t be read. Used for logins, payments and personal details.
FTPFile Transfer ProtocolUploads and downloads files between a client and a server, e.g. putting a website’s files onto a web server, or downloading a large file.
Exam tipHTTPS encrypts the data sent between the browser and the web server. It doesn’t ‘make the website secure’ or stop viruses. How encryption works is in the cybersecurity topic.
HTTP
The protocol a browser uses to request web pages from a web server, and the server uses to send them.
HTTPS
HTTP with the data encrypted between the browser and the web server.
FTP
The protocol used to upload and download files between a client and a server.
Edexcel 1CP2 · 4.1.6

Email: SMTP, POP3 and IMAP

One protocol sends email. Two are used to receive it, and they handle it in different ways.

ProtocolJobWhat happens to the email
SMTP (Simple Mail Transfer Protocol)Sends email: from the sender’s email app to their mail server, and from that server on to the recipient’s mail serverIt waits on the recipient’s mail server until it is collected
POP3 (Post Office Protocol 3)Receives email by downloading it to one deviceUsually deleted from the server once downloaded, so it can only be read on that device (but can then be read offline)
IMAP (Internet Message Access Protocol)Receives email while leaving it on the serverStays on the server and is synchronised: a phone, tablet and laptop all show the same inbox, and reading or deleting on one shows on all

SMTP sends; POP3 or IMAP collects

Exam tipIMAP’s benefit is that email can be managed from several devices, because it stays on the server. ‘It can be read from anywhere’ is a benefit of email itself, so examiners don’t credit it. Speed and security are not IMAP’s selling points either.
Memory hookSMTP = Send. POP3 = Pull it down to one device. IMAP = It stays on the server.
SMTP
Protocol for sending email from a client to a mail server and between mail servers.
POP3
Protocol that downloads email from the mail server to one device, usually deleting it from the server.
IMAP
Protocol that lets devices read email that stays on the mail server, keeping every device in sync.
Edexcel 1CP2 · 4.1.6, 4.1.7

TCP/IP: getting every packet there in order

TCP/IP works at the transport layer. It makes sure that all of the data arrives, undamaged and in the right order.

  • It establishes a connection between the two computers before data is sent.
  • It splits the data into packets and gives each one a sequence number (packet 1 of 9, 2 of 9…).
  • The sender works out a checksum from each packet’s data and puts it in the packet. The receiver works it out again: if the two don’t match, the packet was damaged on the way.
  • The receiver acknowledges packets that arrive safely. Missing or damaged packets are sent again.
  • Packets can take different routes and arrive out of order, so the receiver puts them back in order using the sequence numbers and rebuilds the data.
Worked examplePacket 4 of 9 is damaged by interference on its way. What happens?
  1. The receiver calculates a checksum from packet 4’s data and compares it with the checksum in the packet.The sender put the checksum in when it made the packet.
  2. They don’t match, so the receiver knows packet 4 is damaged and doesn’t acknowledge it.Any change to the data changes the checksum.
  3. Packet 4 is sent again. When all nine have arrived, they are put in order 1 to 9.Sequence numbers say where each packet goes.
The damaged packet is found by its checksum and resent; the file is rebuilt in sequence order.
Exam tipIf asked which protocol establishes a connection between two computers, the answer is TCP/IP. ‘IP’ on its own was marked wrong: IP addresses and routes packets but doesn’t set up a connection.
TCP/IP
Transport-layer protocol that sets up a connection, splits data into numbered packets, checks them and reorders them.
Sequence number
A packet’s number, used to put the packets back in order.
Checksum
A value calculated from a packet’s data, used to check that the data hasn’t changed in transmission.
Edexcel 1CP2 · 4.1.7

The 4-layer TCP/IP model

The TCP/IP model is a four-layer stack that sets out how data is exchanged over the internet. Each layer is responsible for one part of the process, and different protocols work in each layer.

  • When data is sent, it passes down the layers: application → transport → internet → link. Each layer adds what it needs (such as sequence numbers or IP addresses).
  • When data is received, it passes up the layers: link → internet → transport → application. Each layer uses and removes what its partner layer added.
  • Why layers? Each layer only has to do its own job, so one layer’s protocols can change (say, Wi-Fi instead of Ethernet) without changing the others.
  • Learn the order: ‘All Tortoises Ignore Lettuce’: Application, Transport, Internet, Link.
Layer (top to bottom)Its jobProtocols
ApplicationWhere programs such as browsers and email apps send and receive data, in the right format for the applicationHTTP, HTTPS, FTP, SMTP, POP3, IMAP
TransportSets up the connection; splits data into numbered packets; checks they all arrive undamaged; puts them back in orderTCP/IP
InternetAdds the source and destination IP addresses to each packet and routes packets across networks (routers work here)IP
LinkTurns the packets into signals for the physical medium (cable or radio) and passes them to the next device using MAC addressesEthernet, Wi-Fi

Down the stack to send; up the stack to receive

Exam tipDon’t confuse the internet layer (IP addresses, routing between networks) with the link layer (signals on the cable or radio, MAC addresses on the local network). Use Pearson’s four names exactly.
TCP/IP model
A four-layer stack (application, transport, internet, link) that sets out how data is exchanged over the internet.
Application layer
Where applications send and receive data; HTTP, HTTPS, FTP, SMTP, POP3 and IMAP work here.
Transport layer
Sets up the connection and splits, numbers, checks and reorders packets (TCP/IP).
Internet layer
Adds IP addresses and routes packets across networks.
Link layer
Turns data into signals for the medium and uses MAC addresses (Ethernet, Wi-Fi).
Edexcel 1CP2 · 4.1.8

Bus topology

A topology is the arrangement of the devices in a network. In a bus topology, every device connects to one main cable (the backbone), with a terminator at each end.

  • Terminators absorb the signal at the ends of the cable so it doesn’t bounce back and disrupt other data.
  • One computer failing does not stop a bus network: only a break in the backbone does.
AdvantagesDisadvantages
Cheap: needs less cable than other topologies and no central device.If the backbone cable breaks, the whole network stops working.
Easy to add a device: just connect it to the backbone.Only one device can transmit at a time. If two send at once, the signals collide and must be resent.
Good for a small or temporary network.As more devices are added, collisions increase and the network slows down.
Every device receives all the data on the cable, so data is less secure.

One backbone cable with a terminator at each end

Exam tipBe precise. ‘If the bus fails’ is too vague, and ‘if one computer fails the network fails’ is wrong. Say ‘if the backbone cable is damaged, no devices can communicate’.
Network topology
The arrangement of the devices in a network.
Bus topology
All devices connected to a single backbone cable with terminators at each end.
Terminator
A device at each end of a bus cable that absorbs signals so they don’t bounce back.
Collision
Two devices sending at the same time on a shared cable, so both signals are spoiled and must be resent.
Edexcel 1CP2 · 4.1.8

Star topology

In a star topology, every device has its own cable to a central node: a switch (or a hub).

  • A switch sends each packet only to the device it is addressed to (using the MAC address). A hub sends every packet to every device, which is slower and less secure.
AdvantagesDisadvantages
If one device’s cable fails, only that device is affected.If the central switch fails, the whole network stops (a single point of failure).
Fast: with a switch, few collisions, because each device has its own link.Needs more cable than a bus, so it costs more to install.
More secure: a switch sends data only to the device it’s meant for.The number of devices is limited by the ports on the switch; more means buying another switch.
Easy to add or remove a device, and easy to find faults.

Each device is cabled to the central switch

Exam tipThe central device is a switch or hub. Pearson does not accept ‘server’: a server can be one of the devices on the star, but it is not what the cables meet at.
Star topology
Every device connected by its own cable to a central switch or hub.
Switch
A central device that sends each packet only to the device it is addressed to.
Hub
A central device that sends every packet to every connected device.
Single point of failure
One part whose failure stops the whole network.
Edexcel 1CP2 · 4.1.8

Mesh topology

In a mesh topology, devices connect directly to each other. A fully connected mesh links every device to every other device; a partially connected mesh links only some of them directly.

  • Mesh networks are often wireless, which removes the cabling problem: smart home devices pass messages on to each other, and mesh Wi-Fi systems spread a signal round a large house.
  • The internet’s routers form a huge partial mesh: that’s why packets can avoid broken or busy links.
AdvantagesDisadvantages
Reliable: there are many routes, so if a link or device fails, data takes another route. There is no single point of failure.Lots of cabling (for a wired mesh), so it is expensive to install.
Handles heavy traffic: data can travel along several routes at once.Hard to add a wired device: in a full mesh it needs a link to every other device.

Fully and partially connected mesh networks

Worked exampleHow many links does a fully connected mesh of 6 devices need?
  1. Each device links to the other 5: 6 × 5 = 30 link-ends.Every device connects to every other.
  2. Each link has two ends, so 30 ÷ 2 = 15 links.Otherwise each link is counted twice.
15 links. In general, n devices need n × (n − 1) ÷ 2 links.
Mesh topology
Devices connected directly to each other, giving several routes between them.
Fully connected mesh
Every device is linked directly to every other device.
Partially connected mesh
Only some devices are linked directly to one another.
Edexcel 1CP2 · 4.1.8

Choosing a topology

Pearson asks you to compare topologies on performance, scalability (how easily it grows), reliability and security, and pick one for a scenario.

BusStarMesh
PerformanceSlows as devices are added (collisions)Good: each device has its own link to a switchGood: many routes share the traffic
ScalabilityEasy to add a device, but performance dropsEasy until the switch’s ports run outHard (wired): each new device needs many links
ReliabilityA backbone break stops everythingOne cable failing affects one device; the switch is a single point of failureVery reliable: no single point of failure
SecurityEvery device sees all the dataA switch sends data only to its destinationData may pass through other devices
CostCheapestMore cable, plus a switchMost expensive (wired)
Worked exampleA key-cutting shop has three computers and wants the cheapest network. A broadcasting company’s studio must never lose its network. Which topology suits each?
  1. Shop: a star with a small switch (or a bus) is cheap and simple for three devices.Few devices, low traffic; cost matters most.
  2. Studio: a mesh, because there are many routes and no single point of failure.Reliability matters more than cost.
Shop: star (cheap, simple). Studio: mesh (most reliable).
Exam tipLink every point to the scenario: not ‘star is reliable’, but ‘if the cable to one till is damaged, the other tills keep working, so the shop can still take payments’. Stick to the three topologies on the course: bus, star and mesh.
Scalability
How easily a network can grow to include more devices.
Reliability
How well a network keeps working when something fails.