Wrong subnet mask: hosts can't reach each other Networking Origin: Network OSI layer 3 · Network Last updated 5 Nov 2026

Networking: Two hosts on one LAN can't talk — subnet mask or network address mismatch

The hosts disagree about which addresses are local, so one tries to route traffic that should go straight across the LAN.

Exact message you may see Subnet mask mismatchwrong subnet maskHosts on the same network cannot ping each otherGateway is not on the same subnetSIOCADDRT: Network is unreachable
Seen on: Linux Windows Networking

Meaning

With 192.168.1.10/24 and 192.168.1.200/25 they compute different local networks. Use the same mask on every host, check DHCP-provided masks, and compare with ip addr / ipconfig. A /16 on one side and /24 on the other often causes one-way connectivity.

Common causes

  • Manually entered wrong mask
  • Different DHCP scopes on one segment
  • Overlapping subnets (/24 vs /25)
  • Gateway outside the host's subnet
  • Typo in the third octet

⚡ Quick fix

  1. Compare ip -4 addr / ipconfig on both hosts
  2. Use one consistent mask and gateway in the subnet
  3. Check the DHCP scope options

Detailed fix by platform

Linux

  1. ip -4 addr show eth0; ip route; ipcalc 192.168.1.200/25

How to diagnose

  1. Mask — Same on both?
  2. Gateway — Inside subnet?
  3. DHCP — One scope?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Network. Errors that are often confused with or caused by this one (click to open):

169.254.x.x self-assigned IP (DHCP failed) — Networking: IPv4 address 169.254.x.x (Autoconfiguration / APIPA) — the PC couldn't get an address from DHCP (Networking)169.254.x.x self-assi…arp -a shows (incomplete) — Networking: `arp -n` shows (incomplete) / Destination Host Unreachable — no ARP reply from the next hop (Networking)arp -a shows (incompl…Network is unreachable — connect: Network is unreachable (ENETUNREACH) (Linux)Network is unreachableReply from 192.168.1.1: Destination host unreachable — Networking: ping — Destination Host Unreachable / Destination net unreachable (ICMP type 3) (Networking)Reply from 192.168.1.…VPN connected but internal subnets unreachable — Networking: VPN is connected but I can't reach the internal network — missing routes, split tunnel or overlapping subnets (Networking)VPN connected but int…Windows has detected an IP address conflict — Networking: Windows has detected an IP address conflict / Duplicate address detected by 00:aa:bb:cc:dd:ee (Networking)Windows has detected …Windows: Default gateway is not available — Networking: Windows: Default gateway is not available / Diagnose Connection Problems: DHCP not enabled (Networking)Windows: Default gate…Wrong sub…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.