BCBCBCBC TechnologiesPortfolio← Back to Dexter

When a Ping Lies — WireGuard vs Local Ethernet Routing

A BCBC field process, recorded November 14, 2026. Status: routing cause established; one switch question left open at the end, stated honestly.

Why this matters

A successful ping can mislead you when the same destination subnet is reachable two ways at once — advertised over a WireGuard tunnel and connected on a local Ethernet interface. The ping answers. It may be answering from somewhere else entirely. Check the actual selected route and the Layer-2 neighbor entry before you attribute connectivity to a device.

The setup: a workstation with a wired connection to a managed switch, and a WireGuard interface that also carries the management subnet. The switch's new management address would not respond locally — yet it answered ping. Both things were true. The process below is how that gets untangled, in order.

The process

Run one step at a time. Record the output. Do not change routing until you have confirmed what is currently selected.

1. List interface addresses

ip -br -4 addr

Establish what the machine actually has: the wired address and the tunnel address, side by side.

2. Find the actual outgoing interface

ip route get <mgmt-ip>

Observed: the route to the target went out the WireGuard interface, despite the wired LAN connection sitting right there. The operating system had chosen the tunnel. This one command is the whole diagnosis in embryo — everything after it is confirmation.

3. Inspect the main routing table

ip -4 route show table main

Look at prefixes, metrics, and — if anything looks off — policy routing separately with ip rule show.

4. Test reachability

ping -c 4 -W 2 <mgmt-ip>

Observed: replies, with a TTL and latency consistent with a routed path — not a local segment. A local device on the same wire answers in well under a millisecond with a TTL that says "no router between us." The numbers were already telling the story: the replies were real, and they were not coming from the switch on the desk. A ping proves reachability. It does not prove identity, and it does not prove path.

5. Test the service ports without netcat

for port in 80 443; do timeout 3 bash -c "echo > /dev/tcp/<mgmt-ip>/$port" 2>/dev/null && echo "Port $port OPEN" || echo "Port $port CLOSED or FILTERED"; done

Observed: both closed or filtered. On its own this distinguishes nothing — refusal, filtering, and a wrong path all look the same. That is the point of running it in sequence, after the route is known.

6. Temporarily force a host route over Ethernet

sudo ip route replace <mgmt-ip>/32 dev <wired-iface> src <wired-address>
ip route get <mgmt-ip>

A temporary, reversible override: pin this one destination to the wire and confirm the kernel took it. Nothing is reconfigured permanently; you are asking the machine a question.

7. Force a ping through the wired interface

ping -c 4 -W 2 -I <wired-iface> <mgmt-ip>

Observed: "Destination Host Unreachable," 100% loss. Forced onto the wire, the target simply was not there. Direct Layer-2 reachability was never established — the earlier replies had been the tunnel all along.

8. Check ARP / neighbor resolution

ip neigh show <mgmt-ip> dev <wired-iface>

Observed: FAILED. The workstation was asking "who has this address?" on the local wire and getting no answer — while the Ethernet link itself forwarded other traffic normally. A device can pass traffic all day and still not be the device answering your ping.

9. Factory-subnet recovery (only when needed)

sudo ip addr add <temp-address>/24 dev <wired-iface>

If a management-address change strands the switch, put the workstation temporarily into the switch's factory-default subnet and use the factory address from the vendor's documentation. After a restart, the factory web interface answered. One temporary address is enough — adding a second one during testing only muddies the next diagnosis.

What the switch taught us

Clean up after yourself

Verify the active addresses and routes first, then remove only the temporary entries the session created:

sudo ip route del <mgmt-ip>/32 dev <wired-iface>
sudo ip addr del <temp-address>/24 dev <wired-iface>

Do not run cleanup blindly — if an address or route has since been repurposed, deleting it breaks the thing you just fixed. Temporary ip changes normally do not survive a reboot in any case.

Open questions, left open on purpose

The BCBC principle: Identify the path, verify the endpoint, then change configuration. A ping is evidence of reachability, not proof of physical path or device identity.