Skip to content
Cambridge AS & A Level9618

Protocols

Computer Science 9618 Chapter Notes

Last updated November 2026

ShareWhatsAppPost

Protocols notes as a printable PDF.

Read online free. Download a watermarked copy with a free account.

Read the notes

The full Protocols notes as text: skim, search, and jump between subtopics.

~11 min read

1. Why computers need protocols

A protocol is a set of rules for communication. Protocols set a standard for communication.

They enable communication between devices from different manufacturers / platforms. If two devices sent messages using different protocols, they would not be able to communicate properly.

A protocol only lays down what should happen. It is the devices that carry out the actions.

Examiner insight

“The vast majority of candidates demonstrated an understanding of the use of protocols when used in communication between computers, but very few candidates expanded their answers sufficiently.”

Worked example 12 marks

Explain why a protocol is used in communication between computers.

  1. 1

    Protocols set a standard for communication [1]

  2. 2

    Protocols enable communication / compatibility between devices from different manufacturers / platforms [1]

2. The protocol stack and the four TCP/IP layers

Protocol implementation can be viewed as a stack, where each layer has its own functionality. The TCP/IP protocol suite has four layers. From the top: Application, Transport, Internet, Link.

Each layer can only accept input from the next higher layer or the next lower layer. User interaction takes place at the Application layer. The Link layer interfaces directly with the network.

When a message is sent, it passes from the Application layer down to the Link layer. When it is received, it passes from the Link layer up to the Application layer. Data is added to the headers as the packets pass through the layers.

Worked example 14 marks

The TCP/IP protocol may be viewed as a stack that contains four layers: Application, Transport, Internet, Link.

Describe how the layers of the TCP/IP protocol stack interact with each other.

  1. 1

    Each layer can only accept input from the next higher layer or the next lower layer [1]

  2. 2

    There is an interface between the adjacent layers which is the only interaction between layers [1]

  3. 3

    Data is added to the headers as the frames / packets pass through the layers [1]

  4. 4

    User interaction takes place at the highest / Application layer of the stack [1]

3. The Application and Transport layers

The Application layer contains the programs that exchange data. It provides services / an interface with the user and defines the protocols used for the exchange of data, such as HTTP, FTP and POP3.

The Transport layer provides logical communication between applications on different hosts. It breaks data into segments (packets) when sent and puts them back together when received.

It also ensures error-free, end-to-end delivery of data, in sequence, and controls the flow of packets so that data is not lost.

Worked example 15 marks

The Application Layer and Transport Layer are two layers of the TCP/IP protocol suite.

Describe the purpose of the Application Layer and the purpose of the Transport Layer.

  1. 1

    Application: to provide services / interface with the user [1]

  2. 2

    Application: to define / provide protocols used to allow the exchange of data [1]

  3. 3

    Transport: to provide logical communication between applications running on different hosts [1]

  4. 4

    Transport: to ensure error-free, end-to-end delivery of data, in sequence [1]

  5. 5

    Transport: to break data into segments when sent and reassemble them at the destination [1]

5. Application layer protocols: web, files and email

HTTP (HTTPS when secure) transfers hypertext documents / web pages. FTP is used to transfer files from one location to another on a network.

Three protocols handle email. SMTP sends email: from a computer to a mail server, or between mail servers. POP3 and IMAP retrieve email from a mail server.

IMAP lets users read their email from any device without removing the message from the mail server, so devices stay synchronised.

Examiner insight

“Candidates were generally aware of the purpose of the IMAP protocol and many of these candidates gave sufficiently detailed answers to gain full credit. Some candidates incorrectly identified this protocol as used for sending emails.”

Worked example 16 marks

Identify and describe three protocols that are used in the Application Layer of the TCP/IP protocol suite.

  1. 1

    HTTP / HTTPS [1]

  2. 2

    a protocol used to transfer hypermedia documents / web pages between networked devices [1]

  3. 3

    FTP [1]

  4. 4

    a protocol to download, upload and transfer files from one location to another on a network [1]

  5. 5

    SMTP [1]

  6. 6

    a protocol used to send emails from a computer to a mail server // between mail servers [1]

