VLANs and IP addressing
Local delivery needs a clear broadcast boundary and a way to decide whether a destination is local. A plausible address is not enough when the mask, VLAN and gateway disagree. We will divide local broadcasts, resolve the next-hop interface and compute the prefixes that define Finch’s address scope.
#Section 11VLANs, access ports and trunks
A VLAN defines a logical forwarding domain. The college’s lab and administration can share a switch while remaining separate broadcast domains.
An access port associates ordinary endpoint frames with its configured VLAN. A trunk carries several VLANs between devices and identifies them using the configured tagging rules. In the illustrative setup, VLAN 10 contains engineering and VLAN 20 contains finance. A broadcast received from engineering is forwarded only through eligible engineering ports and trunks, rather than every physical connector.
The 802.1Q tag adds the declared four bytes to the example frame:
Read the tagged count as the existing untagged frame plus its VLAN field. It does not allocate another IP payload allowance. The endpoints on access ports need not see the same tagged representation used between switches, because the forwarding device can add or remove the tag at that boundary.
Inter-VLAN routing and native VLANs
Communication between the domains requires routing, often through a router interface or a switch with routing functions. That boundary can apply policy between the address spaces. A trunk's untagged or native-VLAN convention must agree at both ends; a mismatch can place traffic in an unintended domain or make replies disappear.
A VLAN supplies traffic separation under the switching configuration, not encryption or proof that a host is trusted. Incorrect membership, an exposed trunk or permissive inter-VLAN policy can undo the intended separation. The interview answer should trace the ingress classification, allowed egress ports and routing boundary, then state where policy and authentication are applied. The VLAN number alone does not provide that complete argument.
#Section 12ARP and next-hop resolution
ARP resolves the route-selected local IPv4 next hop to its link address. For a remote server, Finch resolves the gateway rather than discovering a remote MAC.
Finch first consults its neighbour cache. With no usable entry, it broadcasts a request asking who owns 192.168.10.65 on this local domain. The gateway replies with its interface address, and Finch records that evidence. It then sends a unicast frame addressed to the gateway MAC while the carried IP packet still names the remote server.
Cache lifetime and stale neighbours
Caching avoids another broadcast for each packet, but the mapping can become stale after an interface replacement or address move. The host must refresh or invalidate it under its neighbour policy. If the old MAC remains cached, packets can leave through the correct route yet reach the wrong local interface. A route-table inspection alone will miss that failure.
ARP also lacks an authentication guarantee for these assertions. A malicious host can claim a mapping and redirect traffic under a susceptible local configuration. That is a local delivery attack, not evidence that the DNS answer or server certificate changed. Network controls and end-to-end authentication protect different boundaries.
The worked address comparison returns to Section 13's mask. Finch and .65 share the .64/26 network; the server does not. A local destination would require that destination's MAC, while a remote destination requires the selected gateway's MAC. IPv6 uses Neighbor Discovery rather than ARP, but it still needs to connect a next-hop decision with a neighbouring interface. That separation is the reusable mechanism, even when the discovery messages change.
#Section 13IPv4 addresses, masks and CIDR
CIDR combines an address with a prefix length. Network bits define the block, while remaining bits locate positions inside it; an address alone does not define locality.
For the declared /26, the mask is 255.255.255.192. The last client octet is 01000110 in binary, and the mask's last octet is 11000000. Their bitwise AND is 01000000, or decimal 64, giving network 192.168.10.64. This operation finds the block; it does not query another machine.
/26 prefix places Finch inside the .64 block. Orange marks the client's address between the network and broadcast boundaries.The address count follows directly from the remaining bits:
Read A as total addresses and H as ordinary assignable hosts under this IPv4 subnet convention. The block ends at 192.168.10.127; ordinary hosts run from .65 through .126. Finch at .70 and its gateway at .65 are therefore inside the same prefix. The server address lies outside it and uses a gateway route.
Network, host and broadcast addresses
The network address identifies the block, and the all-host-bits-set address is its directed broadcast under this model. A /32 names one address rather than applying the ordinary subtract-two rule. Point-to-point /31 operation also has a special convention, which the next section distinguishes from the general table.
A wrong prefix can make Finch ARP for a destination that actually requires a router, or send a truly local destination through the gateway. Either error changes the first delivery decision before transport begins. The CIDR specification describes explicit prefix lengths that replaced class-based assumptions. The operational lesson is to inspect address, prefix and route together rather than infer a mask from the address's first octet.
#Section 14Subnetting, VLSM and aggregation
Subnetting divides aligned address blocks. VLSM permits different-sized blocks for departments with different needs, rather than assigning every group one unnecessarily large range.
The supplied address counts are powers of two. /25 has 128 total addresses, /26 has 64, /27 has 32 and /28 has 16. Under the ordinary network-and-broadcast convention, those give 126, 62, 30 and 14 hosts. Each added prefix bit halves the block, but the two excluded boundary addresses make host counts decrease differently from a simple halving.
/26 row with 64 addresses and 62 ordinary hosts; special point-to-point conventions require separate treatment.Allocation alignment and special prefixes
The block 192.168.10.64/26 begins at the required 64-address boundary. Starting the same prefix at .70 does not create another aligned block with .70 as its network. Assigning this /26 consumes 64 of the /24's 256 addresses, leaving outside it. Those remaining addresses are not automatically one aligned replacement prefix.
A /30 supplies four addresses and two ordinary hosts in the table’s model. A point-to-point /31 can use both positions under its dedicated rule; ordinary subtraction would give zero, while the figure shows its special point-to-point capacity. A /32 is a host route. The point-to-point rule names that exception explicitly.
Supernetting and route aggregation
Aggregation combines aligned adjacent prefixes into a shorter advertisement. The blocks .0/26 and .64/26 combine into 192.168.10.0/25. Merely advertising a wider prefix also claims addresses in that wider block, so the advertising network must have appropriate reachability or disposal policy for them. Aggregation reduces routing detail at the cost of hiding distinctions. In an interview, show the aligned binary boundary and explain what happens to an address inside the aggregate but outside an actually reachable child prefix.
#Section 15Public, private and special address scope
Address scope says where an address is meaningful. Private ranges can be reused across institutions, so a private address alone is neither a global return route nor verified identity.
The private IPv4 blocks are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. A gateway can translate Finch’s outgoing source into an address usable on its external path. In this chapter, 198.51.100.7 plays that external role and 203.0.113.20 plays the server role. Both come from documentation ranges, so the example does not claim they are reachable production Internet endpoints.
Loopback, link-local, unspecified and broadcast
Loopback reaches the same host’s protocol stack rather than another machine. IPv4 127.0.0.1 is the familiar example. Link-local configuration supports communication on one local link and is not a substitute for an Internet route. The unspecified address 0.0.0.0 has context-dependent uses, including an unconfigured source or a wildcard local bind. A broadcast address targets the relevant local IPv4 domain under its forwarding policy.
A server bound to 0.0.0.0 can accept traffic addressed to its local interfaces, subject to firewall and other policy. It does not own every possible destination address. A browser trying that value as a remote URL has not supplied a useful global server identity.
The security mistake is treating private addressing as authorization. An attacker or compromised service inside the private network can still reach permitted internal paths. Conversely, a public address does not imply every port is open. The address plan, route table, translation state, firewall and application permission each make a separate decision. Trace them separately when a packet reaches the gateway but the request still fails.