LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 11-21-2012, 03:23 PM   #1
Wyresider
LQ Newbie
 
Registered: Aug 2011
Posts: 15

Rep: Reputation: Disabled
Destination Host Unreachable


I'll quickly run through my network (in)experience up to the present problem so that you have a rough idea of my low level of knowledge and understanding (there are a lot of posts where I don't even understand the questions, never mind the answers).

My only encounters with ethernet began with Slackware 10 and a PCI ethernet card. Nothing happened. Many gurus gave much complicated help, none worked until I was told to change USE_DHCP[0]="" to USE_DHCP[0]="yes" and that did the trick. Next was when I got a new motherboard, with on-board ethernet (same discs). Slackware 10.0 still worked with no changes at all. Then I installed Slackware 12.2 and it worked when I finally remembered to make the same change.

I now have a new machine. M$oft windows can connect to my modems (the one from the old machine and the BT router/modem that I plan to use now I have two machines). Slackware 12.2 (copied from the old machine rather than re-installed) didn't connect.

The first problem ...
ping 192.168.1.1 (old modem)
ping 192.168.1.254 (new router, IPA copied from windows)
both gave
Network unreachable
Looking in dmesg output for "eth" gave:
r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
r8169 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
r8169 0000:03:00.0: setting latency timer to 64
r8169 0000:03:00.0: unknown MAC (4b000d00)
r8169 0000:03:00.0: no MSI. Back to INTx.
eth0: RTL8169 at 0xf883c000, 30:85:a9:eb:72:a5, XID 48000800 IRQ 17
then later:
udev: renamed network interface eth0 to eth1
and later still:
r8169: eth1: link down
The following also appeared late on the boot screen but NOT in dmesg:
Polling for DHCP server on interface eth1:
Broadcasting DHCP_DISCOVER
timed out waiting for a valid DHCP server response
I tried booting with
USE_DHCP[1]="yes"
and that didn't work except that when I tried
ifconfig eth1 up
route add -host 192.168.1.xxx eth1
route add default gw 192.168.1.xxx eth1
(I don't actually understand that last lot, but it worked with eth0 on my old machine if I lost connection for any reason) the ethernet came alive and ping now gave
From 127.0.0.1 ... Destination Host Unreachable
From what I've been reading, I guess the failure to ping the modem was caused by the DHCP timeout, and that that was caused by the "eth1 down",
and eth0 being rename eth1 may have somthing to do with it, but what it's all about is beyond me. And why was eth0 renamed? Help!
 
Old 11-21-2012, 04:49 PM   #2
PierreB.
Member
 
Registered: Apr 2012
Location: Grenoble
Distribution: Rhel[456],CentOS[56],fedora18
Posts: 33

Rep: Reputation: Disabled
Hi Wyresider,

First of all, this should not be a very complicated issue to fix, but as you described your network knowledge as "low" we will need to take time and take everything step by step.

So let's start by the beginning :

Would you please post the output of a bare
Code:
ifconfig
command (as root), this should give us the actual state of your network connection (if any). Based on this output we will be able to choose the best way to to fix your connection.

It is quite late here in France, so i cannot ensure you that i will check your answer until 9ish hours from now, but i am sure a lot of high skilled netadmin will be kind with you !
 
Old 11-21-2012, 05:32 PM   #3
Wyresider
LQ Newbie
 
Registered: Aug 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
Thank you for the quick reply, Pierre.

The output from ifconfig on the new computer (ported to this online one on a flash stick) was:

1) as booted:
Code:
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: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)
2) After "ifconfig eth1 up"
Code:
eth1      Link encap:Ethernet  HWaddr 30:85:a9:eb:72:a5  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:5 errors:0 dropped:5 overruns:0 frame:5
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:300 (300.0 B)  TX bytes:0 (0.0 B)
          Interrupt:17 Base address:0xc000 

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: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)
(Incidentally,"ifconfig eth0 up" gave the message: "no such device".)
 
Old 11-22-2012, 02:08 AM   #4
PierreB.
Member
 
Registered: Apr 2012
Location: Grenoble
Distribution: Rhel[456],CentOS[56],fedora18
Posts: 33

Rep: Reputation: Disabled
Ok, so we can now say :

1- You do have a correctly detected network card
2- You do NOT have any valid IP address on this network interface / card
3-On a freshly booted system, your eth1 is not up : This surely means that the interface is not configured to automatically start-up at boot.