6. BitTorrent and peer-to-peer file sharing

The BitTorrent protocol provides peer-to-peer file sharing. Users share files directly with each other, so no web server or central device is used. All users are of equal status.

A peer first creates a small torrent file holding metadata about the file. The whole file must be on at least one peer. The file is broken into equal sized pieces.

Other peers obtain the torrent file and connect to a tracker. The tracker holds data about all the computers in the swarm. As each peer receives a piece, it becomes a source for that piece. A peer that has the complete file and shares it is a seed.

Worked example 14 marks

Describe how files are shared using the BitTorrent protocol.

  1. 1

    Files are shared over a peer-to-peer network [1]

  2. 2

    The file is broken into equal sized pieces [1]

  3. 3

    Other peers who wish to download the file first obtain the torrent file and connect to a tracker [1]

  4. 4

    Each peer downloads parts of the file from other peers until the entire file has been downloaded [1]

Recap

  • A protocol is a set of rules. It sets a standard so devices from different manufacturers / platforms can communicate.
  • A protocol stack has layers, each with its own functionality. A layer only accepts input from the layer above or below.
  • TCP/IP layers, top to bottom: Application, Transport, Internet, Link.
  • Sending: Application layer down to Link layer. Receiving: Link layer up to Application layer.
  • Application: programs and protocols. Transport: segments, sequence, error-free end-to-end delivery. Internet: IP addresses and routing. Link: frames and the network.
  • HTTP: web pages. FTP: files. SMTP: sends email. POP3 and IMAP: retrieve email.
  • BitTorrent: peer-to-peer file sharing with a torrent file, a tracker, a swarm and seeds.

End-of-chapter exercise

Test yourself on the whole chapter. Work through these before moving on.

  1. State what is meant by a protocol.1 mark
    Answer
    1. A set of rules for communication between computers [1].

    Trap: Saying a protocol ‘does’ something. It only lays down what the devices should do.

  2. Put these TCP/IP layers in order, starting with the layer the user interacts with: Internet, Link, Application, Transport.2 marks
    Answer
    1. Application, Transport, Internet, Link.
    2. Two correct positions earn 1 mark. All four earn 2 marks.

    Trap: Swapping the Transport and Internet layers, or starting at the bottom.

  3. A student writes: ‘HTTP is used to send email.’ Explain the error and name the protocol that sends email.2 marks
    Answer
    1. HTTP transfers web pages (hypertext documents) [1].
    2. SMTP is the protocol that sends email [1].

    Trap: Mixing up the protocols for web pages and for email.

  4. Name the protocol that matches each use. (a) Transferring a file from a server to a client. (b) Peer-to-peer file sharing. (c) Retrieving email while leaving the message on the mail server.3 marks
    Answer
    1. (a)
    2. FTP [1].
    3. (b)
    4. BitTorrent [1].
    5. (c)
    6. IMAP [1].

    Trap: Choosing SMTP for (c). SMTP sends email; it does not retrieve it.

  5. A message is sent from a laptop across the internet to a server. State the layer the user interacts with, the layer that interfaces directly with the network, and the direction the message passes through the stack on the laptop.3 marks
    Answer
    1. The user interacts with the Application layer [1].
    2. The Link layer interfaces directly with the network [1].
    3. Sending, the message passes from the Application layer down to the Link layer [1].

    Trap: Reversing the direction. A message being received passes from the Link layer up to the Application layer.

  6. In the TCP/IP stack, the Application layer cannot pass data straight to the Internet layer. Explain why.2 marks
    Answer
    1. Each layer can only accept input from the next higher layer or the next lower layer [1].
    2. The Application layer is not adjacent to the Internet layer, so the data must pass through the Transport layer [1].

    Trap: Saying the layers are ‘separate’ without naming the adjacent-layer rule.

  7. Describe one function of the Transport layer and one function of the Internet layer of the TCP/IP protocol suite.4 marks
    Answer
    1. Transport: breaks the data into packets (segments) [1] and adds a sequence number to each packet header [1].
    2. Internet: adds source and destination IP addresses to the packet header [1] and routes the packet by the optimum route [1].

    Trap: Giving a Transport layer function, such as sequencing packets, as an Internet layer function.

  8. A student wants to share a large video with many friends using the BitTorrent protocol. Describe how the video is shared.4 marks
    Answer
    1. The video is broken into equal sized pieces [1].
    2. The friends obtain the torrent file and connect to a tracker [1].
    3. Each friend downloads pieces from other peers, not from a web server [1].
    4. As each friend receives a piece, they become a source for that piece [1].

    Trap: Describing a central web server. BitTorrent is peer-to-peer, with no central device.

  9. A company's staff read their email on a phone and on a laptop. Both devices must show the same messages. Name the protocol used to send email and the protocol they should use to receive it. Explain your choice of the receiving protocol.5 marks
    Answer
    1. SMTP is used to send email [1].
    2. IMAP should be used to receive email [1].
    3. IMAP allows users to access their email from any device [1].
    4. It does so without removing the message from the mail server [1].
    5. So the phone and the laptop stay synchronised [1].

    Trap: Naming SMTP for receiving, or giving a reason with no link to using two devices.

  10. A weather station in a remote field sends a file of readings across the internet to a school server, using FTP. (a) Describe how the TCP/IP protocol suite is applied as the file is sent from the weather station and received by the server. Do not describe the function of individual layers. (b) State what the Transport layer and the Internet layer of the weather station each add to the packet header.6 marks
    Answer
    1. (a)
    2. The FTP software on the weather station interfaces with the Application layer, the top layer, to send the file [1].
    3. Each layer can only accept input from the next higher or the next lower layer [1].
    4. On the weather station the data passes from the Application layer down to the Link layer, which interfaces directly with the network [1].
    5. On the server the data passes from the Link layer up to the Application layer [1].
    6. (b)
    7. Transport layer: a sequence number [1].
    8. Internet layer: the source and destination IP addresses [1].

    Trap: Writing that the Internet layer ‘uses IP addresses’, which examiners do not credit: name the source and destination IP addresses added to the header.

