Definition

In the workbook’s ordinary subnet model, a host sends traffic directly to a local destination and through its gateway for a remote destination. Its own address and mask determine which destinations appear local. More-specific routes and special configurations can change this simplified model.

Gateway selection

A gateway is the router’s address on the host’s own subnet. For 192.168.1.66/27, the network is .64-.95, with usable addresses .65-.94. If the router has .65 there, use .65 as the gateway. A router’s .97 interface on a separate router link is not this LAN’s gateway.

Different LANs normally have different gateway addresses. Each host’s gateway must be local to that host, not in the same subnet as another LAN’s gateway. Forwarding through a gateway does not replace the packet’s final destination IP with the gateway IP.

Prefix mistakes

ConfigurationConsequence in the workbook model
Router .1/28, host .23/28Same mask, different subnets: .0-.15 versus .16-.31; host cannot directly reach gateway .1
Router .1/27, host .23/28Router sees host as local, but host sees gateway as outside its subnet; return path fails
Router .1/27, host .8/28Both see each other as local; that exchange can work despite the inconsistent masks

The last case does not prove a sound configuration. A peer .25/27 sees .8 as local, while .8/28 sees .25 as remote. Different paths can arise; success depends on routing and configuration. The source’s blanket suggestion that different masks always prevent communication should be read through this distinction.

Added example: a host 192.168.1.10 accidentally using /16 thinks remote 192.168.2.10 is local. It asks for that destination using ARP on its own LAN, bypassing its otherwise correct gateway. Without special configuration such as proxy ARP, no reply arrives from the other LAN. Correct /24 makes that destination remote.

Combined configuration errors

Exercise 21 combines three independent errors: no DNS-server gateway for reaching remote clients, overlapping networks, and network/broadcast addresses assigned to router-link endpoints.

Added overlap example: separate LANs assigned 192.168.1.0/27 (.0-.31) and 192.168.1.24/29 (.24-.31) overlap even if device IPs are unique. Moving the second LAN to .32/29 (.32-.39) removes the overlap. Otherwise, hosts in the first LAN regard the second LAN’s addresses as local and attempt direct delivery.

Added endpoint example: 192.168.1.40/30 has network .40, usable endpoints .41 and .42, and broadcast .43. Assigning .40 and .43 to the routers is invalid in the traditional model.

A valid DNS address and mask do not provide a return route to every client. Without a gateway or another applicable route, the server cannot reply to clients on remote subnets, even if their requests arrive.

Duplicate IP addresses and ARP

ARP (Address Resolution Protocol) resolves a local IPv4 address to a link-layer hardware address. If a router and a computer both claim .1, both may answer a request for the gateway. Traffic can then reach the wrong device and fail intermittently. The result depends on ARP cache updates and device behavior; it is not universally a random choice. A system may also detect the conflict and refuse the address.

Changing masks does not make the duplicate unique. Assign distinct usable addresses. An ordinary computer is assumed not to forward packets in these examples; hosts can be configured as routers in other setups.

DNS versus connectivity

DNS (Domain Name System) translates names into addresses. A DNS server can be outside the client’s subnet; the client reaches it through a router.

ObservationUseful first checks, not definitive proof
Server reachable by IP but not nameDNS configuration and name resolution
Local peers reachable, remote destinations failHost gateway, mask, routes, then filtering/connectivity
Failure also occurs using an IP directlyDNS alone cannot explain it; inspect addressing, routing, links, filtering, destination availability
H1-H2 works; H2-H3 across router works; H1-H3 failsH1-specific gateway/mask errors or selective filtering; successful H2 traffic does not prove all router behavior correct

Ping failure alone does not prove that all applications fail: ICMP may be filtered. Troubleshoot both forward and return paths.

Source

Fulvio Risso, Exercises on IP Addressing, 7 December 2017, Exercises 16-21 (PDF pages 26-28), solutions pages 44-47. Paraphrases with added examples and qualifications, not verbatim answers. Workbook-derived notes licensed CC BY-NC-SA 3.0: https://creativecommons.org/licenses/by-nc-sa/3.0/. Original PDF remains local.