Peer to peer network with two machines, ping doesn't work

Peer to peer network with two machines, ping doesn't work

Post by linuxquest » Mon, 02 Feb 2004 14:28:26


ear experts,

I'm trying to get my two Redhat machines to talk to each other.

They are configured with static IP addresses:

10.0.0.1 red.testrac.com red
10.0.0.2 white.testrac.com white

No DHCP. I also don't have DNS running anywhere.

I thought that the hosts file could substitute for DNS.
But neither machine can find (ping) the other one.

I'll include output from files, and commands.
What am I missing here?

Thanks a lot

-------------------------------------------------------------------------
-------------------------------------------------------------------------
-------------------------------------------------------------------------
-------------------------------------------------------------------------

from red, 10.0.0.1:

Commands:


ifconfig
eth0 Link encap:Ethernet HWaddr 00:07:E9:3C:E3:24
inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0
RX bytes:0 (0.0 b) TX bytes:168 (168.0 b)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:261 errors:0 dropped:0 overruns:0 frame:0
TX packets:261 errors:0 dropped:0 overruns:0 carrier:0
collisions:0
RX bytes:17394 (16.9 Kb) TX bytes:17394 (16.9 Kb)


hostname
red

domainname
(none)

hostname -d
testrac.com

dnsdomainname
testrac.com

route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface

10.0.0.0 * 255.0.0.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 10.255.255.254 0.0.0.0 UG 0 0 0 eth0


ping -c 1 10.0.0.1

PING 10.0.0.1 (10.0.0.1) from 10.0.0.1 : 56(84) bytes of data.
64 bytes from 10.0.0.1: icmp_seq=0 ttl=255 time=17 usec

--- 10.0.0.1 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max/mdev = 0.017/0.017/0.017/0.000 ms


ping -c 1 white

PING white.testrac.com (10.0.0.2) from 10.0.0.1 : 56(84) bytes of data.
From red.testrac.com (10.0.0.1): Destination Host Unreachable

--- white.testrac.com ping statistics ---
1 packets transmitted, 0 packets received, +1 errors, 100% packet loss


host red
;; connection timed out; no servers could be reached


host white
;; connection timed out; no servers could be reached


------------
Files:


cat /etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
10.0.0.1 red.testrac.com red

10.0.0.2 white.testrac.com white



cat /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=10.0.0.1
NETMASK=255.0.0.0
GATEWAY=10.255.255.254


cat /etc/resolv.conf
nameserver 10.0.0.1

cat /etc/host.conf
order hosts,bind


cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=red





---------------------------------------------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------
 
 
 

Peer to peer network with two machines, ping doesn't work

Post by USMC Snipe » Mon, 02 Feb 2004 16:25:37

estOn Sat, 31 Jan 2004 21:28:26 -0800, linuxquestion wrote:




 
 
 

Peer to peer network with two machines, ping doesn't work

Post by Eric Enrig » Mon, 02 Feb 2004 16:36:49


<snip>

You say "peer to peer" network.. Do you mean machine to machine directly?
Perhaps you need a crossover cable, while you are using regular ethernet
cabling.

As for using /etc/hosts, yes this can substitute for DNS. The reason that
"host" fails, is because it attempts to talk to your DNS server directly,
rather than calling gethostbyname().

HTH,
--
Eric Enright /"\
sauronAtiptsoftDcom \ / ASCII Ribbon Campaign
X Against HTML E-Mail
Public Key: 0xBEDF636F / \
 
 
 

Peer to peer network with two machines, ping doesn't work

Post by Clifford K » Tue, 03 Feb 2004 00:35:27


The eth0 interfaces on both machines do not show "RUNNING" in the ifconfig
output, which, as you can see, is present for the lo interface. It's a
good bet that is why no communication is possible.

Although I really don't know what the missing RUNNING specifically implies,
my *guess* would be that the cards are not correctly configured for the
hardware.

--
Clifford Kite Email: "echo XXXX@XXXXX.COM |rot13"
PPP-Q&A links, downloads: http://www.yqcomputer.com/
/* The signal-to-noise ratio is too low in many [news] groups to make
* them good candidates for archiving.
* --- Mike Moraes, Answers to FAQs about Usenet */
 
 
 

Peer to peer network with two machines, ping doesn't work

Post by linuxquest » Tue, 03 Feb 2004 04:39:02

> You say "peer to peer" network.. Do you mean machine to machine directly?

Yes, this is the case. What is the difference/advantage of using a
crossover cable?


Do you know how I could get it work then?

Here's a question. I noted on the web, that when another user got
his network working, he had
IPADDR: 10.192.8.50
Gateway: 10.192.8.1

I noted that the first three digits of the IP were the same.
Do you think that it is important?

Also, can you others ping your gateway? I can't.

Thanks
 
 
 

Peer to peer network with two machines, ping doesn't work

Post by linuxquest » Tue, 03 Feb 2004 04:41:10


So, you get RUNNING, on your eth0 output?


I think that they are configured well enough. There were no drivers
before, and I installed them.
 
 
 

Peer to peer network with two machines, ping doesn't work

Post by Bit Twiste » Tue, 03 Feb 2004 04:55:58


You need a regular cable for nic to hub/switch/router/cable modem.

You need a crossover when you go from nic to nic.
The crossover cable crosses tx wires to connect to rx and rx to tx
pins.
 
 
 

Peer to peer network with two machines, ping doesn't work

Post by Clifford K » Tue, 03 Feb 2004 05:13:23


Yes.

--
Clifford Kite Email: "echo XXXX@XXXXX.COM |rot13"
PPP-Q&A links, downloads: http://www.yqcomputer.com/
/* The wealth of a nation is created by the productive labor of its
* citizens. */
 
 
 

Peer to peer network with two machines, ping doesn't work

Post by Clifford K » Tue, 03 Feb 2004 05:52:12


A cable directly connecting (no hub or switch) the Ethernet cards of
two hosts together must a crossover cable. See the Ethernet HOWTO
in the "Twisted Pair" section for more on crossover cables.

--
Clifford Kite Email: "echo XXXX@XXXXX.COM |rot13"
PPP-Q&A links, downloads: http://www.yqcomputer.com/
/* My confidence in this answer (X), on a scale of 0 to 10:
|----|----|----|----|----|----|----|----|----|----X
0----1----2----3----4----5----6----7----8----9----10 */
 
 
 

Peer to peer network with two machines, ping doesn't work

Post by Trygve Sel » Tue, 03 Feb 2004 08:44:32


The HWaddr says the NICs are Intel ones. Which model?


Which driver did you install? What is the output of the command lsmod?
 
 
 

Peer to peer network with two machines, ping doesn't work

Post by linuxquest » Tue, 03 Feb 2004 08:59:34

I bought a crossover cable and it worked!
Thanks to you and Bit Twister. Thank you.

ifconfig now shows the eth0 RUNNING also.
 
 
 

Peer to peer network with two machines, ping doesn't work

Post by Michael Bu » Tue, 03 Feb 2004 15:51:06


XXXX@XXXXX.COM writes:



If you are using TwistedPair cabling, you either have to connect the
systems using a hub or a switch (preferred), or by directly connecting
the two systems with a crossover cable. Otherwise, the wiring is incorrect.

[...]


Not for your actual problem. That's just a smaller network,
spanning less machines than yours. If you want to learn about
IP addressing schemes, start with reading RFC1878.

Michael
--
Michael Buchenrieder * XXXX@XXXXX.COM * http://www.yqcomputer.com/ ~mibu
Lumber Cartel Unit #456 (TINLC) & Official Netscum
Note: If you want me to send you email, don't munge your address.