Say this, not that

Wording that loses the mark, against the wording the mark scheme credits.

Loses the markGets the mark
The protocol checks the channel and sends the data.The devices check the channel and send the data. A protocol is a set of rules.
Data is split into data packages.Data is split into data packets.
The Internet layer uses IP addresses.The Internet layer adds source and destination IP addresses to the packet header.
IMAP is used to send email.SMTP sends email. IMAP retrieves it from the mail server and keeps the message there.

Frequently asked questions

What is a protocol in computer communication?
A protocol is a set of rules for communication. It sets a standard so that devices from different manufacturers or platforms can communicate. A protocol only lays down what should happen; the devices carry out the actions.
What are the layers of the TCP/IP protocol stack and how do they interact?
From the top, the layers are Application, Transport, Internet and Link. Each layer can only accept input from the next higher or the next lower layer. Data is added to the headers as the packets pass through the layers, and a message sent passes from the Application layer down to the Link layer.
What do the Transport layer and the Internet layer do in TCP/IP?
The Transport layer provides logical communication between applications on different hosts. It breaks data into segments and ensures error-free, end-to-end delivery in sequence. The Internet layer adds a header with the source and destination IP addresses and routes the datagrams by the optimum route.
Which protocols handle web pages, files and email?
HTTP transfers hypertext documents and web pages, and FTP transfers files from one location to another on a network. SMTP sends email from a computer to a mail server. POP3 and IMAP retrieve email from a mail server, and IMAP leaves the message on the server so devices stay synchronised.
How does BitTorrent share a file?
BitTorrent provides peer-to-peer file sharing, so no web server or central device is used. The file is broken into equal sized pieces, and peers obtain the torrent file and connect to a tracker. A peer that has the complete file and shares it is a seed.
Does SMTP retrieve email from a mail server?
No. SMTP sends email, from a computer to a mail server or between mail servers. IMAP or POP3 retrieves email from the mail server. Saying that IMAP is used to send email is a mistake examiners reported.

Free notes are just the start.

Unlock every Workbook and Chapter at a Glance, and generate your own worksheets and predicted papers.

Explore plans

Related chapters