Protocols

Computer Science A2 · Communication and internet technologies. The idea in plain words, the rules to remember, the mistake to avoid and a worked example, written and checked by Mega Lecture.

Test this topic freeAll Computer Science A2 topics

The idea

A protocol is an agreed set of rules for communication. Two computers can exchange data only if both use the same rules for format, timing, addressing and error checking. This is why machines from different makers, with different operating systems, can talk to each other.

Protocols are organised as a stack of layers. Each layer has its own job and passes data only to the layer above or below, so one layer can be changed without changing the others.

The TCP/IP suite has four layers: Application, Transport, Internet, Link. The sender's data goes down the stack, each layer adding a header. At the receiver it goes up, and each layer removes its header.

In simpler words

A protocol is a set of rules that two computers agree to follow. The rules cover the format of the data, the timing, the addresses and error checks. TCP/IP has four layers: Application, Transport, Internet and Link. When data is sent, it goes down the layers and each one adds a header. At the other end, it goes up and each layer removes its header.

An everyday comparison

The protocol stack is like sending a parcel. You write a letter (application), put it in an envelope with a page number (transport), add the street address (internet), then a courier puts it on a van (link). At the other end each wrapping comes off in reverse order. The comparison stops working because real layers also check delivery and ask for missing parts to be resent.

Rules to remember

Common mistake

Students swap the Transport and Internet layers. Remember that port numbers and segments belong to the Transport layer, and IP addresses, packets and routing belong to the Internet layer below it.

In the exam

Define a protocol as an agreed set of rules for communication. Name the four TCP/IP layers in order: Application, Transport, Internet, Link. For each layer state its job using the exact terms: the Transport layer makes segments and adds port and sequence numbers; the Internet layer adds IP addresses and routes packets; the Link layer makes frames with MAC addresses. Give the protocol asked for and its job, for example POP3 downloads email to one device. Explain why layers help: one layer can change without changing others.

Worked example

A user reads the same mailbox on a phone and on a laptop. A message read on the phone must show as read on the laptop. Which protocol should be used to receive the mail, and why not the others?

  1. SMTP only sends mail, so it cannot be used to read the mailbox.
  2. POP3 downloads the mail to one device and usually removes it from the server, so the other device would not see it.
  3. IMAP leaves the mail on the server and keeps its state (read, deleted, folders) the same for every device.

Answer: IMAP.

Ask about this

Type what you are stuck on. The helper finds the explanation, worked examples and the notes to read, free and instant.

Keep going

← Floating-point numbers, representation and manipulationCircuit switching, packet switching →Take a Computer Science A2 test