LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Ping error "Destination Host Unreachable" from the gateway (http://www.linuxquestions.org/questions/linux-networking-3/ping-error-destination-host-unreachable-from-the-gateway-423846/)

cristi_ro 03-11-2006 11:53 AM

Ping error "Destination Host Unreachable" from the gateway
 
Hello all !

I'm having the following problem:
I have a Fedora Core with 2 network cars:

-> eth0 = connected to the Internet with INET_IP = xx.xx.xx.99 netmask=255.255.255.248

-> eth1 = connected to internal LAN with LAN_IP

Conection with the internal LAN works great !

The problem is that conection with the internet gateway does not work... ip is GW_IP = xx.xx.xx.97 !

If use "arp " => for the internet connection says <incomplete> !!!

Please see below some configuration and results to some commands:


[root@xxxxx root]# ifconfig -a
eth0 Link encap:Ethernet HWaddr xxxx
inet addr: ..INET_IP.. Bcast:xxxx Mask:xxxx
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:845 errors:0 dropped:0 overruns:0 frame:0
TX packets:51 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:50700 (49.5 Kb) TX bytes:2142 (2.0 Kb)
Interrupt:9 Base address:0xe400

eth1 Link encap:Ethernet HWaddr xxxx
inet addr:LAN_IP Bcast:XXXX Mask:XXXX
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1684 errors:0 dropped:0 overruns:0 frame:0
TX packets:9984 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:166352 (162.4 Kb) TX bytes:648411 (633.2 Kb)
Interrupt:12 Base address:0xe000

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:50 errors:0 dropped:0 overruns:0 frame:0
TX packets:50 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4923 (4.8 Kb) TX bytes:4923 (4.8 Kb)
------------------------------------------------------------------

[root@xxxx root]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
INET_NETADDR * xxxxx U 0 0 0 eth0
LAN_NETADDR * xxxxx U 0 0 0 eth1
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default * 0.0.0.0 U 0 0 0 eth0
------------------------------------------------------------------

[root@xxxx root]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
INET_IP_NETADDR 0.0.0.0 xxxxx U 0 0 0 eth0
LAN_NETADDR 0.0.0.0 xxxxx 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 0.0.0.0 0.0.0.0 U 0 0 0 eth0
-------------------------------------------------------------------

[root@xxxxx root]# ping IP_GATEWAY
PING IP_GATEWAY (IP_GATEWAY) 56(84) bytes of data.
From INET_IP icmp_seq=0 Destination Host Unreachable
From INET_IP icmp_seq=1 Destination Host Unreachable
From INET_IP icmp_seq=2 Destination Host Unreachable

--- IP_GATEWAY ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3020ms
, pipe 4
---------------------------------------------------------------------

[root@xxxxx root]# ping IP_DNS
PING IP_DNS (IP_DNS) 56(84) bytes of data.
From INET_IP icmp_seq=0 Destination Host Unreachable
From INET_IP icmp_seq=1 Destination Host Unreachable
From INET_IP icmp_seq=2 Destination Host Unreachable

--- IP_DNS ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3023ms
, pipe 4
---------------------------------------------------------------------

==============================================================================

[root@xxxx root]# route add default gw xx.xx.xx.97

[root@xxxx root]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
xx.xx.xx.96 * 255.255.255.248 U 0 0 0 eth0
LAN_NET_ADDR * 255.255.255.0 U 0 0 0 eth1
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default xx.xx.xx.97 0.0.0.0 UG 0 0 0 eth0
----------------------------------------------------

[root@xxxx root]# ping xx.xx.xx.97
PING xx.xx.xx.97 (xx.xx.xx.97) 56(84) bytes of data.
From xx.xx.xx.99 icmp_seq=0 Destination Host Unreachable
From xx.xx.xx.99 icmp_seq=1 Destination Host Unreachable
From xx.xx.xx.99 icmp_seq=2 Destination Host Unreachable

--- xx.xx.xx.97 ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3024ms
, pipe 4
----------------------------------
[root@xxxx root]# arp -a
? (LAN_IP) at LAN_MAC [ether] on eth1
? (xx.xx.xx.97) at <incomplete> on eth0

================================================

[root@xxxx root]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
xx.xx.xx.96 0.0.0.0 255.255.255.248 U 0 0 0 eth0
LAN_IP 0.0.0.0 255.255.255.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 xx.xx.xx.97 0.0.0.0 UG 1 0 0 eth0
---------------------------------------------

[root@xxxx root]# ping xx.xx.xx.97
PING xx.xx.xx.97 (xx.xx.xx.97) 56(84) bytes of data.
From xx.xx.xx.99 icmp_seq=0 Destination Host Unreachable
From xx.xx.xx.99 icmp_seq=1 Destination Host Unreachable
From xx.xx.xx.99 icmp_seq=2 Destination Host Unreachable
^C
--- xx.xx.xx.97 ping statistics ---
6 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4999ms
, pipe 4
------------------------------------------------

[root@xxxx root]# mii-tool
eth0: no autonegotiation, 10baseT-HD, link ok
eth1: negotiated 100baseTx-FD, link ok
------------------------------------------------
[root@xxxx root]# mii-tool -F 100baseTx-FD eth0
[root@xxxx root]# mii-tool
eth0: 100 Mbit, full duplex, no link
eth1: negotiated 100baseTx-FD, link ok
-----------------------------------------------
[root@xxxx root]# mii-tool -F 10baseT-HD eth0
[root@xxxx root]# mii-tool
eth0: 10 Mbit, half duplex, link ok
eth1: negotiated 100baseTx-FD, link ok
----------------------------------------------
[root@xxxx root]# ping xx.xx.xx.97
PING xx.xx.xx.97 (xx.xx.xx.97) 56(84) bytes of data.
From xx.xx.xx.99 icmp_seq=0 Destination Host Unreachable
From xx.xx.xx.99 icmp_seq=1 Destination Host Unreachable
-------------------------------------------------------

acid_kewpie 03-11-2006 01:04 PM

man that's annoyingly hard to read with all that pointless censorship.. who cares what your hostname and internal ip is?? since when was a subnet mask classified information? :confused:

where are you getting this internet address from? it doesn't look like it's DHCP as you've no default gateway set on the route output. if it is dhcp then by definition your intenet gateway must be reachable as that's what gave you the IP lease.

Solo_iayc 10-30-2006 04:10 PM

Well, kewpie...what you say is logical and I've always thought it was true until recently.
I've installed a few systems (Vector Linux SOHO 5.1, Debian, Mandriva Discovery 2006) and they all seem to have the same problem (apart from the user-me of course).
I use DHCP. The system goes up. It asks the server for the settings, it receives it and configures ok but then there's no net, and I can't even ping dhcp server. What am I doing wrong?

P.S. The net card works fine. I installed Slackware 11 for a moment and after kernel recompiling (DHCP support compiled into the kernel) all worked ok, internet available etc.

Here are some outputs:

#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:A1:B0:00:xx:xx
inet addr:192.168.42.54 Bcast:192.168.42.255 Mask:255.255.255.0
inet6 addr: fe80::2a1:b0ff:fe00:xxxx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11 errors:0 dropped:0 overruns:0 frame:0
TX packets:781 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1703 (1.6 KiB) TX bytes:47802 (46.6 KiB)
Interrupt:9 Base address:0x4000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:774 errors:0 dropped:0 overruns:0 frame:0
TX packets:774 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:43272 (42.2 KiB) TX bytes:43272 (42.2 KiB)

sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

#route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.42.0 * 255.255.255.0 U 10 0 0 eth0
default 192.168.42.15 0.0.0.0 UG 10 0 0 eth0

#mii-tool
eth0: negotiated 100baseTx-FD, link ok

#ping 192.168.42.15

PING 192.168.42.15 (192.168.42.15) 56(84) bytes of data.
From 192.168.42.54 icmp_seq=2 Destination Host Unreachable
From 192.168.42.54 icmp_seq=3 Destination Host Unreachable
From 192.168.42.54 icmp_seq=4 Destination Host Unreachable
From 192.168.42.54 icmp_seq=6 Destination Host Unreachable
From 192.168.42.54 icmp_seq=7 Destination Host Unreachable
From 192.168.42.54 icmp_seq=8 Destination Host Unreachable

--- 192.168.42.15 ping statistics ---
9 packets transmitted, 0 received, +6 errors, 100% packet loss, time 8000ms
, pipe 3

acid_kewpie 10-30-2006 04:21 PM

ok, it's possible that the server is dropping ping requests, i think that would make a host unreachable scenario according to the ICMP RFC definitions. but if that is the case then you'd still have avalid arp table entry, so run "arp" and see if it shows it there. if it does then that is talking to you at some level.

Solo_iayc 10-30-2006 04:32 PM

it came up empty. It executed but a command line was next.

And it won't ping any other hosts in the network (except for the lo and localhost). All the other machines (not too many of them) and the Slackware I mentioned had no problems with dropped pings.

Would the internet be available even if the server was dropping ping requests?


All times are GMT -5. The time now is 08:54 AM.