I really don't know why your eth0 has been renamed to eth1... we'll check that later (i am quite sure it is because you copied the network config from your other slackware).


Next step is for you to post the content of the interface configuration file :
Code:
/etc/rc.d/rc.inet1.conf
Oh and please post the content of your other (working) *nux box, we can get useful info from this other one.

Please keep in mind that i never owned any slackware, so i should be wrong when it comes to configuration files and that kind of stuff.

Last edited by PierreB.; 11-22-2012 at 02:09 AM.
 
Old 11-22-2012, 04:29 AM   #5
Wyresider
LQ Newbie
 
Registered: Aug 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
The rc.inet1.conf file in the OLD box is:
Code:
# /etc/rc.d/rc.inet1.conf
#
# This file contains the configuration settings for network interfaces.
# If USE_DHCP[interface] is set to "yes", this overrides any other settings.
# If you don't have an interface, leave the settings null ("").

# You can configure network interfaces other than eth0,eth1... by setting
# IFNAME[interface] to the interface's name. If IFNAME[interface] is unset
# or empty, it is assumed you're configuring eth<interface>.

# Several other parameters are available, the end of this file contains a
# comprehensive set of examples.

# =============================================================================

# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes" ### WGS
DHCP_HOSTNAME[0]=""

# Config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""

# Config information for eth2:
IPADDR[2]=""
NETMASK[2]=""
USE_DHCP[2]=""
DHCP_HOSTNAME[2]=""

# Config information for eth3:
IPADDR[3]=""
NETMASK[3]=""
USE_DHCP[3]=""
DHCP_HOSTNAME[3]=""

# Default gateway IP address:
GATEWAY=""

# Change this to "yes" for debugging output to stdout.  Unfortunately,
# /sbin/hotplug seems to disable stdout so you'll only see debugging output
# when rc.inet1 is called directly.
DEBUG_ETH_UP="no"

## Example config information for wlan0.  Uncomment the lines you need and fill
## in your data.  (You may not need all of these for your wireless network)
#IFNAME[4]="wlan0"
#IPADDR[4]=""
#NETMASK[4]=""
#USE_DHCP[4]="yes"
#DHCP_HOSTNAME[4]="icculus-wireless"
#DHCP_KEEPRESOLV[4]="yes"
#DHCP_KEEPNTP[4]="yes"
#DHCP_KEEPGW[4]="yes"
#DHCP_IPADDR[4]=""
#WLAN_ESSID[4]=DARKSTAR
#WLAN_MODE[4]=Managed
#WLAN_RATE[4]="54M auto"
#WLAN_CHANNEL[4]="auto"
#WLAN_KEY[4]="D5A31F54ACF0487C2D0B1C10D2"
#WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=96389dc66eaf7e6efd5b5523ae43c7925ff4df2f8b7099495192d44a774fda16"
#WLAN_WPA[4]="wpa_supplicant"
#WLAN_WPADRIVER[4]="wext"
#WLAN_WPAWAIT[4]=30

## Some examples of additional network parameters that you can use.
## Config information for wlan0:
#IFNAME[4]="wlan0"              # Use a different interface name instead of
                                # the default 'eth4'
#IFNAME[4]="eth0:1"             # Set up an IP alias.
#HWADDR[4]="00:01:23:45:67:89"  # Overrule the card's hardware MAC address
#MTU[4]=""                      # The default MTU is 1500, but you might need
                                # 1360 when you use NAT'ed IPSec traffic.
#DHCP_TIMEOUT[4]=15             # The default timeout for the DHCP client to
                                # wait for server resonse is 30 seconds, but
                                # you might want a shorter wait.
#DHCP_KEEPRESOLV[4]="yes"       # If you dont want /etc/resolv.conf overwritten
#DHCP_KEEPNTP[4]="yes"          # If you don't want ntp.conf overwritten
#DHCP_KEEPGW[4]="yes"           # If you don't want the DHCP server to change
                                # your default gateway
#DHCP_IPADDR[4]=""              # Request a specific IP address from the DHCP
                                # server
#WLAN_ESSID[4]=DARKSTAR         # An example of how you can override _any_
                                # parameter defined in rc.wireless.conf, by
                                # prepending 'WLAN_' to the parameter's name.
                                # Useful with multiple wireless interfaces.
#WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=thekey"
                                # Some drivers require a private ioctl to be
                                # set through the iwpriv command. If more than
                                # one is required, you can place them in the
                                # IWPRIV parameter (separated with the pipe (|)
                                # character, see the example).
