Skip to content

← Grade 9 Computing

Exam practice

Every question from the end of every unit, with hints and answers to open. After you check an answer, mark how you did, and come back to the ones you didn’t get.

15 questions

Unit 5 · How the Internet Works

a.

Write the full forms: LAN, WAN, MAN, PAN, NIC, MAC, ISP, TCP/IP, UDP, HTTP, HTTPS, FTP, SMTP, DNS, DHCP, IPv6, NAT, VPN, URL.

Answer

LAN: local area network. WAN: wide area network. MAN: metropolitan area network. PAN: personal area network. NIC: network interface card. MAC: media access control. ISP: internet service provider. TCP/IP: Transmission Control Protocol / Internet Protocol. UDP: User Datagram Protocol. HTTP: Hypertext Transfer Protocol. HTTPS: Hypertext Transfer Protocol Secure. FTP: File Transfer Protocol. SMTP: Simple Mail Transfer Protocol. DNS: Domain Name System. DHCP: Dynamic Host Configuration Protocol. IPv6: Internet Protocol version 6. NAT: network address translation. VPN: virtual private network. URL: uniform resource locator.

b.

Differentiate between a LAN and a WAN. Give one example of each from Nepal.

Answer
LAN WAN
covers a room, building or campus, up to about a kilometer covers a country or the world
usually owned by one family, school or company uses lines rented from telecom companies, or many owners
fast, with few errors slower and with more delay over long distances
example: a school’s computer lab example: a bank’s network joining its branches across Nepal; the internet
c.

Draw the star and bus topologies for five computers. Give two advantages and one disadvantage of each.

Answer

Star: five computers, each with its own cable to a switch in the middle. Bus: one cable with a terminator at each end, the five computers joined to it (as in Figure 5.1).
Star. Advantages: a broken cable cuts off only one computer; easy to add a computer or find a fault. Disadvantage: if the switch fails, the whole network stops (and it needs more cable than a bus).
Bus. Advantages: needs the least cable; simple and cheap for a few computers. Disadvantage: one break in the bus cable stops the whole network, and faults are hard to find.

d.

What is the difference between a hub and a switch? Why are hubs no longer used?

Answer

A hub repeats every message out of every socket, to every device. A switch learns which device (by its MAC address) is on which socket, and sends each message only out of the socket it is for.
With a hub, all the devices share its capacity and must take turns, they get in each other’s way, and every device can see every other’s traffic. A switch lets many pairs talk at once, at full speed, and keeps each message to its own device. Switches became cheap, so hubs are no longer made.

e.

Differentiate between guided and unguided media, with two examples of each.

Answer
Guided media Unguided media
the signal travels along a cable the signal travels through air or space
hardly affected by weather or walls affected by walls, distance and weather
hard to listen in on without reaching the cable anyone in range can pick it up, so it must be scrambled
devices stay in one place devices can move
twisted pair cable, optical fiber (also coaxial) Wi-Fi radio, satellite (also Bluetooth, microwave, infrared)
f.

What is a protocol? Name the four layers of the TCP/IP model and give one protocol at each.

Answer

A protocol is a set of rules that devices follow to communicate: the form of the messages, their order, their meaning, and what to do when something goes wrong.
Application layer: HTTP (or DNS, SMTP, FTP, DHCP). Transport layer: TCP (or UDP). Internet layer: IP. Link layer: Ethernet (or Wi-Fi).

g.

Differentiate between TCP and UDP. Which would you use for: i. downloading a file, ii. a live video call? Why?

Answer

TCP sets up a connection, numbers every piece, checks each arrived, sends lost pieces again, and puts them in order: reliable but slower. UDP just sends each piece, with no checking or resending: faster, never waits, but pieces can be lost.

  • i.Downloading a file: TCP, because every byte must arrive, in order; a file with one piece missing is broken.
  • ii.A live video call: UDP, because a piece sent again would arrive too late to show; it is better to skip it and carry on.
h.

A computer has the IP address 192.168.5.14, the subnet mask 255.255.255.0 and the default gateway 192.168.5.1. i. What is its network part? ii. Will a packet to 192.168.5.200 go through the router? iii. And a packet to 192.168.6.14? Explain.

Answer
  • i.With the mask 255.255.255.0 the first three numbers are the network: 192.168.5.
  • ii.No. 192.168.5.200 has the same network part, 192.168.5, so it is on the same network: the computer sends the packet straight to it, through the switch.
  • iii.Yes. 192.168.6.14 has the network part 192.168.6, a different network, so the computer sends the packet to its default gateway, the router at 192.168.5.1, which passes it on.
i.

Differentiate between IPv4 and IPv6 in four points. Shorten the IPv6 address 2001:​0db8:​0000:​0000:​0000:​ff00:​0042:​8329.

Answer
IPv4 IPv6
32-bit addresses 128-bit addresses
about 4.3 billion addresses, all given out about 3.4 × 10³⁸ addresses
written in decimal, four numbers with dots written in hexadecimal, eight groups with colons
needs NAT to share addresses every device can have its own public address
header 20 to 60 bytes fixed header of 40 bytes

