22-Elec-B4 Information Technology Networks · December 2014
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Paper format. Professional Engineers of Ontario Annual Examinations, December 2014 — 07-Elec-B4 Information Technology Networks. Three hours, closed book, a PEO-approved non-programmable calculator permitted. Five questions of 25 marks each; any four constitute a complete paper worth 100 marks, with marks noted in the left margin. Candidates are urged to state any interpretive assumptions with their answers. All five questions are worked below, since the complete set is more useful as a study resource than any four of it.
Reference texts. A. Leon-Garcia and I. Widjaja, Communication Networks: Fundamental Concepts and Key Architectures, 2nd ed. (the EGBC/PEO 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.; T. S. Rappaport, Wireless Communications: Principles and Practice, 2nd ed.; W. Stallings, Data and Computer Communications, 10th 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.
Part (a) — Size of the IPv4 address space.
Given. The IPv4 header carries a source and a destination address, each a fixed field of 32 bits.
Find. The total number of distinct addresses that field can express, ignoring reservations.
Address space exhaustion is the fact that this number, large as it looked in 1981, is smaller than the world’s population and far smaller than the count of devices wanting an address. The shortage was made much worse by how the space was handed out. Classful allocation gave an organisation an entire class A block of $2^{24}$ addresses or a class B block of $2^{16}$ whether or not it could use them, so an institution needing 300 hosts consumed 65,536; the addresses were allocated, hence unavailable to anyone else, while sitting idle. IANA distributed its last unreserved blocks to the regional registries in February 2011, and ARIN, which serves Canada, ran its free pool down to exhaustion in September 2015.
Several solutions exist and all have been deployed. Network address translation (NAT) lets an entire site hide behind one public address, rewriting the address and port of each outgoing packet and keeping a translation table to reverse the change; it is why RFC 1918 private ranges such as 192.168.0.0/16 can be reused endlessly, at the cost of breaking end-to-end addressing and complicating inbound connections. Classless inter-domain routing (CIDR) replaced fixed classes with a variable prefix length, so a site needing 300 hosts receives a /23 rather than a class B, and it aggregates routes to keep backbone tables small. The permanent fix is IPv6, whose 128-bit address gives $2^{128} \approx 3.4 \times 10^{38}$ addresses. Any one of these is an acceptable answer to the question; NAT and CIDR bought the time in which IPv6 could be deployed.
Part (b) — Routing tables at both routers.
Given. The three-LAN internetwork drawn with the question, redrawn below. Each LAN is a class B network subnetted on a byte boundary, so the netmask throughout is 255.255.255.0, equivalently a /24 prefix.
| Subnet | Hosts | Router interfaces on this subnet |
|---|---|---|
| 128.100.11.0/24 | 128.100.11.1, 128.100.11.2 | R1: 128.100.11.3 |
| 128.100.12.0/24 | 128.100.12.1, 128.100.12.2 | R1: 128.100.12.3 • R2: 128.100.12.254 |
| 128.100.13.0/24 | 128.100.13.1, 128.100.13.2 | R2: 128.100.13.3, plus an interface toward the Internet |
Find. A complete forwarding table for each router, giving destination network, netmask, gateway and outgoing interface.
Approach. Enter one directly-connected route per interface, one indirect route for each subnet reachable only through the other router, and a default route for everything else; the router that owns the Internet link is the one whose default points outward.
| Destination | Netmask | Gateway | Interface |
|---|---|---|---|
| 128.100.11.0 | 255.255.255.0 | — (direct) | 128.100.11.3 |
| 128.100.12.0 | 255.255.255.0 | — (direct) | 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 |
| Destination | Netmask | Gateway | Interface |
|---|---|---|---|
| 128.100.12.0 | 255.255.255.0 | — (direct) | 128.100.12.254 |
| 128.100.13.0 | 255.255.255.0 | — (direct) | 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 | upstream provider | Internet |
Each host needs only two entries of its own: its local subnet as a direct route, and a default route to the router interface on its wire — 128.100.11.3 for the hosts on the top LAN, 128.100.12.3 or 128.100.12.254 for those on the middle LAN, and 128.100.13.3 for those on the bottom LAN. Forwarding is by longest-prefix match, so the specific /24 entries are always preferred over the /0 default.
Part (c) — Path from 128.100.11.2 to 128.100.13.1. The source host masks its own address and the destination with 255.255.255.0, obtaining 128.100.11.0 and 128.100.13.0. These differ, so the destination is not on the local wire and the packet cannot be delivered by ARP; the host sends it instead to its default gateway, addressing the frame to the MAC address of 128.100.11.3 while leaving the IP destination untouched at 128.100.13.1.
R1 receives the frame, strips it, and looks up 128.100.13.1 in the table above. The longest match is the 128.100.13.0/24 entry, whose gateway is 128.100.12.254, so R1 decrements the time-to-live, recomputes the header checksum, and forwards the packet out of its 128.100.12.3 interface in a frame addressed to R2. R2 in turn matches 128.100.13.0/24 as a direct route, ARPs for 128.100.13.1 on the bottom LAN, and delivers it. The path is therefore
128.100.11.2 → R1 (128.100.11.3 in, 128.100.12.3 out) → R2 (128.100.12.254 in, 128.100.13.3 out) → 128.100.13.1
three IP hops, crossing all three LANs. Note that the middle LAN is traversed as a transit segment even though neither endpoint lives on it.
Part (d) — Path from 128.100.11.1 to 128.100.1.1. The arithmetic begins the same way and ends differently. Masking 128.100.1.1 with 255.255.255.0 gives the network 128.100.1.0, which matches none of the three subnets in the diagram, so the source host again hands the packet to 128.100.11.3.
R1 searches its table and finds no /24 entry for 128.100.1.0; the only entry that matches is the default route, whose gateway is 128.100.12.254. R1 forwards to R2, which likewise finds no specific match and falls back on its default route, sending the packet out of the Internet interface toward the upstream provider. The path within the site is
128.100.11.1 → R1 → R2 → Internet (destination lies outside this internetwork)
Check: the destination looks local and is not. 128.100.1.1 shares its first two octets with every address in the diagram, and under the obsolete classful reading it would belong to the same class B network 128.100.0.0/16 and appear to be a local subnet. Forwarding decisions are made with the configured mask, however, and that mask is /24: 128.100.1.0 is simply a subnet that does not exist here. It is a plausible address for another part of the same campus reached over the wider network, so the packet correctly leaves via the default route. If it is genuinely unreachable, R2’s upstream router will discard it and return an ICMP destination-unreachable message to 128.100.11.1.
| Part | Quantity | Result |
|---|---|---|
| (a) | Total IPv4 addresses, $2^{32}$ | 4,294,967,296 |
| (a) | One remedy for exhaustion | NAT, CIDR, or IPv6 |
| (b) | Netmask on every subnet entry | 255.255.255.0 (/24), 254 usable hosts |
| (b) | Entries per router | 4 at R1, 4 at R2 (2 direct, 1 indirect, 1 default each) |
| (c) | Path 128.100.11.2 to 128.100.13.1 | host → R1 → R2 → host (3 hops) |
| (d) | Path 128.100.11.1 to 128.100.1.1 | host → R1 → R2 → Internet via both default routes |