#WLAN_WPA[4]="wpa_supplicant"   # Run wpa_supplicant for WPA support
#WLAN_WPADRIVER[4]="ndiswrapper"# Tell wpa_supplicant to specifically use the
                                # ndiswrapper driver (if you leave this empty
                                # the 'wext' driver is used by default)
#WLAN_WPAWAIT[4]=30             # In case it takes long for the WPA association
                                # to finish, you can increase the wait time
                                # (defaults to 10 seconds)
The NEW box is identical except (1) the comment after USE_DHCP[0]="yes" has changed (I have tried this with and without "yes" on the new box and it makes no difference) and (2) USE_DHCP[1]="" has been changed to USE_DHCP[0]="yes" (WGS is simply my initials against the change, to help me find changes that I have made).
The rc.inet1.conf file in the NEW box is:
Code:
# /etc/rc.d/rc.inet1.conf
#
# This file contains the configuration settings for network interfaces.
# If USE_DHCP[interface] is set to "yes", this overrides any other settings.
# If you don't have an interface, leave the settings null ("").

# You can configure network interfaces other than eth0,eth1... by setting
# IFNAME[interface] to the interface's name. If IFNAME[interface] is unset
# or empty, it is assumed you're configuring eth<interface>.

# Several other parameters are available, the end of this file contains a
# comprehensive set of examples.

# =============================================================================

# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes" ### ("yes" on old box) WGS
DHCP_HOSTNAME[0]=""

# Config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]="yes" ### (new box, 21/11/2012) WGS
DHCP_HOSTNAME[1]=""

# Config information for eth2:
IPADDR[2]=""
NETMASK[2]=""
USE_DHCP[2]=""
DHCP_HOSTNAME[2]=""

# Config information for eth3:
IPADDR[3]=""
NETMASK[3]=""
USE_DHCP[3]=""
DHCP_HOSTNAME[3]=""

# Default gateway IP address:
GATEWAY=""

# Change this to "yes" for debugging output to stdout.  Unfortunately,
# /sbin/hotplug seems to disable stdout so you'll only see debugging output
# when rc.inet1 is called directly.
DEBUG_ETH_UP="no"

## Example config information for wlan0.  Uncomment the lines you need and fill
## in your data.  (You may not need all of these for your wireless network)
#IFNAME[4]="wlan0"
#IPADDR[4]=""
#NETMASK[4]=""
#USE_DHCP[4]="yes"
#DHCP_HOSTNAME[4]="icculus-wireless"
#DHCP_KEEPRESOLV[4]="yes"
#DHCP_KEEPNTP[4]="yes"
#DHCP_KEEPGW[4]="yes"
#DHCP_IPADDR[4]=""
#WLAN_ESSID[4]=DARKSTAR
#WLAN_MODE[4]=Managed
#WLAN_RATE[4]="54M auto"
#WLAN_CHANNEL[4]="auto"
#WLAN_KEY[4]="D5A31F54ACF0487C2D0B1C10D2"
#WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=96389dc66eaf7e6efd5b5523ae43c7925ff4df2f8b7099495192d44a774fda16"
#WLAN_WPA[4]="wpa_supplicant"
#WLAN_WPADRIVER[4]="wext"
#WLAN_WPAWAIT[4]=30

## Some examples of additional network parameters that you can use.
## Config information for wlan0:
#IFNAME[4]="wlan0"              # Use a different interface name instead of
                                # the default 'eth4'
#IFNAME[4]="eth0:1"             # Set up an IP alias.
#HWADDR[4]="00:01:23:45:67:89"  # Overrule the card's hardware MAC address
#MTU[4]=""                      # The default MTU is 1500, but you might need
                                # 1360 when you use NAT'ed IPSec traffic.
#DHCP_TIMEOUT[4]=15             # The default timeout for the DHCP client to
                                # wait for server resonse is 30 seconds, but
                                # you might want a shorter wait.
#DHCP_KEEPRESOLV[4]="yes"       # If you dont want /etc/resolv.conf overwritten
#DHCP_KEEPNTP[4]="yes"          # If you don't want ntp.conf overwritten
#DHCP_KEEPGW[4]="yes"           # If you don't want the DHCP server to change
                                # your default gateway
#DHCP_IPADDR[4]=""              # Request a specific IP address from the DHCP
                                # server
#WLAN_ESSID[4]=DARKSTAR         # An example of how you can override _any_
                                # parameter defined in rc.wireless.conf, by
                                # prepending 'WLAN_' to the parameter's name.
                                # Useful with multiple wireless interfaces.
#WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=thekey"
                                # Some drivers require a private ioctl to be
                                # set through the iwpriv command. If more than
                                # one is required, you can place them in the
                                # IWPRIV parameter (separated with the pipe (|)
                                # character, see the example).
#WLAN_WPA[4]="wpa_supplicant"   # Run wpa_supplicant for WPA support
#WLAN_WPADRIVER[4]="ndiswrapper"# Tell wpa_supplicant to specifically use the
                                # ndiswrapper driver (if you leave this empty
                                # the 'wext' driver is used by default)
#WLAN_WPAWAIT[4]=30             # In case it takes long for the WPA association
                                # to finish, you can increase the wait time
                                # (defaults to 10 seconds)
You said (re eth0 being renamed eth1) "I am quite sure it is because you copied the network config from your other slackware" ... perhaps if I re-install from scratch on the new box it will work? I just assumed I could copy Slackware 12 because everything worked when I copied Slackware 10 from my previous old box to my then new (present old) one.
 
Old 11-22-2012, 04:50 AM   #6
PierreB.
Member
 
Registered: Apr 2012
Location: Grenoble
Distribution: Rhel[456],CentOS[56],fedora18
Posts: 33

Rep: Reputation: Disabled
So, let us takes advantage of this thread to give you some more / new knowledge (this is the main goal here after all)...

A small one : DHCP is a process that allows one computer (your modem, dsl box or any other well configured network connected device) to offers ip address to demanding computers. In a network context the one that offers /serves is called server (!) and the one that asks is called client. In your case, the clients are your slackware / windows computers, and your server is ?? i do not know butr it might be your dsl box.
So when you activate the DHCP (USE_DHCP[1]="yes") on your computer you don't need to do anything else, it will asks for an IP address and even more info will come shipped with this ip address.

In this case the DHCP does not seem to be working, so we are going to try a "manual" configuration, it is quick and easy, let's try to replace your current /etc/rc.d/rc.inet1.conf file by the following one :
Code:
# /etc/rc.d/rc.inet1.conf
#
# This file contains the configuration settings for network interfaces.
# If USE_DHCP[interface] is set to "yes", this overrides any other settings.
# If you don't have an interface, leave the settings null ("").

# You can configure network interfaces other than eth0,eth1... by setting
# IFNAME[interface] to the interface's name. If IFNAME[interface] is unset
# or empty, it is assumed you're configuring eth<interface>.

# Several other parameters are available, the end of this file contains a
# comprehensive set of examples.

# =============================================================================

# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes" ### ("yes" on old box) WGS
DHCP_HOSTNAME[0]=""

# Config information for eth1:
IPADDR[1]="192.168.1.33"
NETMASK[1]="255.255.255.0"
USE_DHCP[1]="no" ### (new box, 21/11/2012) WGS
DHCP_HOSTNAME[1]=""

# Config information for eth2:
IPADDR[2]=""
NETMASK[2]=""
USE_DHCP[2]=""
DHCP_HOSTNAME[2]=""

# Config information for eth3:
IPADDR[3]=""
NETMASK[3]=""
USE_DHCP[3]=""
DHCP_HOSTNAME[3]=""

# Default gateway IP address:
GATEWAY="192.168.1.254"

# Change this to "yes" for debugging output to stdout.  Unfortunately,
# /sbin/hotplug seems to disable stdout so you'll only see debugging output
# when rc.inet1 is called directly.
DEBUG_ETH_UP="no"

## Example config information for wlan0.  Uncomment the lines you need and fill
## in your data.  (You may not need all of these for your wireless network)
#IFNAME[4]="wlan0"
#IPADDR[4]=""
#NETMASK[4]=""
#USE_DHCP[4]="yes"
#DHCP_HOSTNAME[4]="icculus-wireless"
#DHCP_KEEPRESOLV[4]="yes"
#DHCP_KEEPNTP[4]="yes"
#DHCP_KEEPGW[4]="yes"
#DHCP_IPADDR[4]=""
#WLAN_ESSID[4]=DARKSTAR
#WLAN_MODE[4]=Managed
#WLAN_RATE[4]="54M auto"
#WLAN_CHANNEL[4]="auto"
#WLAN_KEY[4]="D5A31F54ACF0487C2D0B1C10D2"
#WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=96389dc66eaf7e6efd5b5523ae43c7925ff4df2f8b7099495192d44a774fda16"
#WLAN_WPA[4]="wpa_supplicant"
#WLAN_WPADRIVER[4]="wext"
#WLAN_WPAWAIT[4]=30

