LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-25-2009, 01:36 PM   #1
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 632

Rep: Reputation: 33
No route to host ?? What am I missing here ?!


Code:
[jonas@jonas ~]$ ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:1B:24:A4:B6:06  
          inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::21b:24ff:fea4:b606/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:24 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:5523 (5.3 KiB)  TX bytes:2929 (2.8 KiB)
          Interrupt:17
Code:
[jonas@jonas ~]$ ping -c 4 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 192.168.1.100 icmp_seq=1 Destination Host Unreachable
From 192.168.1.100 icmp_seq=2 Destination Host Unreachable
From 192.168.1.100 icmp_seq=3 Destination Host Unreachable
From 192.168.1.100 icmp_seq=4 Destination Host Unreachable

--- 192.168.1.1 ping statistics ---
4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 6001ms
pipe 3
Code:
[jonas@jonas ~]$ ping -c 4 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.

--- 192.168.1.1 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 12999ms
Code:
[jonas@jonas ~]$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     1      0        0 eth0
default         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
Code:
[jonas@jonas ~]$ ssh -l root 192.168.1.1
ssh: connect to host 192.168.1.1 port 22: No route to host
Why can I not reach 192.168.1.1 ?
 
Old 09-25-2009, 01:47 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
1. The first thing I'd check is to make sure the two hosts are on the same, physical subnet:

a) Are they connected via a multi-port hub, router or switch?
... or ...
b) Are they connected directly (using a crossover cable)?

2. Next, I'd make sure the hosts are actually configured as:

a) 192.168.1.100/subnet mask 255.255.255.0
<= Your "ifconfig" shows this for one host
b) 192.168.1.1/subnet mask 255.255.255.0
<= You also need to verify the other host

3. What happens when you try to ping 192.168.1.100 from 192.168.1.1? Do you get the same "no route to host"?

4. Does either host have two NIC ports? If so, have you tried unplugging/plugging in to the other port?

Q: Do you see activity lights on the NICs? Are the cables good?

That's for starters - I hope it helps ... at least a little bit.

IMHO .. PSM

Last edited by paulsm4; 09-25-2009 at 02:10 PM.
 
Old 09-25-2009, 01:53 PM   #3
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 632

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by paulsm4 View Post
Q: What happens when you try to ping 192.168.1.100 from 192.168.1.1? Do you get the same "no route to host"?

Q: Does either host have two NIC ports? If so, have you tried unplugging/plugging in to the other port?

Q: Do you see activity lights on the NICs? Are the cables good?
192.168.1.1 is a Linksys WRT610N with dd-wrt. I logged in to the webGUI just minutes ago. I then went wireless to search a manual on the internet and disabled my eth0.

Now I have just disabled my wireless and enabled my eth0 again to be able to talk to my dd-wrt Linksys, who should still be on 192.168.1.1.

But no luck...

