Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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.
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))
* 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?
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.
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.
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.