## Some examples of additional network parameters that you can use.
## Config information for wlan0:
#IFNAME[4]="wlan0"              # Use a different interface name instead of
                                # the default 'eth4'
#IFNAME[4]="eth0:1"             # Set up an IP alias.
#HWADDR[4]="00:01:23:45:67:89"  # Overrule the card's hardware MAC address
#MTU[4]=""                      # The default MTU is 1500, but you might need
                                # 1360 when you use NAT'ed IPSec traffic.
#DHCP_TIMEOUT[4]=15             # The default timeout for the DHCP client to
                                # wait for server resonse is 30 seconds, but
                                # you might want a shorter wait.
#DHCP_KEEPRESOLV[4]="yes"       # If you dont want /etc/resolv.conf overwritten
#DHCP_KEEPNTP[4]="yes"          # If you don't want ntp.conf overwritten
#DHCP_KEEPGW[4]="yes"           # If you don't want the DHCP server to change
                                # your default gateway
#DHCP_IPADDR[4]=""              # Request a specific IP address from the DHCP
                                # server
#WLAN_ESSID[4]=DARKSTAR         # An example of how you can override _any_
                                # parameter defined in rc.wireless.conf, by
                                # prepending 'WLAN_' to the parameter's name.
                                # Useful with multiple wireless interfaces.
#WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=thekey"
                                # Some drivers require a private ioctl to be
                                # set through the iwpriv command. If more than
                                # one is required, you can place them in the
                                # IWPRIV parameter (separated with the pipe (|)
                                # character, see the example).
#WLAN_WPA[4]="wpa_supplicant"   # Run wpa_supplicant for WPA support
#WLAN_WPADRIVER[4]="ndiswrapper"# Tell wpa_supplicant to specifically use the
                                # ndiswrapper driver (if you leave this empty
                                # the 'wext' driver is used by default)
#WLAN_WPAWAIT[4]=30             # In case it takes long for the WPA association
                                # to finish, you can increase the wait time
                                # (defaults to 10 seconds)
before anything else you MUST backup your current file by doing :
Code:
cp /etc/rc.d/rc.inet1.conf /etc/rc.d/rc.inet1.conf.BAK
Let me know if this works by posting the very same output i asked you in my first post. (ifconfig etc...)
 
Old 11-22-2012, 06:05 AM   #7
Wyresider
LQ Newbie
 
Registered: Aug 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
Apologies for the delay. I forgot to copy in the new config before I rebooted!

With the new config, eth1 stays up and the output from "ifconfig" is:
Code:
eth1      Link encap:Ethernet  HWaddr 30:85:a9:eb:72:a5  
          inet addr:192.168.1.33  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:19 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1140 (1.1 KiB)  TX bytes:0 (0.0 B)
          Interrupt:17 Base address:0xc000 

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:23 errors:0 dropped:0 overruns:0 frame:0
          TX packets:23 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2174 (2.1 KiB)  TX bytes:2174 (2.1 KiB)
Pinging 192.168.1.1 or 192.168.1.254 still fails.
 
Old 11-22-2012, 06:44 AM   #8
PierreB.
Member
 
Registered: Apr 2012
Location: Grenoble
Distribution: Rhel[456],CentOS[56],fedora18
Posts: 33

