Solved

Pinging a host that has an incorrect gateway set

Posted on 2013-12-22
7
508 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 46

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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Surfing Is Meant To Be Done Outdoors

Featuring its rugged IP67 compliant exterior and delivering broad, fast, and reliable Wi-Fi coverage, the AP322 is the ideal solution for the outdoors. Manage this AP with either a Firebox as a gateway controller, or with the Wi-Fi Cloud for an expanded set of management features

Question has a verified solution.

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

Suggested Solutions

Cybersecurity has become the buzzword of recent years and years to come. The inventions of cloud infrastructure and the Internet of Things has made us question our online safety. Let us explore how cloud- enabled cybersecurity can help us with our b…
Phishing is at the top of most security top 10 efforts you should be pursuing in 2016 and beyond. If you don't have phishing incorporated into your Security Awareness Program yet, now is the time. Phishers, and the scams they use, are only going to …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

756 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