AS · Practice questions · IP addressing and the domain name service

Find the address.

Six original Cambridge-style questions on IP addressing, subnetting, URLs and DNS, with mark-scheme style solutions.

Original questions All questions on this page are original work, written in the Cambridge AS & A Level style. They are not from past papers. They test the same concepts and skills the syllabus rewards.
Keep these straight

Mask, then AND.

01
Recall
[3 marks]

Describe the format of an IPv4 address and of an IPv6 address.

  • IPv4: 32 bits, written as four denary numbers (each 0 to 255, one byte) separated by dots. ✓
  • IPv6: 128 bits, written as eight groups of four hexadecimal digits separated by colons. ✓
  • IPv6 can be shortened by removing leading zeros and replacing one run of zero groups with ::. ✓
02
Calculate
[3 marks]

A host has IP address 172.16.9.150 and subnet mask 255.255.255.224. (a) Find the network address. (b) State how many usable host addresses the subnet has.

  • 150 = 10010110 and 224 = 11100000; AND gives 10000000 = 128. ✓
  • (a) Network address 172.16.9.128. ✓
  • (b) 5 host bits: 25 − 2 = 30 usable host addresses. ✓
03
Explain
[4 marks]

Explain the difference between a public IP address and a private IP address, and the implications for security.

  • A private IP address is used only within a LAN and is not unique on the internet / not routable on the internet. ✓
  • A public IP address is unique on the internet and allocated by an ISP. ✓
  • Devices with private addresses cannot be contacted directly from outside; the router uses NAT so only its public address is seen. ✓
  • A device with a public address is directly reachable and so more exposed to attack; it needs a firewall. ✓
04
Explain
[4 marks]

Compare static and dynamic IP addresses, giving a suitable use for each.

  • A static address is set manually and does not change. ✓
  • Use: a web server or network printer, which must always be found at the same address. ✓
  • A dynamic address is allocated by a DHCP server each time the device connects and can change. ✓
  • Use: laptops and phones joining a network; addresses are reused, so fewer are needed. ✓
05
Explain
[5 marks]

A user types https://www.example.org/shop/basket.html into a browser. Explain how the URL is used to locate the resource, including the role of the DNS.

  • The browser identifies the protocol (https), the domain name (www.example.org) and the path/file (/shop/basket.html). ✓
  • The domain name is sent to a DNS server to find the matching IP address (if it is not already cached). ✓
  • If that DNS server does not have it, the request is passed to other DNS servers in the hierarchy until it is resolved. ✓
  • The IP address is returned to the browser. ✓
  • The browser sends an HTTPS request for /shop/basket.html to the web server at that IP address, and the server returns the page. ✓
06
Analysis
[3 marks]

A company has the network 192.168.50.0 with subnet mask 255.255.255.0. It wants four separate subnets, one per department, each with up to 50 devices. Suggest a new subnet mask and justify it.

  • 255.255.255.192: borrows 2 bits from the host part, giving 22 = 4 subnets. ✓
  • This leaves 6 host bits: 26 − 2 = 62 usable addresses per subnet, enough for 50 devices. ✓
  • Subnets: 192.168.50.0, .64, .128 and .192. ✓

Mark this once you have attempted all six and checked your working. It records a Practiced badge on the topic and adds a one-time bonus. Revealing the solutions alone does not count.