Question bank › A-level › A-level Computer Science › Fundamentals of communication and networking

TCP/IP, protocols, IP addressing, subnetting and client–server

10 questions54 marksabout 65 min

Answer on paper first, then reveal the mark scheme one mark at a time.

1Core3 marks

The TCP/IP stack has four layers: application, transport, network and link.

State the layer responsible for each of the following. [3]

  • (i) Routing packets between networks using IP addresses.
  • (ii) Splitting data into packets and using port numbers to identify the receiving program.
  • (iii) Defining the format of an HTTP request.
2Standard4 marks

A computer has the IP address 192.168.14.77 and the subnet mask 255.255.255.224.

(a) Calculate the network identifier (network address) of the subnet that this computer is on. Show your working. [2]

(b) The computer needs to send a packet to the IP address 192.168.14.101. Explain how the computer uses the subnet mask to decide whether it can send the packet directly to the destination or must send it to the router. [2]

3Hard6 marks

A router connects four subnets of a company network (see diagram). Every host on the network uses the subnet mask 255.255.255.192.

Four hosts have these IP addresses:

  • Host A: 192.168.10.37
  • Host B: 192.168.10.70
  • Host C: 192.168.10.120
  • Host D: 192.168.10.200

(a) Write the last octet of the subnet mask in binary and state how many bits of the IP address form the network identifier. [2]

(b) Calculate the network identifier of Host B. Show your working. [2]

(c) Identify the two hosts that are on the same subnet. Justify your answer. [2]

RouterSubnet 1Subnet 2Subnet 3Subnet 4
Stuck on TCP/IP, protocols, IP addressing, subnetting and client–server?

Get it sorted in a free 30-minute session

We work through your weakest questions on this topic on Zoom. I reply the same day.

4Core4 marks

A company uses several application layer protocols.

(a) State the protocol that is used in each of the following situations. [3]

  • (i) A mail server passes a newly sent email on to the recipient’s mail server.
  • (ii) An email client downloads new messages from a mail server to a laptop, removing them from the server.
  • (iii) A network administrator logs in securely to a remote server and runs commands on it.

(b) The company runs an FTP server that allows anonymous access. Explain what is meant by anonymous access. [1]

5Standard6 marks

A laptop with IP address 192.0.2.15 requests a web page using HTTPS from a web server with IP address 203.0.113.20. The packet passes through two routers, as shown in the diagram.

(a) Explain what is meant by a socket and state the socket on the web server that the laptop’s request is sent to. [2]

(b) The source port of the request is 52144. Explain why the destination port is a well-known port but the source port is not. [2]

(c) When the frame carrying the packet arrives at the web server, the source IP address is still 192.0.2.15, but the source MAC address is no longer the laptop’s MAC address. Explain why. [2]

Laptop192.0.2.15Router R1Router R2Web server203.0.113.20Path of the packet: laptop → R1 → R2 → web server
6Standard5 marks

(a) An IPv4 address is 32 bits long and an IPv6 address is 128 bits long.

Calculate how many times more addresses IPv6 can provide than IPv4. Give your answer as a power of 2. [1]

(b) Explain why IPv6 was introduced. [2]

(c) A printer in an office has the IP address 10.20.30.40, which is a private IP address. Explain why a computer elsewhere on the Internet cannot send packets directly to this address. [2]

7Standard6 marks

The diagram shows a home network. The router contains a DHCP server and performs network address translation (NAT). The Internet service provider has given the router the public IP address 198.51.100.7.

(a) A phone is connecting to the Wi-Fi for the first time. Describe how DHCP provides the phone with an IP address. [3]

(b) Give one reason why DHCP is used rather than configuring each device with a fixed IP address by hand. [1]

(c) Explain why the router uses NAT. [2]

Laptop192.168.1.10Games console192.168.1.12Phone(joining Wi-Fi)Home routerDHCP server, NATInternetLAN side: 192.168.1.1Public: 198.51.100.7
8Hard6 marks

A home router has the public IP address 198.51.100.7. Part of its NAT translation table is shown.

(a) The device with private address 192.168.1.12 uses port 51000 to send a request to a web server at 203.0.113.50 port 443. State the source socket of this request as seen by the web server. [1]

(b) A packet arrives at the router from the Internet with the destination socket 198.51.100.7:60003. State the destination socket that the router changes it to before forwarding it on the home network. [1]

(c) The user sets up a game server on the computer with private address 192.168.1.20. It listens on port 25565. Explain why a player elsewhere on the Internet cannot connect to the game server unless port forwarding is set up on the router, and describe how port forwarding solves this. [4]

Private (internal) socketPublic (external) socket192.168.1.10:51500198.51.100.7:60001192.168.1.12:51000198.51.100.7:60002192.168.1.10:51502198.51.100.7:60003
9Stretch8 marks

A cinema booking website is a single web page. JavaScript running in the browser calls the cinema’s REST API over HTTPS. The server stores bookings in a relational database.

(a) Complete the table to show the HTTP request method used for each API call and the SQL command the server would run on the database. The first row has been done for you. [3]

API callHTTP methodSQL command
Fetch the list of showings for a filmGETSELECT
Make a new booking
Change the seats on an existing booking
Cancel a booking

(b) An older version of the API returned bookings in XML, for example:

<booking>
  <bookingID>B381</bookingID>
  <showing>S12</showing>
  <seats>
    <seat>F7</seat>
    <seat>F8</seat>
  </seats>
  <paid>true</paid>
</booking>

Write the equivalent booking in JSON. [2]

(c) Give one reason why JSON is now used rather than XML. [1]

(d) The seating plan on the page must update immediately when other customers book seats. Explain why a WebSocket connection is used for this rather than standard HTTP requests. [2]

10Hard6 marks

A sixth-form college is replacing the 30 computers in its computer science room. It is choosing between:

  • thin-client computing: low-specification terminals that connect to a powerful central server, or
  • thick-client computing: a standalone, high-specification PC for each student, connected to the college network.

Students use the room to write and run programs in an IDE and to store their coursework.

Compare thin-client and thick-client computing and recommend which the college should choose. [6]

Stuck on this topic?

Book a free 30-minute session on WhatsApp and we'll find exactly which step is costing you the marks. Or build a timed paper on it.

Free 30-minute session