LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   two linux boxes local network connection fails (https://www.linuxquestions.org/questions/linux-networking-3/two-linux-boxes-local-network-connection-fails-73842/)

gyrus 07-18-2003 09:57 AM

two linux boxes local network connection fails
 
Hi,

I have two PCs here each one of them has Red Hat Linux installed (one version 8 and another version 9) each one of them has NICs installed and working, which I connect to each other with a crossover cable. Right now I'm stuck at pinging the boxes from each other. Still, I can ping interfaces locally with no problems.
I will paste here the output and contents of things which I suppose are responsible for network, please, correct me if I did some stupid mistake.

Redhat 8:

[root@localhost etc]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.1
NETMASK=255.255.255.0

[root@localhost etc]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:08:A1:22:78:8C
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:119 errors:0 dropped:0 overruns:0 frame:0
TX packets:164 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:7140 (6.9 Kb) TX bytes:6244 (6.0 Kb)
Interrupt:5 Base address:0xb400

[root@localhost etc]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo


And here is for Redhat 9:

[root@localhost etc]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.2
NETMASK=255.255.255.0

[root@localhost etc]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:C0:26:8D:32:65
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:1440 (1.4 Kb)
Interrupt:21 Base address:0x9000

[root@localhost etc]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo


iptables chains are empty for both:
[root@localhost network-scripts]# iptables -L -v
Chain INPUT (policy ACCEPT 1319 packets, 895K bytes)
pkts bytes target prot opt in out source destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 1485 packets, 449K bytes)
pkts bytes target prot opt in out source destination

also this is true for both:
[root@localhost etc]# cat /proc/sys/net/ipv4/icmp_echo_ignore_all
0

and on both I always get the same result when pinging the other box:
[root@localhost etc]# ping 192.168.0.2
PING 192.168.0.2 (192.168.0.2) from 192.168.0.1 : 56(84) bytes of data.
From 192.168.0.1 icmp_seq=1 Destination Host Unreachable
From 192.168.0.1 icmp_seq=2 Destination Host Unreachable
From 192.168.0.1 icmp_seq=3 Destination Host Unreachable

--- 192.168.0.2 ping statistics ---
6 packets transmitted, 0 received, +3 errors, 100% loss, time 5000ms
, pipe 3

Though I am able to ping locally say on Red Hat 8:
[root@localhost etc]# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) from 192.168.0.1 : 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=0.065 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=0.058 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=0.058 ms
64 bytes from 192.168.0.1: icmp_seq=4 ttl=64 time=0.058 ms
64 bytes from 192.168.0.1: icmp_seq=5 ttl=64 time=0.058 ms

--- 192.168.0.1 ping statistics ---
5 packets transmitted, 5 received, 0% loss, time 3999ms
rtt min/avg/max/mdev = 0.058/0.059/0.065/0.007 ms

Now, please please please, do not ignore! Please tell me why am I unable to ping one box from another? I am beginning to think that it is just a bad cable, though when I plug connector in, indicators on both NICs show it is OK.


PS I am very sorry for my poor english (need some practice ;-)

ppuru 07-18-2003 10:02 AM

Yes, try changing the cable.

gyrus 07-18-2003 10:14 AM

Thanks for quick reply.
:-) are you sure? It is a two hours long trip for me, ufff... :-(

gyrus 07-18-2003 04:25 PM

There is one more thing I would like to add. In winXP which is on the same machine where Redhat 8 is, when I plug the cable in windoze shows an icon notification. I don't know whether it means that cable is OK or not, but still I can not ping the boxes from each other.
So the question still remains. Please, can someone confirm that I still really need to change the cable?

exigent 07-18-2003 04:35 PM

in xp, what does it say under 'network connections'?

gyrus 07-18-2003 04:54 PM

Bloody windoze says it is OK and that was the main reason I believed the cable was good. But, I was very VERY surprised when I unplugged the cable and looked at how it was made, heh, the guys in the store just missed :-) and one wire (orange or #2 as it is shown here http://www.perfectdrivers.com/howto/crossover.html) is tied up with the blue and white one so the orange one was left unconnected. Ohhhh, that one mistake of the guys in the store and a bloody windoze icon notification keep me busy for a couple of days! ;-) Now I know the reason and can sleep calmly. He-he.

exigent 07-18-2003 06:20 PM

wow, that sucks! does this mean you have to go back to the store, or have you found a way to make crossover's without all those tools?

Poetics 07-18-2003 06:29 PM

Something I've noticed ... are both your machines called "localhost" (as seen in your prompt) ... generally localhost is just a reference to the local ip address of 127.0.0.1 -- try changing the hostnames (to something different, and different from each other; such as "comp1" and "comp2") and trying again

ppuru 07-19-2003 02:06 AM

Poetics

127.0.0.1 localhost

is fine, and it must be that way.

Poetics 07-19-2003 02:37 PM

I didn't mean change the listing of 127.0.0.1 to anything other than localhost; I mean that his computers' names appear to be "localhost" by looking at his prompt (the default Slackware install resembles [root@darkstar]# for example, with darkstar being the hostname). I'm saying if he's trying to "ping localhost" meaning the other computer, he's just going to end up pinging 127.0.0.1 -- The hostname should be different, which can be set with the "hostname" command and/or in /etc/hosts and /etc/HOSTNAME

MagDaddy 07-23-2003 07:28 PM

Though bad cable is often the problem.

Try turning off iptables.
service iptables stop
Can the boxes ping each other then? The networking on the two boxes looks good.

Have you done a tcpdump?

Here's what I find odd.
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:24 errors:0 dropped:0 overruns:0 carrier:0

You have transmitted 24 packets, and haven't received any responses.


All times are GMT -5. The time now is 05:54 PM.