(by the way : to post on this forum, I'm back on my wireless (other router))
 
Old 09-25-2009, 02:13 PM   #4
baig
Member
 
Registered: Nov 2008
Location: وادی ھنزہ
Distribution: Solaris 5.10, Debian Server 5.2, CentOS 5.6
Posts: 226
Blog Entries: 3

Rep: Reputation: 38
How you logged in to webGUI? from which system you logged in? Code names won't work.. I guess the other is a Router?..

I think a router needs to be configured for ssh sessions... by default it won't accept ssh logins..

Inshort you don't have physical connection to this device.. that means no route !!

Last edited by baig; 09-25-2009 at 02:15 PM.
 
Old 09-25-2009, 02:14 PM   #5
linuxlainen
Member
 
Registered: Jul 2006
Location: Earth
Distribution: Ubuntu 9.04
Posts: 64

Rep: Reputation: 16
Hi,

* Do you have MAC filer enabled on your router?If so, make sure yours is added to the router
* Is your router with the same subnet mask?
* Do yo have DHCP enabled on your router? If so, is your machine IP within the range specified on your router?
 
Old 09-25-2009, 02:22 PM   #6
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 632

Original Poster
Rep: Reputation: 33
It think it's very simple... I just bricked my Linksys with an unstable version of DD-WRT...

The power-button just keeps on flashing...

About the ssh-question : with DD-WRT ssh-access is enabled, I had it enabled. I logged in before just right... End of game I guess.
 
Old 09-25-2009, 02:34 PM   #7
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 5.4, Mac OS 10.4 (tiger)
Posts: 1,005

Rep: Reputation: 79
If your using Fedora or CentOS, what does "mii-tool eth0" and "ethtool eth0" produce, do they actually confirm a link.

Also use "ip neigh show" to show ips that are reachable (or routes that are not) within the local area network...
 
Old 09-25-2009, 03:27 PM   #8
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
It think it's very simple... I just bricked my Linksys ...

The power-button just keeps on flashing...
Uh, yeah - that would cause a "no route to host"
 
Old 09-26-2009, 02:18 AM   #9
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by jonaskellens View Post
It think it's very simple... I just bricked my Linksys with an unstable version of DD-WRT...

The power-button just keeps on flashing...

About the ssh-question : with DD-WRT ssh-access is enabled, I had it enabled. I logged in before just right... End of game I guess.
Not necessarily, there are ways to recover a bricked router after a bad DD-WRT installation:

Recover from a Bad Flash

I like DD-WRT very much, I've managed to brick a few Linksys routers in my time, and only one was ever totally lost. Good thing they're so cheap.
 
Old 09-26-2009, 06:52 AM   #10
ilu_nishant
LQ Newbie
 
Registered: Sep 2009
Posts: 11

Rep: Reputation: 1
Hii

Do check your iptable rules.In linux "service iptables status" command will give you the clear picture .
If client and server are in the same subnet mask they must communicate with each other.
Two way handshake must be be established between them unless not restricted by iptable rules.
Check your iptable rules of both 192.168.1.100 machine & 192.168.1.1 machine.

Cheerzz!!
 
Old 09-26-2009, 06:55 AM   #11
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 5.4, Mac OS 10.4 (tiger)
Posts: 1,005

Rep: Reputation: 79
If you read it like I kinda only scanned past before, it appears he borked his router so he naturally wouldn't get a route to host, the router ain't working.
 
Old 09-26-2009, 10:52 AM   #12
gregorian
Member
 
Registered: Apr 2006
Posts: 509

Rep: Reputation: 34
I had the same problem before. Guess what I did? I added myself as another default gateway and it worked. No one has been able to answer why it worked. See if it works for you and I'll point you to my thread. Here's my routing table:

Quote:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.70.146 * 255.255.255.255 UH 0 0 0 wlan0
loopback * 255.0.0.0 U 0 0 0 lo
default 172.16.1.1 0.0.0.0 UG 0 0 0 wlan0
default 172.16.70.146 0.0.0.0 UG 0 0 0 wlan0
Here's the script I wrote for my wireless. If the above works, you can modify this for your eth0
Quote:
#!/bin/bash

if [ "$1" == "on" ]; then
echo "Turning on wifi device"
/sbin/ifconfig wlan0 up
/sbin/iwlist wlan0 scan
sleep 2
echo "Connecting to network"
/sbin/iwconfig wlan0 essid XXXXX #Enter your essid (Connection name)
sleep 2
echo "Obtaining the address"
/sbin/dhcpcd wlan0

#Obtain IP and store it

/sbin/ifconfig wlan0 #Display configuration

IP=`/sbin/ifconfig wlan0|grep "inet addr"|cut -f2 -d:|cut -f1 -dB`
if [ -n "$IP" ]; then
/sbin/route add default gw $IP
/sbin/route add default gw XX.XX.XX.XX #My gateway
/sbin/route
fi
else
/sbin/ifconfig wlan0 down
killall dhcpcd
fi

Last edited by gregorian; 09-26-2009 at 11:00 AM.
 
Old 09-26-2009, 01:30 PM   #13
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi - In summary:

PROBLEM:
Quote:
Ping ... Destination Host Unreachable
SUGGESTED TROUBLESHOOTING:
Quote:
1. The first thing I'd check is to make sure the two hosts are on the same, physical subnet:

a) Are they connected via a multi-port hub, router or switch?
... or ...
b) Are they connected directly (using a crossover cable)?

2. Next, I'd make sure the hosts are actually configured as:

a) 192.168.1.100/subnet mask 255.255.255.0
<= Your "ifconfig" shows this for one host
b) 192.168.1.1/subnet mask 255.255.255.0
<= You also need to verify the other host

3. What happens when you try to ping 192.168.1.100 from 192.168.1.1? Do you get the same "no route to host"?

4. Does either host have two NIC ports? If so, have you tried unplugging/plugging in to the other port?

Q: Do you see activity lights on the NICs? Are the cables good?
In this case, the OP probably would have failed at 2) (check the Linksys IP and subnet) or 3) (try to ping the Linux host from the Linksys).

'Hope that helps .. PSM

PS:
Yes, the Linksys is almost certainly salvageable.

PPS:
More generally (if you get "no route to host" for an arbitrary IP address):
Quote:
STEP 0. I'd make sure I can "ping" the gateway. I'd make sure my gateway is physically connected, and make sure it has the same IP network #/subnet mask.

Last edited by paulsm4; 09-26-2009 at 01:33 PM.
 
  


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
No Route To Host manoj.linux Linux - Enterprise 1 10-25-2007 02:49 PM
No route to host mail4visu Linux - Networking 1 05-18-2006 07:33 AM
No route to host Airwaves Linux - Networking 2 11-04-2005 08:15 AM
no route to host PenguinHead Linux - Networking 9 02-02-2005 03:03 PM
No Route To Host Que Linux - General 10 08-19-2002 09:22 AM


All times are GMT -5. The time now is 10:42 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration