LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 07-20-2005, 01:29 AM   #1
rpkosuri
LQ Newbie
 
Registered: Dec 2003
Posts: 9

Rep: Reputation: 0
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
 
Old 07-21-2005, 02:35 AM   #2
ilnli
Member
 
Registered: Jul 2004
Location: Pakistan
Distribution: Slackware 10.0, SUSE 9.1, RH 7, 7.3, 8, 9, FC2
Posts: 413

Rep: Reputation: 32
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

Last edited by ilnli; 07-21-2005 at 02:42 AM.
 
Old 07-21-2005, 11:24 AM   #3
broch
Member
 
Registered: Feb 2005
Distribution: Arch current, SuSe 10.1 32-bit, FreeBSD current, OpenBSD 4.0
Posts: 453

Rep: Reputation: 30
no, I have three NICs all works, it might be your router. Same config (three NICs) works with one router but not with another.
 
Old 07-21-2005, 06:52 PM   #4
Walman
Member
 
Registered: Jun 2004
Location: Venezuela
Distribution: RHEL ,Centos,Debian,Slax , Solaris
Posts: 94

Rep: Reputation: 15
U cannot have 2 interfaces with the same IP address . Try reconfiguring one of the interfaces , say ,eth1 with a different IP
 
Old 06-17-2008, 12:33 AM   #5
comandante
LQ Newbie
 
Registered: Jun 2008
Posts: 2

Rep: Reputation: 0
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.

Last edited by comandante; 06-17-2008 at 12:41 AM.
 
Old 06-17-2008, 12:38 AM   #6
comandante
LQ Newbie
 
Registered: Jun 2008
Posts: 2

Rep: Reputation: 0
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.

Last edited by comandante; 06-17-2008 at 12:41 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
destination host unreachable javpra Linux - Networking 1 03-30-2005 06:44 AM
Destination Host Unreachable danka Linux - Networking 8 01-01-2005 06:29 PM
destination host unreachable Santanu1963 Linux - Networking 7 03-09-2004 03:24 PM
Destination Host Unreachable thanos35 Linux - General 4 01-06-2003 07:48 AM
destination host unreachable!!! katana Linux - General 7 07-20-2001 02:25 AM


All times are GMT -5. The time now is 12:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration