22-Elec-B4 Information Technology Networks · May 2017
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Paper format. Engineers Canada / Professional Engineers of Ontario, National Examinations — May 2017, 16-Elec-B4 Information Technology Networks. Three hours, closed book, one approved Casio or Sharp calculator permitted. Five questions of 25 marks each; any four constitute a complete paper worth 100 marks, and the marks are printed in the left margin against every sub-part. All five questions are solved here, because this set is a study resource rather than an exam attempt.
Reference texts.
Canadian context. The spectrum, licensing and equipment-certification framework assumed throughout is the Canadian one: Innovation, Science and Economic Development Canada (ISED) licenses the cellular bands under the Radiocommunication Act and publishes the Standard Radio System Plans (SRSP) that fix the duplex spacing referred to in Question 1(e), and Canadian carriers deploy the same 3GPP LTE numerology used in Question 1(b).
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) — the size of the two address spaces.
Given. An IPv4 address is a 32-bit binary number; an IPv6 address is a 128-bit binary number. Reserved and special-purpose ranges are to be ignored.
Find. The total number of IPv4 addresses, and whether IPv6 offers more, fewer or the same.
Approach. An $n$-bit field takes $2^{n}$ distinct values; evaluate for both address lengths and take the ratio.
Explanation. IPv6 gives more — overwhelmingly more — because the address field was widened from 32 to 128 bits, and each added bit doubles the space. The size is deliberately extravagant rather than merely sufficient: it permits a fixed 64-bit interface identifier so that hosts can autoconfigure from the link-layer address, and a 64-bit hierarchical routing prefix, which keeps allocation sparse and global routing tables aggregated. That is the real motive. Exhaustion of IPv4 (IANA's free pool ran out in 2011) had until then been deferred by classless inter-domain routing, private addressing and network address translation, all of which preserve addresses at the cost of breaking the end-to-end model.
Part (b) — the routing tables at both routers.
Given. Three LANs, drawn as buses, with class-B-derived network numbers 128.100.11.0, 128.100.12.0 and 128.100.13.0; the third octet distinguishes the subnets, so the subnet mask throughout is 255.255.255.0, that is a /24 prefix. Router R1 has interfaces 128.100.11.3 on the upper LAN and 128.100.12.3 on the middle LAN. Router R2 has interfaces 128.100.12.254 on the middle LAN and 128.100.13.3 on the lower LAN, and also holds the link to the Internet.
Find. A forwarding table at each router giving, for every destination network, the netmask, the outgoing interface and the next-hop gateway.
Approach. Enter the directly-attached networks first (no gateway needed), then one entry for each remote network reached through the other router, and finally a default route for everything else.
| Destination network | Netmask | Gateway (next hop) | Interface | Metric |
|---|---|---|---|---|
| 128.100.11.0 | 255.255.255.0 | — (direct) | 128.100.11.3 | 0 |
| 128.100.12.0 | 255.255.255.0 | — (direct) | 128.100.12.3 | 0 |
| 128.100.13.0 | 255.255.255.0 | 128.100.12.254 | 128.100.12.3 | 1 |
| 0.0.0.0 (default) | 0.0.0.0 | 128.100.12.254 | 128.100.12.3 | 1 |
| Destination network | Netmask | Gateway (next hop) | Interface | Metric |
|---|---|---|---|---|
| 128.100.12.0 | 255.255.255.0 | — (direct) | 128.100.12.254 | 0 |
| 128.100.13.0 | 255.255.255.0 | — (direct) | 128.100.13.3 | 0 |
| 128.100.11.0 | 255.255.255.0 | 128.100.12.3 | 128.100.12.254 | 1 |
| 0.0.0.0 (default) | 0.0.0.0 | — (ISP link) | Internet | 1 |
For completeness, each host carries a two-line table of the same form: its own /24 as directly attached, and a default route to the router on its bus — 128.100.11.3 for the upper LAN, 128.100.12.254 (or 128.100.12.3) for the middle, and 128.100.13.3 for the lower.
Part (c) — the path taken by a packet from 128.100.11.2 to 128.100.13.1.
Given. Source 128.100.11.2 on the upper LAN; destination 128.100.13.1 on the lower LAN; the tables of part (b).
Find. The sequence of hops, with the decision made at each.
Approach. Apply, at each node in turn, the same two-step test: mask the destination with the local prefix to see whether it is on-link, and otherwise look it up by longest prefix match.
traceroute would confirm the path.Two points earn the explanation marks. First, the packet never touches the Internet link: R1's specific /24 entry is a longer prefix match than its default route, so the default is not consulted. Second, the destination IP address is constant end to end while the layer-2 destination changes at every hop — this is the practical expression of the layering of Question 3, with the network layer providing the global address and the data link layer providing delivery across each individual bus.
Part (d) — where a packet addressed to 127.0.0.1 goes. Nowhere: it goes straight back up the sending host's own protocol stack and never reaches the wire. 127.0.0.0/8 is reserved by RFC 1122 as the loopback block — over sixteen million addresses, of which 127.0.0.1 is the conventional one, named localhost. Every compliant IP implementation carries a loopback interface with a route for that prefix, and a datagram matching it is looped back inside the kernel: it is passed from the IP output routine directly to the IP input routine on the same machine, delivered to whatever process is listening on the destination port, and no frame is ever handed to a network adapter.
Three consequences follow, and they are what the five marks are testing. A router must never forward a packet whose source or destination lies in 127.0.0.0/8, and must discard any such packet arriving on a real interface (a rule enforced by martian filtering, since spoofed loopback addresses would otherwise defeat host-based access control). The address is host-relative rather than global, so 127.0.0.1 means a different machine on every machine — it cannot be used to reach a peer. And its practical uses follow directly: testing that a local stack is installed and working, letting a client and a server on one machine communicate over ordinary sockets, and binding a service so that it is reachable only from the machine itself. The IPv6 equivalent is the single address ::1.
| Quantity | Symbol / where | Value |
|---|---|---|
| Total IPv4 addresses | $N_{4} = 2^{32}$, Q5(a) | 4 294 967 296 (4.29 × 109) |
| Total IPv6 addresses | $N_{6} = 2^{128}$, Q5(a) | 3.40 × 1038 (more) |
| Ratio IPv6 : IPv4 | $2^{96}$, Q5(a) | 7.92 × 1028 |
| Subnet mask on every LAN | Q5(b) | 255.255.255.0 (/24), 254 usable hosts |
| Entries in each router table | Q5(b) | 4 (two direct, one remote, one default) |
| Router holding the default route | Q5(b) | R2 (128.100.12.254 / 128.100.13.3) |
| Path 128.100.11.2 → 128.100.13.1 | Q5(c) | host → R1 → R2 → host, 2 router hops |
| TTL on arrival (from 64) | Q5(c) | 62 |
| Destination of a packet to 127.0.0.1 | Q5(d) | The sending host itself (127.0.0.0/8 loopback) |