Networks and the web · A level · OCR H446 1.3.3, AQA 7517 4.9.3.1, Eduqas A500QS 2.2 · about 25 min
Packet switching, routers and gateways, URLs, fully qualified domain names and DNS.
[1 mark]Which of these are found in a packet's header? Choose all that apply.
Tick every answer that is true.
[1 mark]When should a gateway be used rather than a router?
[1 mark]In the URL https://www.bbc.co.uk/news, what is the fully qualified domain name?
[1 mark]Put the steps of a DNS lookup for lessons.bugbot.example, with nothing cached, in order.
Number the lines 1 to 5 to put them in the right order.
The resolver asks the authoritative name server for bugbot.exampleThe resolver caches the IP address and returns it to the computerThe resolver asks a root name serverThe resolver asks the top-level domain server for .exampleThe computer asks its resolver[1 mark]Which is an advantage of packet switching over circuit switching?
[1 mark]What does this program print?
packets = {3: 'ket', 1: 'pa', 2: 'c'}
message = ''
for n in sorted(packets):
message = message + packets[n]
print(message)The Server on this mat sends one short message as four packets, one every 0.4 seconds, but not in order. Each packet is text in the form <number>/<total>:<payload>, for example 2/4:an take d. The number counts from 1, the total is how many packets make the message, and the payload is everything after the first colon (it may contain spaces).
Listen with messages(), checking every 0.1 s, until you hold every packet. Then print two lines:
- arrived in order: <numbers>, the packet numbers in the order they arrived, separated by single spaces;
- message: <text>, the payloads joined in number order.
The robot does not drive.
# the two lines every program starts with: the commands, then the robot
from bugbot import *
connect()
wait(2)
for sender, text in messages():
print(text)Plan your program here, then type it in and press Run.
too many hops. The lookup above needs 3, so it should now fail.https://www.bbc.co.uk/news/technology into its scheme, FQDN, domain name and path with string methods.