22-Elec-B4 Information Technology Networks · December 2019
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Paper format. National Examinations, December 2019 — 16-Elec-B4, Information Technology Networks. Three hours, closed book; an approved Casio or Sharp calculator is permitted. The paper prints five questions of 25 marks each, and any four constitute a complete paper worth 100 marks, with the marks for every sub-part shown in the left margin. All five questions are solved here, because this set is a study resource rather than an exam attempt, and a candidate choosing which four to write benefits from seeing the fifth worked out.
Reference texts. A. Leon-Garcia and I. Widjaja, Communication Networks: Fundamental Concepts and Key Architectures, 2nd ed. (the syllabus reference for this code); J. F. Kurose and K. W. Ross, Computer Networking: A Top-Down Approach, 8th ed.; A. S. Tanenbaum and D. J. Wetherall, Computer Networks, 5th ed.; W. Stallings, Wireless Communications and Networks, 2nd ed.; S. Sesia, I. Toufik and M. Baker, LTE — The UMTS Long Term Evolution, 2nd ed.; T. H. Cormen, C. E. Leiserson, R. L. Rivest and C. Stein, Introduction to Algorithms, 4th ed.
Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.
Given. An IPv6 address is 128 bits wide (RFC 4291), against 32 bits for IPv4.
Find. The total number of distinct addresses the format can express, ignoring reservations.
The number is deliberately extravagant, and the reason is worth stating: IPv6 spends the lower 64 bits of almost every address on a host identifier so that stateless address autoconfiguration can derive it from the interface's MAC address or a random draw, and it hands out a $/48$ or $/56$ prefix to each subscriber site so that internal subnetting never needs renumbering. The usable count is therefore far smaller than $2^{128}$ in practice — about $2^{64}$ subnets — but even that, $1.8\times10^{19}$, is four billion times the whole IPv4 space.
Given. Three broadcast domains, all $/24$: 128.100.11.0, 128.100.12.0 and 128.100.13.0. Two routers, each drawn as a dark square straddling two of the buses:
| Router | Interface on 128.100.11.0 | Interface on 128.100.12.0 | Interface on 128.100.13.0 | Other |
|---|---|---|---|---|
| R1 | 128.100.11.3 | 128.100.12.3 | — | — |
| R2 | — | 128.100.12.254 | 128.100.13.3 | Internet uplink |
Find. A forwarding table for each router giving destination network, netmask, gateway (next hop) and outgoing interface for every reachable destination.
Approach. Enter each directly connected subnet first, then one entry per remote subnet with the neighbouring router as gateway, then a default route towards the Internet; check that every gateway named lies on the subnet of the interface used to reach it.
[Figure not reproduced: Q3(b): the printed network, redrawn from the examination page. Two dark router boxes straddle three /24 broadcast domains — R1 joins 128.100.11.0 to 128.100.12.0, and R2 joins 128.100.12.0 to 128.100.13.0 and carries the Internet uplink. Each box owns exactly one address per bus it touches. See the official exam paper.]
Routing table at R1
| Destination | Netmask | Gateway | Interface |
|---|---|---|---|
| 128.100.11.0 | 255.255.255.0 | — (directly connected) | 128.100.11.3 |
| 128.100.12.0 | 255.255.255.0 | — (directly connected) | 128.100.12.3 |
| 128.100.13.0 | 255.255.255.0 | 128.100.12.254 | 128.100.12.3 |
| 0.0.0.0 (default) | 0.0.0.0 | 128.100.12.254 | 128.100.12.3 |
Routing table at R2
| Destination | Netmask | Gateway | Interface |
|---|---|---|---|
| 128.100.12.0 | 255.255.255.0 | — (directly connected) | 128.100.12.254 |
| 128.100.13.0 | 255.255.255.0 | — (directly connected) | 128.100.13.3 |
| 128.100.11.0 | 255.255.255.0 | 128.100.12.3 | 128.100.12.254 |
| 0.0.0.0 (default) | 0.0.0.0 | ISP next hop | Internet link |
Every host on the three LANs also needs a default gateway of its own — 128.100.11.3 for hosts on the first LAN, 128.100.12.3 or 128.100.12.254 for the second, 128.100.13.3 for the third — because a host with no route of its own sends anything off-subnet to its default router.
The packet crosses two routers and three link-layer hops. Following it step by step:
In summary the path is 128.100.13.1 → R2 (128.100.13.3 in, 128.100.12.254 out) → R1 (128.100.12.3 in, 128.100.11.3 out) → 128.100.11.2: two router hops, three Ethernet frames. Two properties of IP forwarding are worth naming explicitly. The IP source and destination addresses never change — they identify the endpoints end to end — while the link-layer addresses are rewritten on every hop, because they identify only the two ends of one wire. And the TTL falls by one per router, so a packet leaving the source with TTL 64 arrives with 62; if a routing loop ever formed, the TTL would reach zero and the packet would be discarded with an ICMP “time exceeded” report rather than circulating forever.
Given. The CIDR block 10.0.0.0/24.
Find. The netmask, the range of addresses covered, and the addresses actually assignable to hosts.
Two remarks. This block lies inside 10.0.0.0/8, one of the RFC 1918 private ranges, so these addresses are not routable on the public Internet and would be translated at the site border. And the arithmetic generalises: a $/n$ block holds $2^{32-n}$ addresses and $2^{32-n}-2$ usable hosts, so $/25$ gives 126, $/30$ gives 2 (the classic point-to-point link) and $/31$ is a special case defined by RFC 3021 for point-to-point links where the two reserved addresses are dispensed with.
| Quantity | Result |
|---|---|
| Total IPv6 addresses | $2^{128} = 340\,282\,366\,920\,938\,463\,463\,374\,607\,431\,768\,211\,456 \approx 3.403\times10^{38}$ |
| R1 table | 11.0/24 and 12.0/24 direct; 13.0/24 via 128.100.12.254; default via 128.100.12.254 |
| R2 table | 12.0/24 and 13.0/24 direct; 11.0/24 via 128.100.12.3; default out of the Internet link |
| Netmask on all three LANs | 255.255.255.0 |
| Path 128.100.13.1 → 128.100.11.2 | host → R2 → R1 → host; 2 router hops, 3 frames, TTL 64 → 62 |
| 10.0.0.0/24 covers | 10.0.0.0 – 10.0.0.255 (256 addresses) |
| Usable hosts in that block | 10.0.0.1 – 10.0.0.254 (254) |