Rep: Reputation: Disabled
Can you please confirm that pinging the same 2 addresses works from another computer (windows or linux doesn't matter at all).

If yes (what i strongly suppose) we now have to check the basics. It is going to be painful (i mean not very interesting) but it MUST BE DONE.

-You should first check that the cable is plugged,
-Then you must ensure that this cable is ok (cross checking)
-Then check if there any flashing lights on your network card (usually green and or orange)
-If you are using a switch then you can check it (flashing light on the port to which you are connected, powered on(!))


If the material part is ok, then we will have to sort out why your network interface was renamed, but let's start with the current tasks.
 
Old 11-22-2012, 06:47 AM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,165
Blog Entries: 54

Rep: Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807
Having an IP address means the DHCP daemon gave you a lease. The fact you had to manually add routes as you said in your OP is a bit odd because usually asking for a lease doesn't involve asking for specifics. Checking your DHCP clients leases file (somewhere in /var) against 'ip route show' (or 'route -n') output shows you what response you got and if it stuck.
 
Old 11-22-2012, 07:59 AM   #10
Wyresider
LQ Newbie
 
Registered: Aug 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
All the connections are OK. I have connected from the new box under Windows to both my BT router-modem and my old D-Link modem and thence to the internet from either device.

(The old modem is now back on the old computer so I can be on-line. The BT device came bundled with a service upgrade ages ago had not taken out of its wrapping until yesterday. I used it now because it is also a router and will serve both computers (when I get a longer ethernet cable, which is on its way). Meantime, I'm on-line on the old kit with the D-Link and the BT router is connected to the new box but unplugged from the telephone line which is needed for the old.)

The instructions with the BT device do not give an IP address, so I had to ask that of Windows when it found the device. That's where I got 192.168.1.254. The D-Link is always 192.168.1.1. Although I've not pinged it from Windows on the new box, I did better than that -- I logged into it by typing "192.168.1.1" in the address bar of my browser, just as I do under Linux on the computer I'm on now.

On unSpawn's question, I re-booted with the original config as modified for eth1 (ie
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]="yes"
DHCP_HOSTNAME[1]=""
) and "ip route show" gave:
Code:
127.0.0.0/8 dev lo  scope link
It stayed exactly the same after I typed "ifconfig eth1 up".

