LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   could "no route to host" be caused by non-crossover cable? (https://www.linuxquestions.org/questions/linux-networking-3/could-no-route-to-host-be-caused-by-non-crossover-cable-139548/)

brandonweinberg 01-28-2004 07:13 AM

could "no route to host" be caused by non-crossover cable?
 
Quick question as I troubleshoot a "No Route To Host" message that appears when I try to ping (or telnet) my two Linux computers which are attached by crossover cable. I think the NIC drivers are loaded, interfaces are up and IP addressing goes with the subnet. I value all your time and will figure it out myself if it is a configuration thing...But I need to know one thing that can help me determine the troubleshooting "route" to pursue next ...

I need to know if a "No Route To Host" message would appear if my crossover cable is in fact standard cable. I have four cables and am fairly confident two are crossover. I have been examining the pins and the 1-2-3-6 layout on two seems to confirm they are, but I have substituted not just two but all four cables, none work and I just feel like I have exhausted all configuration options.

Anyway, I'm rambling...So my question is, if I am trying to ping two computers with standard (not crossover) cable, that otherwise are configured correctly, would I receive a "No Route To Host" message? Or not (that is, it would say something else in that case)? Thanks.

kevinatkins 01-28-2004 07:42 AM

with a direct connection (ie no hub) between the two boxes, if you use a non-crossover cable then, yes, i think you would get the error you're giving.

i've been down this path myself ...

i assume you're using a single cable, rather than two joined together - joining two crossover cables together will, of course, result in a non-crossover!

frogman 01-28-2004 08:09 AM

It's not a lot of help now, but try to buy crossover cables with a different sleeve colour than the normal grey - it makes cabling less stressful. :)

brandonweinberg 01-28-2004 09:17 AM

In my case "No Route To Host" probably means "This is not Crossover Cable." I used to have crossover cable that said "crossover" on it, I'm gonna check for that from now on. I've got to show these cables to somebody though, the pins sure appear aligned as crossover cable are. Anyway, thanks, time to get a hub.

Darin 01-28-2004 04:01 PM

"no route to host" means that the computer (based on it's IP address and [default]gateway settings) has no clue HOW to ping or get to the other computer. Most likely you don't have and may not need a gateway set on either computer if you only want to connect the 2 together but the problem is probably that the two computers do not have IP addresses that let them talk to each other.

Try giving the two computers static (you set it yourself) IP addresses like:
192.168.0.1 for one and 192.168.0.2 for the other, both with a mask (also called netmask) of 255.255.255.0

If everything was set up right as far as IP addresses and gateways you would get something else like a simple "request timed out" if it were a cabling problem. Another way to help test if cabling is the problem is to look for linklights; There should be some LEDs on the network cards and if the cable is the right kind the green light will come on when the cable is connected to both computers.

artur 01-28-2004 04:44 PM

Crossover cables are simple. Only pins 123 and 6 matter. There are two pairs. One connected to pins 1 and 2, the other to 3 and 6. In a straight through cable both ends have the same pair on the same pins. I.e. pair one is on both ends on pins 1 nad 2 and pair two on pins 3 and 6. With a crossover cable PAIRS cross:

one end - cable - other end
[pin 1,2] - pair 1 - [pin 3,6]
[pin 3,6] - pair 2 - [pin 1,2]

Lower pin number ALWAYS goes to lower, higher to higher, i.e. 1 to 1, 2 to 2, 3 to 3, 4 to 4 or in a crossover: 1 to 3, 2 to 6, 3 to 1, 6 to 2.

Easy! Now look at your cable. What cable dou you have?

And do a:
# route -n
# ifconfig
on both boxes and see if what you see makes sense.

brandonweinberg 01-29-2004 06:00 AM

From time to time, I encounter a computer problem that humbles me! I never considered myself great at networking, but I thought I was good and this problem demonstrates NO - I am not good...

I value my fellow Linux users time and try to do as much of the dirty much on my own. Yet with this problem, I could use your help as to which troubleshooting to concentrate on. I bought a hub, thinking it was a cabling problem, but after plugging in a bunch of cables everywhichway, it was ineffective.

So now I am concentrating on the NICs themselves. Due to my lackof networking knowhow, I am unable to figure it out myself and hope below contains "clues" as to why there is "No Route To Host" when pinging my two computers.

Neither of my computers have ethernet lights. The first computer is a Dell Optiplex with an ethernet card built on the motherboard. It does not go in an expansion slot.. The ethernet RJ-45 port is atop the mouse and keyboard ports. I examined it closely, while there is that ethernet picture (three triangled computers and 10base2), there are no lights. My old laptop had a Xircom Realport 10/100 with lights, this ethernet card does not have such lights. The second computer iis an IBM NetVista 2179750. The ethernet card does not go in an expansion slot and is built on. There is one ethernet RJ-45 port (with that ethernet picture). There are no lights.

Also, the afermentioned ethernet card on the Dell Optiplex has just one RJ-45 port yet the kernel can bring up two ethernet interfaces for it. When the kernel loads, isapnp detects one total plug & play card, an Ethernet 3COM 3C509B EtherLink III and can bring up two interfaces (eth0 & eth1) for it. Same MAC address. I always thought an interface reflected an RJ-45 port.

If relevant, the IBM NetVista has a SiS900 ethenet card and the kernel brings up just one interface. Both the 3COM and SiS modules are obviously loaded.

In conclusion, I believe that this info may provide some clues as to why I cannot ping my two computers. I have crossover cables, standard cables, a hub and tried alot of configurations and all I get is 'No Route To Host.' I hope the root of my problem is apparent to some of you, again, I will do the dirty work, if the afermentioned information reveals clues into the source of my problem, it may expedite my troubelshooting immensely.

In conclusion to conclusion, I do not understand why there no lights on either network card? I do not understand why my Dell Optiplex can bring up two interfaces though it has one port? Thanks again, I appreciate your help and am really looking forward to some projects once I get these two computers hooked up-

artur 01-29-2004 09:43 AM

Quote:

Originally posted by brandonweinberg
I bought a hub, thinking it was a cabling problem, but after plugging in a bunch of cables everywhichway, it was ineffective.
Might be more effective to first find the right cables (straight through) and then use them instead of randomly trying all cables you could find, which is what it seems you were doing. You might be complicating things for yourself this way.

Quote:

I am unable to figure it out myself and hope below contains "clues" as to why there is "No Route To Host" when pinging my two computers.
I'd agree with Darin, forget the cables, it is the config not cables. Just pick the right set of cables, plug them in and concentrate on config troubleshooting.

Quote:

an ethernet card built on the motherboard
Technically, that's not a card then, but still an interface. I'm not gonna be picky about that though ;)

Quote:

It does not go in an expansion slot.. The ethernet RJ-45 port is atop the mouse and keyboard ports. I examined it closely, while there is that ethernet picture (three triangled computers and 10base2), there are no lights. My old laptop had a Xircom Realport 10/100 with lights, this ethernet card does not have such lights. The second computer iis an IBM NetVista 2179750. The ethernet card does not go in an expansion slot and is built on. There is one ethernet RJ-45 port (with that ethernet picture). There are no lights.
That's a lot of words about irrelevant things such as next to what other ports your ethernet interfaces are located... Not a mention about the results of ifconfig and route -n commands which might actually give some clues.

Quote:

Also, the afermentioned ethernet card on the Dell Optiplex has just one RJ-45 port yet the kernel can bring up two ethernet interfaces for it. When the kernel loads, isapnp detects one total plug & play card, an Ethernet 3COM 3C509B EtherLink III and can bring up two interfaces (eth0 & eth1) for it. Same MAC address. I always thought an interface reflected an RJ-45 port.
Now this part is interesting. On my red hat boxes interface config is stored in /etc/sysconfig/network-scripts/ifcfg-eth0, ifcfg-eth1 etc. I don't know where that info is stored on slackware boxes, but if you can locate it, would you mind posting it along with the results of the two commands I mention above? It is possible that your system is misconfigured and the fact that there are two ethernet port configurations is messing up routing table.

Quote:

In conclusion, I believe that this info may provide some clues as to why I cannot ping my two computers.
Somewhat, but "need more input" ;) You have tried pinging from both computers, haven't you? Did you get the same results on both ends? Be sure to post ifcfg and route -n for both computers.

