Avatar of mikhael
mikhael
Flag for Australia asked on

Pinging a host that has an incorrect gateway set

If I ping a host in a different subnet – separated by a router – and the destination host has an incorrect or missing default gateway set, will my ping succeed? What about a TCP connection like telnet or RDP? Is Linux behaviour here different to Windows?
Assumptions: my settings are correct, correct IP, GW, SM. The routers settings are correct. On the destination host, the IP and SM are correct; just the GW is wrong or missing.
Thanks in advance
Michael
Linux NetworkingWindows NetworkingNetwork Security

Avatar of undefined
Last Comment
mikhael

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Craig Beck

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Qlemo

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
gheist

You must use other machine in same subnet (physical and logical) as bad machine and reconfigure it.
mikhael

ASKER
Thanks guys, that's what I thought - or rather what I've read. My question is kinda hypothetical. Years ago, I believed it would work, because I had experienced it working. Maybe it was Proxy-ARP or some sort of caching.
But I thought TCP being a "connection" protocol (as distinct to UDP, say) maybe establishes the connection and the reply "knows" the path back?
Qlemo

Explained in http:a39735174 - the reply only knows the target, not the way. The path taken is not recorded in the packet, and that would be a prerequisite.

Recently we had network integrated devices (based on RTOS) with a incomplete implementation of the TCP/IP stack. That led to ignoring the subnet mask, and just blowing out all traffic back as if it were on the same network, no matter of IP addresses.
So, if the TCP/IP stack implementation is buggy, it might work without gateway, but only if no routing is needed. That is, two IP networks on the same physical network.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
ChiefIT

It worked because of a fixed route or a cached route in Arpcache.
mikhael

ASKER
thanks all.
I appreciate it
Michael