LinuxQuestions.org
Visit Jeremy's Blog.
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 07-18-2003, 09:57 AM   #1
gyrus
LQ Newbie
 
Registered: Jul 2003
Posts: 8

Rep: Reputation: 0
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 ;-)
 
Old 07-18-2003, 10:02 AM   #2
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
Yes, try changing the cable.
 
Old 07-18-2003, 10:14 AM   #3
gyrus
LQ Newbie
 
Registered: Jul 2003
Posts: 8

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

Last edited by gyrus; 07-18-2003 at 10:17 AM.
 
Old 07-18-2003, 04:25 PM   #4
gyrus
LQ Newbie
 
Registered: Jul 2003
Posts: 8

Original Poster
Rep: Reputation: 0
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?
 
Old 07-18-2003, 04:35 PM   #5
exigent
Member
 
Registered: Aug 2002
Distribution: damnsmalllinux
Posts: 205

Rep: Reputation: 30
in xp, what does it say under 'network connections'?
 
Old 07-18-2003, 04:54 PM   #6
gyrus
LQ Newbie
 
Registered: Jul 2003
Posts: 8

Original Poster
Rep: Reputation: 0
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.
 
Old 07-18-2003, 06:20 PM   #7
exigent
Member
 
Registered: Aug 2002
Distribution: damnsmalllinux
Posts: 205

Rep: Reputation: 30
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?
 
Old 07-18-2003, 06:29 PM   #8
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
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
 
Old 07-19-2003, 02:06 AM   #9
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
Poetics

127.0.0.1 localhost

is fine, and it must be that way.
 
Old 07-19-2003, 02:37 PM   #10
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
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
 
Old 07-23-2003, 07:28 PM   #11
MagDaddy
Member
 
Registered: Jul 2003
Posts: 31

Rep: Reputation: 15
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.
 
  


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
ad-hoc connection (and internet sharing) between two linux boxes. A complex question. riccisit Linux - Wireless Networking 1 09-29-2005 09:02 AM
2 linux boxes unable to ping each other in a network lqsukumar Linux - Networking 4 07-21-2005 05:36 PM
sharing network files between Linux boxes linuxhippy Slackware 23 04-22-2005 07:03 PM
Network connection fails under one certain condition: soren625 Linux - Networking 3 06-02-2004 05:42 AM
users between non local boxes Azrail Linux - Networking 0 10-06-2003 06:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

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
Open Source Consulting | Domain Registration