The same command on this machine (the one I'm typing on) gives:
Code:
86.145.104.76 dev eth0  scope link 
127.0.0.0/8 dev lo  scope link 
default via 86.145.104.76 dev eth0  scope link
PS: I tried "ping 192.168.1.xxx" (after "ifconfig eth1 up") with every xxx from 000 to 255 and got no replies. There was a mixture of "Host Unreachable" and simple "No Reply".
 
Old 11-22-2012, 08:51 AM   #11
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,165
Blog Entries: 54

Rep: Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807
I'm sorry but I think you're unnecessarily complicating things: nowhere did I ask you to reconfigure and reboot, just checking the lease file and showing diagnostics output, and if you know the machine uses DHCP, that running 'ifconfig eth1 up' on its own "doesn't work" and that manually adding routes does work then at least you could have tried that IMHO. It appears that "this machine" (whatever designation that may be) doesn't get a local DHCP lease but uses your external IP address as if the router was in bridge mode or something. That being the case you find yourself in 86.128.0.0/11, meaning pinging the whole 192.168.1.0/24 makes no sense as you have no route into it.
 
Old 11-22-2012, 09:24 AM   #12
Wyresider
LQ Newbie
 
Registered: Aug 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
OK, looping through all the numbers was pointless, but I though I might have got the IPA wrong, and it was easy enough to do just by looping with "ping ...$X && exit" to catch any hits.

However, as I said in the first post, I did try adding the route manually, because it works on my old box (the one I'm on now) but not on the new one.

Before upping eth1, the ping response was
Code:
Network is unreachable
Just giving
Code:
ifconfig eth1 up
had no effect on the message; ping still gave
Code:
Network is unreachable
then, after giving the route manually as
Code:
route add -host 192.168.1.254 eth1
route add default gw 192.168.1.254 eth1
the message changed to
Code:
From 127.0.0.1 ... Destination Host Unreachable
I have checked the address. I booted Windows, brought up IE8, typed "192.168.1.254" into the address bar, and lo! I was in the menu page of the router-modem (with it complaining that it couldn't get to the outside world, but that was OK as the phone line had been pulled out to let the D-Link on this machine (upstairs and not enough ethernet) use the phone!).

I'm afraid I don't understand about leases and bridges and 86.128.0 (although obviously it would help if I did and some day maybe I will).
 
Old 11-22-2012, 10:14 AM   #13
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,165
Blog Entries: 54

Rep: Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807
OK, let's try one more time. Boot the machine and without doing anything else post:
Code:
cat /etc/rc.d/rc.inet1.conf
ifconfig eth1
arp -a
route -n
pgrep -lf dhcpd
cat /etc/dhcpd.conf
cat /etc/dhcpc/dhcpd-eth1.info /var/state/dhcp/*.lease*
cat /etc/resolv.conf
0. If ISC dhcpd isn't running then start it and then post output.
1. If you use another DHCP client substitute the file name.
* If anything returns "file or directory not found" please find and substitute the file name.
** Add any network diagnostics yourself if you think it may help.
 
Old 11-22-2012, 11:41 AM   #14
Wyresider
LQ Newbie
 
Registered: Aug 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
The /etc/rc.d/rc.inet1.conf file is
Code:
# /etc/rc.d/rc.inet1.conf
#
# This file contains the configuration settings for network interfaces.
# If USE_DHCP[interface] is set to "yes", this overrides any other settings.
# If you don't have an interface, leave the settings null ("").

# You can configure network interfaces other than eth0,eth1... by setting
# IFNAME[interface] to the interface's name. If IFNAME[interface] is unset
# or empty, it is assumed you're configuring eth<interface>.

# Several other parameters are available, the end of this file contains a
# comprehensive set of examples.

# =============================================================================

# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="" ### ("yes" on old box) WGS
DHCP_HOSTNAME[0]=""

# Config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]="yes" ### (new box, 21/11/2012) WGS
DHCP_HOSTNAME[1]=""

# Config information for eth2:
IPADDR[2]=""
NETMASK[2]=""
USE_DHCP[2]=""
DHCP_HOSTNAME[2]=""

# Config information for eth3:
IPADDR[3]=""
NETMASK[3]=""
USE_DHCP[3]=""
DHCP_HOSTNAME[3]=""

# Default gateway IP address:
GATEWAY=""

# Change this to "yes" for debugging output to stdout.  Unfortunately,
# /sbin/hotplug seems to disable stdout so you'll only see debugging output
# when rc.inet1 is called directly.
DEBUG_ETH_UP="no"

## Example config information for wlan0.  Uncomment the lines you need and fill
## in your data.  (You may not need all of these for your wireless network)
#IFNAME[4]="wlan0"
#IPADDR[4]=""
#NETMASK[4]=""
#USE_DHCP[4]="yes"
#DHCP_HOSTNAME[4]="icculus-wireless"
#DHCP_KEEPRESOLV[4]="yes"
#DHCP_KEEPNTP[4]="yes"
#DHCP_KEEPGW[4]="yes"
#DHCP_IPADDR[4]=""
#WLAN_ESSID[4]=DARKSTAR
#WLAN_MODE[4]=Managed
#WLAN_RATE[4]="54M auto"
#WLAN_CHANNEL[4]="auto"
#WLAN_KEY[4]="D5A31F54ACF0487C2D0B1C10D2"
#WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=96389dc66eaf7e6efd5b5523ae43c7925ff4df2f8b7099495192d44a774fda16"
#WLAN_WPA[4]="wpa_supplicant"
#WLAN_WPADRIVER[4]="wext"
#WLAN_WPAWAIT[4]=30

## Some examples of additional network parameters that you can use.
## Config information for wlan0:
#IFNAME[4]="wlan0"              # Use a different interface name instead of
                                # the default 'eth4'
#IFNAME[4]="eth0:1"             # Set up an IP alias.
#HWADDR[4]="00:01:23:45:67:89"  # Overrule the card's hardware MAC address
#MTU[4]=""                      # The default MTU is 1500, but you might need
                                # 1360 when you use NAT'ed IPSec traffic.
#DHCP_TIMEOUT[4]=15             # The default timeout for the DHCP client to
                                # wait for server resonse is 30 seconds, but
                                # you might want a shorter wait.
#DHCP_KEEPRESOLV[4]="yes"       # If you dont want /etc/resolv.conf overwritten
#DHCP_KEEPNTP[4]="yes"          # If you don't want ntp.conf overwritten
#DHCP_KEEPGW[4]="yes"           # If you don't want the DHCP server to change
                                # your default gateway
#DHCP_IPADDR[4]=""              # Request a specific IP address from the DHCP
                                # server
#WLAN_ESSID[4]=DARKSTAR         # An example of how you can override _any_
                                # parameter defined in rc.wireless.conf, by
                                # prepending 'WLAN_' to the parameter's name.
                                # Useful with multiple wireless interfaces.
#WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=thekey"
                                # Some drivers require a private ioctl to be
                                # set through the iwpriv command. If more than
                                # one is required, you can place them in the
                                # IWPRIV parameter (separated with the pipe (|)
                                # character, see the example).
#WLAN_WPA[4]="wpa_supplicant"   # Run wpa_supplicant for WPA support
#WLAN_WPADRIVER[4]="ndiswrapper"# Tell wpa_supplicant to specifically use the
                                # ndiswrapper driver (if you leave this empty
                                # the 'wext' driver is used by default)
#WLAN_WPAWAIT[4]=30             # In case it takes long for the WPA association
                                # to finish, you can increase the wait time
                                # (defaults to 10 seconds)
I had no joy with dhcpd. The whole output didn't fit on the console, so I filed the messages -- console transactions were:
Code:
root: ps au | grep dhcpd
root      3024  0.0  0.0   2084   636 tty2     S+   16:58   0:00 grep dhcpd
root:#----------------
root: dhcpd 2> /flash/dhcpd_messages & # (to flash to port to old box for posting)
[1] 3025
root:#----------------
[1]+  Exit 1                  dhcpd 2>/flash/dhcpd_messages
root:#----------------
root: ps au | grep dhcpd
root      3027  0.0  0.0   2084   632 tty2     S+   16:58   0:00 grep dhcpd
root:
and the output from dhcpd was
Code:
Internet Systems Consortium DHCP Server V3.0.6
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

** You must add a global ddns-update-style statement to /etc/dhcpd.conf.
   To get the same behaviour as in 3.0b2pl11 and previous
   versions, add a line that says "ddns-update-style ad-hoc;"
   Please read the dhcpd.conf manual page for more information. **

If you did not get this software from ftp.isc.org, please
get the latest from ftp.isc.org and install that before
requesting help.

If you did get this software from ftp.isc.org and have not
yet read the README, please read it before requesting help.
If you intend to request help from the dhcp-server@isc.org
mailing list, please read the section on the README about
submitting bug reports and requests for help.

Please do not under any circumstances send requests for
help directly to the authors of this software - please
send them to the appropriate mailing list as described in
the README file.

exiting.
I added the line to /etc/dhcpd.conf (which was empty apart from a header comment), re-booted, and the message changed to
Code:
Not configured to listen on any interfaces!
However, I ran the rest anyway, from a script, as follows:
Code:
root: cat todo
ifconfig eth1
arp -a
route -n
pgrep -lf dhcpd
cat /etc/dhcpd.conf
cat /etc/dhcpc/dhcpd-eth1.info /var/state/dhcp/*.lease*
cat /etc/resolv.conf
root:#----------------------------------
root: sh -x todo
+ ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 30:85:a9:eb:72:a5
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:1 overruns:0 frame:1
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:60 (60.0 B)  TX bytes:0 (0.0 B)
          Interrupt:17 Base address:0xa000

+ arp -a
+ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
+ pgrep -lf dhcpd
+ cat /etc/dhcpd.conf
# dhcpd.conf
#
# Configuration file for ISC dhcpd (see 'man dhcpd.conf')
#
+ cat /etc/dhcpc/dhcpd-eth1.info /var/state/dhcp/dhcpd.leases
cat: /etc/dhcpc/dhcpd-eth1.info: No such file or directory
+ cat /etc/resolv.conf
# Generated by dhcpcd for interface eth0
nameserver 217.32.171.21
root:
The text of the message from dhcpd suggests that the problem is caused by old drivers not understanding new hardware? Or might it be a deep config file problem (Heaven knowshow many config files there are nowadays) that would be solved by doing a re-installation, and that I was just lucky to get away with copying my previous system last time?
 
Old 11-22-2012, 12:22 PM   #15
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,165
Blog Entries: 54

Rep: Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807Reputation: 2807
Sorry, my mistake: the DHCP client is /sbin/dhcpcd so it doesn't need /etc/dhcpd.conf but should get the values from /etc/rc.d/rc.inet1.conf and the leases file for eth1 should be /etc/dhcpc/dhcpcd-eth1.info AFAIK.

Check ('pgrep dhcpcd' or 'ps -C dhcpcd') if /sbin/dhcpcd is running (should since you have USE_DHCP[1]="yes") else restart inet1 service. Now check ifconfig, route, lease file, /etc/resolv.conf contents and syslog (latter just in case there's any error messages). Else you could run dhcpcd manually with messages saved and on stdout: '/sbin/dhcpcd -k; /sbin/dhcpcd -d eth1 2>&1 | tee /flash/dhcpc.log' . Else try reconfiguring with 'netconfig'?
 
  


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
[SOLVED] Destination Host Unreachable kunsik Linux - Networking 2 03-08-2012 10:39 PM
Destination Host Unreachable haydn.storr Linux - Networking 6 09-23-2011 07:39 AM
Destination host unreachable hanifn9 Ubuntu 8 03-24-2008 07:18 AM
Destination Host Unreachable cherukuri Linux - Networking 9 04-23-2005 04:59 AM
destination host unreachable javpra Linux - Networking 1 03-30-2005 05:44 AM


All times are GMT -5. The time now is 09:27 AM.

Main Menu
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