Leading zeros off: 2001:​db8:​0:​0:​0:​ff00:​42:​8329; then the run of three zero groups becomes a double colon: 2001:db8::ff00:42:8329.

j.

What are private IP addresses? Explain how NAT lets every device in a home share one public address.

Answer

Private addresses are three ranges (10.x.x.x, 172.16.x.x to 172.31.x.x, and 192.168.x.x) set aside for use inside networks, never on the internet. Many networks use the same ones at the same time without trouble.
NAT: each device in the home has its own private address, given by the router’s DHCP. When a device sends a packet out, the router replaces the private address with the home’s one public address, and remembers which device sent it (and to which app). When the answer comes back to the public address, the router looks up its record, puts the device’s private address back, and passes the answer to that device. To the internet, the whole home looks like one device.

k.

Explain, step by step, how your phone finds the IP address of moecdc.gov.np. What is caching, and why does it make DNS fast?

Answer
  1. The phone asks its DNS resolver (usually run by the internet company) for the address of moecdc.gov.np.
  2. If the resolver has no copy, it asks a root server, which answers: ask the .np servers, at these addresses.
  3. It asks a .np server, which answers: ask moecdc.gov.np’s own servers, at these addresses.
  4. It asks moecdc.gov.np’s server, which gives the address, and how long it may be kept.
  5. The resolver passes the address to the phone, and keeps a copy.

Caching is keeping copies of answers for the time they allow. The next request for the same name, from anyone using that resolver, is answered at once from the copy, without asking the root, .np or the domain’s servers. Most lookups are answered from caches in a few milliseconds, and the root servers are asked only rarely.

l.

Describe what happens, in order, from the moment you tap a link to https://moecdc.gov.np until the page appears. Which layer does each step belong to?

Answer
  1. DNS lookup (application layer): the browser finds the address of moecdc.gov.np, from a cache or by asking the resolver.
  2. TCP connection (transport layer): the browser and the server set up a connection with the three-way handshake.
  3. TLS (between the transport and application layers): because of https, they agree on a secret key, and the server shows its certificate to prove its name. Everything after is encrypted.
  4. HTTP request (application layer): the browser sends GET for the page, with the Host moecdc.gov.np.
  5. HTTP response: the server sends the status 200 OK and the page’s HTML.
  6. The browser asks for the other files the HTML names (styles, pictures, scripts) and draws the page as they arrive.

All of these messages travel as IP packets (internet layer) across Wi-Fi, cables and fiber (link layer), router to router.

m.

Differentiate between HTTP and HTTPS. Why should you never type a password into a page whose address starts with http://?

Answer
HTTP HTTPS
sent as plain text sent encrypted, inside TLS
no proof of the server’s identity the server proves its name with a certificate
port 80 port 443
http:// https://, often with a padlock

On an http:// page, the password travels as plain text: anyone on the way, on a café’s Wi-Fi or at an internet company, could read it, and could even change the page you see. On https:// it is scrambled on the way (though the padlock still doesn’t prove the website is honest, Grade 6).

n.

How does the internet differ from a school’s network? Explain with four points, and say what an intranet and an extranet are.

Answer
  1. Owner: a school’s LAN is owned and run by the school; the internet is tens of thousands of networks with separate owners, and nobody owns the whole.
  2. Rules: the school’s administrator decides everything in its LAN; the internet is held together only by open protocols agreed by all and each network’s own policies.
  3. Size and membership: the LAN covers a building and only the school’s devices; the internet covers the world and anyone can join through an internet company.
  4. Addresses and routes: the LAN uses private addresses chosen by the school and simple routes; the internet uses public addresses handed out by regional registries, and networks tell each other their routes by BGP.

An intranet is a private network built with the internet’s tools (web pages, email) for an organization’s own people only; an extranet lets chosen outsiders, such as suppliers or partner schools, into part of it with a login.

o.

Design a network for a small school with a lab of 10 computers and a printer, an office with 2 computers and a file server, and Wi-Fi for teachers. Draw the diagram with a key, and say what software the router runs. Should it be client–server or peer-to-peer? Why?

Hint

Count sockets: a router has only a few. Start from the fiber box and the router, and use switches for the rooms.

Answer

A diagram like Figure 5.10: internet company → fiber box (ONT) → router; router → a 16- or 24-port switch in the lab (cable), joining the 10 computers and the printer; router → a small switch in the office, joining the 2 computers and the file server; router (or a switch) → an access point by cable, with teachers’ laptops and phones joined by Wi-Fi. Key: solid lines for cables, dashed for Wi-Fi, a colored line for fiber.
The router runs a DHCP server (giving every device a private address), NAT (sharing the school’s one public address) and a firewall (blocking traffic nobody asked for).
Client–server suits it: the file server keeps the office’s and teachers’ files in one place, where they can be backed up and access controlled by one person; with this many computers, peer-to-peer sharing would be hard to keep track of and to back up.