Discussion:
[lfs-support] Ping error: Destination Host Unreachable
Dave Wagler
2013-07-14 14:25:31 UTC
Permalink
I have a brand new LFS 7.3 system that boots with no errors that I know
about. When I ping any IP address outside the LAN I get a 'Destination Host
Unreachable' error. I have an AT&T Uverse modem that connects me to the
internet. There is a TP-Link modem wired (ethernet) to the Uverse modem.
The TP-Link modem is the LAN controller (because it has faster wireless).
These IP addresses are from the TP-Link modem:

- LAN IP: 192.168.0.1
- WAN IP: 99.59.207.33
- Gateway: 99.59.204.1

A ping to the LAN IP and another computer on the LAN will work. This is a
sample of the error received when pinging any IP address outside the LAN:

PING 99.59.207.33 (99.59.207.33): 48 data bytes
60 bytes from 192.168.0.1: Destination Host Unreachable
Vr HL TOS Len ID Flg off TTL Pro cks Src Dst Data
4 5 00 4c00 0000 0 0040 40 01 ab47 192.168.0.1 99.59.207.33
--- 99.59.207.33 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss

The computer with LFS 7.3 is wired to the TP_Link modem. It is multi-boot
with these bootable distros, all of which can connect to the internet:

- Linux Mint 13 Mate
- Linux Mint 14 Mate
- Linux Mint 15 Mate
- Ubuntu 1304
- Kubuntu 1304
- Korora 18 KDE
$ ifconfig
eth0 Link encap:Ethernet HWaddr c8:60:00:98:fb:6e
inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::ca60:ff:fe98:fb6e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3769 errors:0 dropped:0 overruns:0 frame:0
TX packets:2765 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2425278 (2.4 MB) TX bytes:851595 (851.5 KB)

$ lspci -k
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B
PCI Express Gigabit Ethernet controller (rev 09)
Subsystem: ASUSTeK Computer Inc. Device 8505
Kernel driver in use: r8169
Kernel modules: r8169

$ ip route list
default via 192.168.0.1 dev eth0 proto static
169.254.0.0/16 dev eth0 scope link metric 1000
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.100
metric 1

The LFS network configuration files I know about are:

1. /etc/udev/rules.d/70-persistent-net.rules

# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# net device r8169
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="c8:60:00:98:fb:6e",
ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

2. /etc/sysconfig/ifconfig.eth0

ONBOOT=yes
IFACE=eth0
SERVICE=ipv4-static
IP=192.168.0.1
GATEWAY=192.168.0.100
PREFIX=24
BROADCAST=192.168.0.255

3. /etc/resolv.conf

# Begin /etc/resolv.conf
#domain <Your Domain Name>
nameserver 127.0.1.1
# These are the TP-Link WAN DNS Server addresses
nameserver 68.94.156.1
nameserver 68.94.157.1
# OpenDNS Fallback (from Linux Mint 14)
nameserver 208.67.222.222
nameserver 208.67.220.220
# Google Public IPv4 DNS addresses
#nameserver 8.8.8.8
#nameserver 8.8.4.4
# End /etc/resolv.conf
Help?

LFS 7.3 was built on the Mint 14 host, with no deviations.

$ version-check.sh
bash, version 4.2.37(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils for Ubuntu) 2.22.90.20120924
bison (GNU Bison) 2.5
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2, Version 1.0.6, 6-Sept-2010.
Coreutils: 8.13
diff (GNU diffutils) 3.2
find (GNU findutils) 4.4.2
GNU Awk 4.0.1
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
(Ubuntu EGLIBC 2.15-0ubuntu20.1) 2.15
grep (GNU grep) 2.12
gzip 1.5
Linux version 3.5.0-17-generic (buildd at allspice) (gcc version 4.7.2
(Ubuntu/Linaro 4.7.2-2ubuntu1) ) #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012
m4 (GNU M4) 1.4.16
GNU Make 3.81
patch 2.6.1
Perl version='5.14.2';
GNU sed version 4.2.1
tar (GNU tar) 1.26
Texinfo: makeinfo (GNU texinfo) 4.13
xz (XZ Utils) 5.1.0alpha
gcc compilation OK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20130714/559bb096/attachment.html>
Ken Moffat
2013-07-14 15:50:02 UTC
Permalink
On Sun, Jul 14, 2013 at 09:25:31AM -0500, Dave Wagler wrote:

[ snipping most of what you wrote, I'm overwhelmed by the amount of
detail and I don't immediately see the correct solution. But the
following is where the problem lies: ]
Post by Dave Wagler
2. /etc/sysconfig/ifconfig.eth0
ONBOOT=yes
IFACE=eth0
SERVICE=ipv4-static
IP=192.168.0.1
GATEWAY=192.168.0.100
^^^^
Post by Dave Wagler
PREFIX=24
BROADCAST=192.168.0.255
I'm not familiar-enough with the other distros you mentioned to
tell you where to look in them for the gateway, but it seems that
192.168.0.100 is either not the correct address (it's on your lan,
but perhaps it isn't the gateway), or else it is indeed the gateway
but something in its config is not letting your new system pass
through.

If I read your post correctly, the TP-Link modem sounds as if it
should be the gateway (i.e. it is what stands between your LAN on
192.168.0 and everywhere else, including your other modem).

The only config issue that springs to mind is that (perhaps) you
set a static IP, but the TP-link modem maybe assigned that to a
different machine.

If 192.168.0.100 is the TP-Link modem, I suggest that first you
connect to it and look at its logs or whatever else it offers, to
see if your LFS machine showed up. Also, you could try running one
of the other distros. In the old way, 'route -n' should show you
the gateway (for 0.0.0.0), on the new way (like in lfs), 'ip route
show' should show it in the "default via" line.

?en
--
das eine Mal als Trag?die, das andere Mal als Farce
Bruce Dubbs
2013-07-14 17:07:14 UTC
Permalink
Post by Dave Wagler
$ ip route list
default via 192.168.0.1 dev eth0 proto static
2. /etc/sysconfig/ifconfig.eth0
ONBOOT=yes
IFACE=eth0
SERVICE=ipv4-static
IP=192.168.0.1
GATEWAY=192.168.0.100
You have a few extra zeros here. Try GATEWAY=192.168.0.1 to be
consistent with the Mint configuration. This is evidently what your
router has. Change IP=192.168.0.1 to 192.168.0.100 also.

Then 'ifdown eth0' followed by 'ifup eth0' should get you going.

-- Bruce
Dave Wagler
2013-07-14 18:40:37 UTC
Permalink
@Bruce, @Ken: Thanks for the replies. Swapping the IP and GATEWAY addresses
fixed the problem. And that's the final bug in my build. I'm now ready for
BLFS.

Dave
Post by Bruce Dubbs
Post by Dave Wagler
$ ip route list
default via 192.168.0.1 dev eth0 proto static
2. /etc/sysconfig/ifconfig.eth0
ONBOOT=yes
IFACE=eth0
SERVICE=ipv4-static
IP=192.168.0.1
GATEWAY=192.168.0.100
You have a few extra zeros here. Try GATEWAY=192.168.0.1 to be
consistent with the Mint configuration. This is evidently what your
router has. Change IP=192.168.0.1 to 192.168.0.100 also.
Then 'ifdown eth0' followed by 'ifup eth0' should get you going.
-- Bruce
--
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20130714/5dabbb61/attachment.html>
Loading...