Solved

Pinging a host that has an incorrect gateway set

Posted on 2013-12-22
7
487 Views
Last Modified: 2013-12-29
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
0
Comment
Question by:mikhael
7 Comments
 
LVL 45

Accepted Solution

by:
Craig Beck earned 125 total points
ID: 39735161
No it won't work usually.  The PC in the other subnet won't know where to send the reply as it doesn't have the correct gateway.

If the other PC uses a different router address to the one the sending PC uses, it may have some success if routing is configured to redirect the other PC to the correct gateway.

However, if your network uses Proxy-ARP the PC with no gateway (not the wrong gateway) may be able to reply correctly.  If the gateway is set wrong it will fail unless routing is redirecting as I explained in the previous paragraph.
0
 
LVL 69

Assisted Solution

by:Qlemo
Qlemo earned 125 total points
ID: 39735174
Agree. The application protocol does not matter, that is telnet or RDP will be treated the same, and ICMP isn't different, though it is a different network layer.

Everything IP-based needs to know the route back to the source, as TCP/IP is defined as not requiring replies to travel the same way back they came in. If it were that way, every hop on the way would have to temporarily store the session info to allow that. Or packets would have to store the complete route they used. Both would require a lot of overhead, either in the packets or routers' memory, without any particular advantage.

The only way the setup with a "wrong" gateway works is if the "wrong" gateway still has sufficient forwarding info to direct the packet to another router which the proper info.
0
 
LVL 62

Expert Comment

by:gheist
ID: 39737123
You must use other machine in same subnet (physical and logical) as bad machine and reconfigure it.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:mikhael
ID: 39737339
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?
0
 
LVL 69

Expert Comment

by:Qlemo
ID: 39737771
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.
0
 
LVL 38

Expert Comment

by:ChiefIT
ID: 39745629
It worked because of a fixed route or a cached route in Arpcache.
0
 

Author Closing Comment

by:mikhael
ID: 39745645
thanks all.
I appreciate it
Michael
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
What are the Scan to network folder ports? 7 86
RRAS AND DNS 15 46
ifconfig 4 46
Windows Folder Permissions 9 47
I'm a big fan of Windows' offline folder caching and have used it on my laptops for over a decade.  One thing I don't like about it, however, is how difficult Microsoft has made it for the cache to be moved out of the Windows folder.  Here's how to …
Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question