Quote:

I have crossover cables, standard cables, a hub and tried alot of configurations and all I get is 'No Route To Host.'
In previous post I explained how to tell which cable is which. Use that info to pick the right cables, hook everything up and forget about the cables. If you're so concerned about blinkenlights, there should be some on the hub that will go on for the ports to which your computers are connected.

Quote:

In conclusion to conclusion, I do not understand why there no lights on either network card?
Because they don't have to be there. That's just a convenience feature that some manufacturers add to their ethernet interfaces. That's of course presuming that when you say "there are no lights" you mean that the LEDs that would emit the light are not there physically, not that they are there but do not emit light. If they are there but do not emit light in any cabling configuration then either your ehternet ports never got initialized, the cables are not plugged in all the way or otherwise don't make a good connection, or the interfaces are shot due to being connected incorrectly. I presume you know enough to tell if a cable is not all the way in.

brandonweinberg 01-29-2004 02:35 PM

I am now using crossover cable to connect the two computers (bad straight thru cable): I have been pinging from both ends with the same "No Route To Host" output. Anyway, here's what I got.

Computer 1 is a Dell Optiplex w/ one onboard ethernet interface
Computer 2 is an IBM NetVista w/ one onboard ethernet interface

-- When I do 'ifconfig -a'

-- Dell Optiplex --
eth0 Link encap:Ethernet HW Addr: 00:40:4F:45:EA:7E
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 MTU:1
Rx packets:0 errors:0 dropped:0 overruns:0 carrier:0 frame:0
Tox packets:329 errors:0 dropped:0 overruns:0 carrier:0
Collisions:0 txqueuelen:100
Rx Bytes:0 (0, 0b) Tx bytes: 24310 (23.7 kb)
Interrupt:5 Base Address 0x220

