Full Marks

A-level Computer Science Year 12 · Topic 7

Internet protocols and security

Internet protocols and security explains how data finds its way across the internet, and how it is kept safe.

We will study the T C P I P stack, I P addressing, subnetting, N A T and D H C P, ports, sockets and application protocols.

Then we look at packet and circuit switching, D N S and U R Ls, network threats and firewalls, and public key cryptography with digital signatures and certificates.

In this topic

  1. 7.1The TCP/IP protocol stackFree below · 33 questions
  2. 7.2IP addressing, IPv4 and IPv6, subnetting, NAT and DHCPOpen in Full Marks · 29 questions
  3. 7.3Ports, sockets, MAC addresses and application protocols: HTTP, HTTPS, FTP, SMTP, POP3, IMAP and SSHOpen in Full Marks · 44 questions
  4. 7.4Packet switching, routing and circuit switchingOpen in Full Marks · 27 questions
  5. 7.5DNS, URLs and the structure of the InternetOpen in Full Marks · 71 questions
  6. 7.6Network security: malware, threats, firewalls and proxy serversOpen in Full Marks · 75 questions
  7. 7.7Public and private keys, digital signatures and digital certificatesOpen in Full Marks · 24 questions

7.1 · Free notes

The TCP/IP protocol stack

Diagram: The TCP/IP protocol stack

Key points

In more detail

Practice

The TCP/IP protocol stack: 10 questions

Pick an answer to check it, or open the answer for the explanation.

1. Which TCP/IP layer adds source and destination port numbers to the data?

  1. Application
  2. Link
  3. Transport
  4. Internet
Show answer

C: Transport. The transport layer (TCP or UDP) adds port numbers so the data reaches the correct process on the destination host.

2. Which layer of the TCP/IP stack is responsible for routing packets between networks using IP addresses?

  1. Transport
  2. Application
  3. Link
  4. Internet
Show answer

D: Internet. The Internet layer adds IP addresses and routers use them to forward packets between networks.

3. A browser sends a web request. What is the correct order of data units as it passes down the stack?

  1. Data → segment → packet → frame
  2. Data → packet → segment → frame
  3. Data → segment → frame → packet
  4. Data → frame → packet → segment
Show answer

A: Data → segment → packet → frame. Transport makes a segment, Internet wraps it in a packet, and Link wraps that in a frame for transmission.

4. What does a router mainly use to decide where to forward a packet?

  1. Source MAC address
  2. Destination IP address
  3. Destination port number
  4. Source port number
Show answer

B: Destination IP address. Routers work at the Internet layer and look up the destination IP address in their routing table.

5. Why is UDP often chosen for live video calls rather than TCP?

  1. It avoids retransmission delays, so lost packets are simply skipped
  2. It encrypts the video stream
  3. It guarantees all packets arrive in order
  4. It uses fewer IP addresses
Show answer

A: It avoids retransmission delays, so lost packets are simply skipped. UDP has no acknowledgements or retransmission, so there is lower latency. A late packet is useless in a live call.

6. A TCP sender gets no acknowledgement for a segment before its timer expires. What does it do?

  1. Asks the router to resend it
  2. Retransmits the segment
  3. Closes the connection permanently
  4. Switches to UDP
Show answer

B: Retransmits the segment. TCP provides reliability by retransmitting segments that are not acknowledged in time.

7. Which is a benefit of using a layered protocol stack?

  1. One layer can be replaced, e.g. Wi-Fi for Ethernet, without changing the others
  2. Each layer can read all the data from the others
  3. Data is sent without headers, making it faster
  4. All layers must be changed together when upgrading
Show answer

A: One layer can be replaced, e.g. Wi-Fi for Ethernet, without changing the others. Layers have defined interfaces, so one can be changed independently. This also supports interoperability between vendors.

8. A packet is sent with a TTL of 64 and passes through 7 routers. What is the TTL when it reaches the destination?

  1. 64
  2. 56
  3. 57
  4. 71
Show answer

C: 57. Each router reduces the TTL by 1, so 64 − 7 = 57. The packet is discarded if it reaches 0.

9. At which layer of the TCP/IP stack are MAC addresses used?

  1. Transport
  2. Link
  3. Application
  4. Internet
Show answer

B: Link. The link layer frames data with source and destination MAC addresses for delivery across one local network.

10. Packets of one file arrive at the destination out of order. What puts the data back in order?

  1. IP TTL values
  2. TCP sequence numbers
  3. MAC addresses
  4. DHCP leases
Show answer

B: TCP sequence numbers. TCP numbers each segment, so the receiver can reorder them and request any that are missing.

Keep going in Full Marks

Full Marks has 33 questions on The TCP/IP protocol stack (23 more than here), set out in practice levels. You also get notes and 3D models for all 7 subtopics of Internet protocols and security, plus games, timed exams and past papers.

On your exam board

All A-level Computer Science Year 12 topics