Networking / Editorial solution guide
Separate subnet-mask, next-hop, and return-path faults
Explain a synthetic cross-subnet failure by checking address-plan consistency, route selection, local resolution, and independent reply routing.
Read-only knowledge base · No public comments
Recognize the symptoms
A client reaches some local systems but not a remote subnet, or only one direction appears to work. One host attempts local address resolution while another uses a router for the same destination range. A recently changed prefix or more-specific route may affect only a subset of addresses. Preserve both endpoints’ intended configurations and the exact failing destination.
Understand the likely causes
- An incorrect prefix can misclassify a remote address as on-link. A missing or more-specific route can select an unintended next hop. The next hop may be unreachable in the chosen link domain, while an independent return-route, translation, or stateful-policy requirement can prevent replies after the request arrived.
1. Compare intended prefixes before interpreting symptoms
Write the client address/prefix, destination, gateway, interface context, and relevant routing domain. Distinguish an interface address from a canonical network declaration. Compare membership using address arithmetic rather than dotted-decimal resemblance. A wrong larger mask can make the host search locally for a peer that should be reached through a router. An offline check can demonstrate that decision difference without touching the host. Include the gateway’s intended local membership and reserved role, but do not infer that membership proves the gateway exists or forwards.
from ipaddress import ip_interface, ip_address
destination = ip_address('192.0.2.150')
for prefix in (25, 24):
network = ip_interface(f'192.0.2.70/{prefix}').network
print(f'/{prefix} on_link_model={destination in network}')
/25 on_link_model=False
/24 on_link_model=True
The /25 excludes the destination and the /24 includes it. This models prefix classification only and does not read an interface or send ARP.
2. Apply the correct route table and specificity
List matching destination prefixes in the actual intended context and select the most specific under the declared routing model. A default route is not necessarily used when an accidental more-specific route matches. Keep the next-hop address separate from the final destination and verify the planned recursion or local adjacency. Review both the destination subset and source selection affected by a route change. Counting installed routes or seeing a default entry is insufficient. The fixture below checks the simple longest-prefix rule only; real policy, metrics, and equal-cost selection need their own evidence.
from ipaddress import ip_network, ip_address
routes = [('0.0.0.0/0', 'gateway-a'), ('198.51.100.0/24', 'gateway-b')]
destination = ip_address('198.51.100.80')
choices = [(ip_network(prefix), hop) for prefix, hop in routes if destination in ip_network(prefix)]
print(max(choices, key=lambda item: item[0].prefixlen)[1])
gateway-b
gateway-b wins in this declared table. The label is an offline model, not a reachable device or a configuration instruction.
3. Separate local adjacency from the return direction
If routing selects a local next hop, review the intended Ethernet or IPv6 neighbor context and address mapping. Do not search for the remote server’s MAC on a routed link. Then draw the reply’s destination and route independently from the server’s point of view. Multihoming, NAT state, source-validation rules, and stateful policy can make asymmetry relevant. A request seen near the server proves only that observed forward milestone. A missing reply at the client does not by itself distinguish server behavior, return routing, filtering, or an incomplete observation.
4. Correct the demonstrated inconsistency in a plan
Prepare the smallest address or routing-plan correction on an isolated copy, including both directions and any dependent DHCP or policy inventory. Preserve the prior state and identify which destinations change behavior. Do not flush neighbor tables, replace gateways, or add broad routes as an exploratory shortcut. An apparently successful workaround can bypass segmentation or send unrelated traffic to an unintended next hop. This guide makes no network changes; it produces a specific hypothesis, expected forwarding difference, verification plan, and rollback for a later authorized operation.
Verify the fix
Check offline containment and route-choice cases at each affected boundary, then require an authorized end-to-end test of the original application in both directions. Confirm local neighbors, intended source selection, policy, and unaffected destination ranges remain correct. A successful first-hop model alone is not proof of recovered service.
Keep it from recurring
- Maintain versioned address and route inventories, run overlap and boundary checks before changes, and document next-hop ownership plus return paths. Include dual-stack and routing-domain context. Review more-specific additions by their affected traffic, and keep operational procedures from automatically widening routes or weakening segmentation.