eth1 Link encap:Ethernet HW Addr: 00:C0:4F:C5:EA:7E
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
BROADCAST RUNNING MULTICAST MTU:1500 MTU:1
Rx packets:0 errors:0 dropped:0 overruns:11220 carrier:0 frame:0
Tox packets:11220 errors:0 dropped:0 overruns:0 carrier:33660
Collisions:11220 txqueuelen:100
Rx Bytes:0 (0, 0b) Tx bytes: 0 (0, 0 b)
Interrupt:10 Base Address 0x250

-- IBM NetVista --
eth0 Link encap:Ethernet HW Addr: 00:40:D0:13:06:57
inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 MTU:1
Rx packets:344 errors:0 dropped:0 overruns:0 carrier:0 frame:0
Tox packets:11 errors:0 dropped:0 overruns:0 carrier:0
Collisions:0 txqueuelen:100
Rx Bytes:28238 (27.5 kb) Tx bytes: 462 (462.0 b)
Interrupt:9 Base Address 0xd800

--When I do route -n --

-- Dell Optiplex --

Kernel IP Routing Table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0

-- IBM NetVista --

Kernel IP Routing Table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0

So there's alot of collisions on eth1, huh? The collisions on eth1 go up each time I ping. I'm also confused (trivial as it maybe) the Dell Optiplex HWaddress appears different for each interface? I inspected this computer inside and out and it looks to have but one onboard ethernet interface...

FWIW:
on each computer, I can "sufficiently" ping the static IP address which it is assigned to

on each computer, when I ping an address (besides its own) INSIDE the 192.168.1.0 range it hangs for awhile and outputs "No Route To Host"

on each computer, when I ping an address OUTSIDE the192.168.1 range it outputs "Network Unreachable."

artur 01-30-2004 10:11 AM

Quote:

Originally posted by brandonweinberg
-- Dell Optiplex --
eth0 Link encap:Ethernet HW Addr: 00:40:4F:45:EA:7E
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 MTU:1
Rx packets:0 errors:0 dropped:0 overruns:0 carrier:0 frame:0
Tox packets:329 errors:0 dropped:0 overruns:0 carrier:0
Collisions:0 txqueuelen:100
Rx Bytes:0 (0, 0b) Tx bytes: 24310 (23.7 kb)
Interrupt:5 Base Address 0x220

eth1 Link encap:Ethernet HW Addr: 00:C0:4F:C5:EA:7E
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
BROADCAST RUNNING MULTICAST MTU:1500 MTU:1
Rx packets:0 errors:0 dropped:0 overruns:11220 carrier:0 frame:0
Tox packets:11220 errors:0 dropped:0 overruns:0 carrier:33660
Collisions:11220 txqueuelen:100
Rx Bytes:0 (0, 0b) Tx bytes: 0 (0, 0 b)
Interrupt:10 Base Address 0x250

