Destination HOST Unreachable - cannot ping gateway
I have my Linux box with integrated NIC (eth1) connected via router to the public network. Able to ping itself but not able to ping the gateway of the router:
[root@linux2 root]# ping 192.168.15.1 PING 192.168.15.1 (192.168.15.1) 56(84) bytes of data. From 192.168.15.7 icmp_seq=1 Destination Host Unreachable From 192.168.15.7 icmp_seq=2 Destination Host Unreachable From 192.168.15.7 icmp_seq=3 Destination Host Unreachable Some of the relevant information : [root@linux2 root]# ifconfig eth1 Link encap:Ethernet HWaddr 00:13:20:3F:02:B1 inet addr:192.168.15.7 Bcast:192.168.15.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:64 errors:0 dropped:0 overruns:0 frame:0 TX packets:61 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:2562 (2.5 Kb) Interrupt:23 Base address:0xd840 Memory:dfaff000-dfaff038 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:727 errors:0 dropped:0 overruns:0 frame:0 TX packets:727 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:52749 (51.5 Kb) TX bytes:52749 (51.5 Kb) [root@linux2 rc.d]# cat /etc/resolv.conf nameserver 68.87.64.196 nameserver 68.87.66.196 [root@linux2 root]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 192.168.15.1 0.0.0.0 UG 0 0 0 eth1 An external card (eth0) in the PCI slot is working fine. When connected to the router from eth0 instead of eth1, by giving the same Static IP Address(192.168.15.7), I am able to ping the outside world. The ifconfig details for the eth0 NIC as follows: [root@linux2 root]# ifconfig eth0 Link encap:Ethernet HWaddr 00:12:17:4E:A3:29 inet addr:192.168.15.7 Bcast:192.168.15.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:28 errors:0 dropped:0 overruns:0 frame:0 TX packets:35 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3148 (3.0 Kb) TX bytes:2756 (2.6 Kb) Interrupt:16 Base address:0xb400 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:1717 errors:0 dropped:0 overruns:0 frame:0 TX packets:1717 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:125854 (122.9 Kb) TX bytes:125854 (122.9 Kb) ----------------------------------------------------------------------------------------- Please help! Thanks, RPKosuri |
unplug the external card and then try pinging the gateway there might be a reason that in linux if you give two NIC's the ip of same network then one works at a time because of terminology called arp-flux.
http://www.linuxquestions.org/questi...hreadid=344652 |
no, I have three NICs all works, it might be your router. Same config (three NICs) works with one router but not with another.
|
U cannot have 2 interfaces with the same IP address . Try reconfiguring one of the interfaces , say ,eth1 with a different IP
|
It is even 'worse'.
I had eth0 as onboard ethernet card in my laptop and wlan0 as the wireless connection. I was using cable connection on eth0 and it went fine, for a while. Then I enabled wlan0 AFTER disconnecting my eth0, and days have passed and many reboots later I tried to smbclient to a Win machine on my private LAN and it was telling me that Destination Host Unreachable annoying message. 'Annoying', so to speak, the ping was not working as well and as I pinged my network's 192.168.127.100 machine the inexistent 192.168.127.102 replied to me with the same message that you reported. The only difference is that your response is from your own IP and mine well, not since my laptop is 103 but I'll unveil the remaining below: Same with the gateway, but that ficticious 102 machine was speaking endlessly. Even to IP's of external websites (using the IP, not the Domain Name of the external website which worked, but the IP which didn't) the same behaviour took place. Then I read this post and very strangely I just happened to go seeing with ifconfig like you did and I saw that eth0, without any cable had it's IP (damned be:) 192.168.127.102!!!!!!! Then I immediately did sudo ifdown eth0 and pinged through my wireless connection, now certainly the unique one enabled. And YES! The annonying behaviour is gone and the machine 100 replied well with its 192.168.127.100 address and samba now is up :-) Conclusion: Never leave an 'up' connection without the cable. If it is unplugged make sure you ifdown <iface> the <iface> that hasn't any cable attached to it as the internal Linux routing may go nuts lol It worked for me, I hope it works for you. It could be what broch told too, if you want to have 2 interfaces plugged, not all routers might support this. But it is not likely, since an interface is handled independently by your (external) router. I think it has to do with internal Linux routing and the way you forget or not to activate/deactivate via software the interfaces etc. accordingly to the hardware status (is the cable connected?). I think all things must be conformant. E.g.: If there is not a cable plugged to the interface it MUST >>NOT<< be 'up' otherwise something might happen like the one that I experienced. |
Notice that as I was developing my reply, in its
early momment I said: "The only difference is that your response is from your own IP and mine well, not since my laptop is 103 but I'll unveil the remaining below:" As you can see, it turns out that yes the IP was from an interface in MY own linux box too hence the similarity with your case. "The only difference is that your response is from your own IP and mine well, >>not<<" This was the 'not' which is in fact, yes, because, again, the 102 ficticious IP turned out to be from my own machine. In your case it is a conflict with same IP 192.168.15.7 inside your machine whereas mine is 192.168.127.102 vs 192.168.127.103 conflict, again, inside the same machine. A conflict which is given between two network interfaces in the same machine and perhaps the linux routing config not being set up to handle this properly, which in turn results into the arise of this disturbing behaviour. |
All times are GMT -5. The time now is 01:06 PM. |