Now this is odd! You really do seem to have two ethernet interfaces. You could try lspci command ( read the man page for it's usage) to confirm what is using IRQ 5. Isn't IRQ5 and I/O 220 usually used for sound cards? Could your system have incorrectly auto-detected the sound card as an ethernet interface? Weird. Secondly, the IP address is the same for both interfaces and your routing table points at this ghost eth0 interface, so the traffic is sent to it, not to eth1. Try ifdown eth0 and then ifconfig to confirm that eth0 is no longer active, then do route -n to see if eth0 is still there and if so, remove it and add eth1 instead. I purposely don't give you the exact commands to type in, so that you read the man pages and understand what you're doing.
Also, check /etc/modules.conf to see what modules are being loaded at bootup. Please post your modules.conf file. See if there's anything related to eth0 in it, and verify what it is. Perhaps you should remove that line from modules.conf and edit the line with "eth1" and replace 1 with 0.
Another interesting thing is that Rx overrun count is exactly equal to Tx packet count and that Tx carrier error count is exactly 3x that number. Could it be that your ethernet interface is shot?
If you can, download Knoppix CD image, burn it to a CD and boot from it. Knoppix is a very nice Linux distro that boots straight off of CD. It does very good job of detecting hardware. See how your system ends up configured after it boots and if pinging works

Quote:

-- Dell Optiplex --

Kernel IP Routing Table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0

This should be referencing eth1 for packets to be sent to your 3Com interface. As it is now, packet are sent to that non-existent eth0


Quote:

So there's alot of collisions on eth1, huh? The collisions on eth1 go up each time I ping.
Have you tried the "-I" option of ping? It's odd that collision count goes up on eth1 while judging by your routing table traffic should get sent to eth0

Quote:

I'm also confused (trivial as it maybe) the Dell Optiplex HWaddress appears different for each interface? I inspected this computer inside and out and it looks to have but one onboard ethernet interface...
It is strange. Two things are possible: you have some other interface, such as wireless 802.11 that is identified by your system as ethernet interface, or your system falsely identifies some other piece of hardware as ethernet. Either way, very strange.

Quote:

FWIW:
on each computer, I can "sufficiently" ping the static IP address which it is assigned to

IIRC, pinging yourself never really goes down to hardware driver level. Packets are ponged back at a higher level. I may be wrong on this one though.

Also, make sure to disable any IPTables firewalling for now. Perhaps there are some rules in your firewall that get in the way.

moses 01-30-2004 10:47 AM

As was said previously, "No Route To Host" is a message meaning the computer doesn't know anything about the NIC or cables. It's a routing problem, not a hardware problem.
Do the following:
Code:

ifconfig eth0 down
ifconfig eth1 down
ifconfig eth0 192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0
route add -net 192.168.0.0 netmask 255.255.255.0 dev eth0

Now, if you're just connecting two computers and neither is running as a gateway to the outside world, then this should work to talk between the two computers.
(You'll also have to set up the other computer similarly, but with a different IP address in the ifconfig line).

brandonweinberg 01-30-2004 11:45 AM

Moses - Those settings did not resolve it. I have posted more information (that I should have originally)
Artur - I read your post, as soon as I finish this reply, I will spend hours reviewing your post and troubleshooting.

-- Updats --

When I did a 'dmesg' I got a series of errors stating "NETDEV WATCHDOG: eth0 transit timed out: Tx timed out, lost interrupt? TSR = 0x43 ISR = 0x3 T=101.
I had a D-Link DE220 ethernet card lying around so I put it in an expansion slot on the Dell Optiplex. I wanted to start fresh so I disabled the onboard ethernet (the 3COM interfaces) in the BIOS and re-installed my root partition. The kernel recognized the D-Link (no 3COM stuff). I setup the card and got the same "No Route To Host" output when I pinged the IBM Netvista. I did a 'dmesg' and got the same error stating "NETDEV WATCHDOG: eth0 transit timed out. Tx timed out, lost interrupt? I googled the error message, could not help myself with the results and will continue troubleshooting with Arturs info. I should have posted NETDEV WATCHDOG error before. I'm getting there with your help! Back to work.

brandonweinberg 01-30-2004 12:09 PM

Artur wrote, "Isn't IRQ5 and I/O 220 usually used for sound cards? Could your system have incorrectly auto-detected the sound card as an ethernet interface?"

Thank You Artur! I disabled my onbaord sound in the BIOS, restarted the computer and the two computers now ping each other. I threw my arms in the air and feel great. When you are listening to the radio and singing along to a McDonalds commercial ("I'm loving it, da da da da da) you know you're in a good mood.

Darin 01-31-2004 09:47 AM

Nice! Some FYI stuff:

Slackware has startup scripts BSD style, network config is in /etc/rc.d/rc.inet1 and on newer versions it stores the info you need like IP addresses in /etc/rc.d/rc.inet1.conf

Nice catch on the soundcard thing, I've never seen a 3Com driver load itself onto a soundcard but I guess it's not impossible. You probably fixed it when you disabled the sound card because it killed off the 2nd eth which had a conflicting IP address with the first one, it's possible that the weird ghost eth0 up and attached to the soundcard(?) wouldn't interfere if network interfaces just had different addresses. You might want to go into config stuff like /etc/isapnp.conf or /etc/rc.d/rc.inet1 or /etc/rc.d/rc.modules and see if you can find out why the driver loaded onto your soundcard, maybe you can get the soundcard's real driver to load instead and then you will have sound too!

I imagine some network cards don't have linklights, but many of them are just hidden. You can usually see them as little rectangular LEDs around the RJ-45 jack, they can be pretty hard to spot when they aren't lit up.

Anyhow, glad to see you're up and running, you weren't the only one humbled by this one, just remember you are smarter now for having solved it.


All times are GMT -5. The time now is 06:12 AM.