Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
can't ping other computer
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
HeadHolio
Guru
Guru


Joined: 10 Aug 2002
Posts: 445

PostPosted: Sun Aug 17, 2003 3:35 am    Post subject: can't ping other computer Reply with quote

Okay, for no reason today, my two computers no longer recognise each other on the network. They can both ping themselves, but not each other. I think it may be a problem with the crossover cable connecting them but I'm not sure. Is there any way to be sure? I'd hate to purchase a new 75' crossover cable for nothing.

Here's my setup:

Box 1 is a Gentoo gateway with two NICs that both report to be working fine. eth0 connects to the internet fine, and eth1 restarts without a problem.

Box 2 is an XP machine with a standard NIC that reports to be fine in the Device Manager.

All NICs between the two boxes light up when the cable is plugged into them.

Here's the output from ifconfig:

Code:
eth0      Link encap:Ethernet  HWaddr 00:07:95:28:D9:CA
          inet addr:24.57.15.224  Bcast:255.255.255.255  Mask:255.255.240.0
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:28405 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1725 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:3228872 (3.0 Mb)  TX bytes:251825 (245.9 Kb)
          Interrupt:5 Base address:0xd400

eth1      Link encap:Ethernet  HWaddr 00:05:5D:E9:8D:B2
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:11 Base address:0xd000

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:26 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2496 (2.4 Kb)  TX bytes:2496 (2.4 Kb)


Here's my /etc/conf.d/net file:

Code:

iface_eth1="192.168.0.1 netmask 255.255.0.0"
iface_eth0="dhcp"

# Net Sharing
echo 1 > /proc/sys/net/ipv4/ip_forward
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
/sbin/iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
/sbin/iptables -A INPUT -i lo -j ACCEPT
/sbin/iptables -A INPUT -j LOG --log-level 4 --log-prefix "ATTACK"
/sbin/iptables -A INPUT -j DROP
# Add your additional rules here
/sbin/iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE


And of course, the XP machine is configured with the IP address of 192.168.0.3 and a default gateway of 192.168.0.1.
Back to top
View user's profile Send private message
dasalvagg
Apprentice
Apprentice


Joined: 26 Jun 2002
Posts: 183
Location: NY

PostPosted: Sun Aug 17, 2003 6:11 am    Post subject: Reply with quote

setup looks fine....try switching eth0 and eth1 and see if you have the same problem. at least that way you can rule out one ethernet card. there are tools you can buy to test a cable, but I doubt it would be worth it. you could try to capture packets on one maching and ping with the other. you may pick up some weird arp stuff. otherwise.....it might be the cable.
Back to top
View user's profile Send private message
Leander256
l33t
l33t


Joined: 05 Jul 2003
Posts: 910
Location: Singapour

PostPosted: Sun Aug 17, 2003 8:14 am    Post subject: Reply with quote

Did you check that XP uses 255.255.0.0 as netmask for its network card? I'm pretty sure it puts 255.255.255.0 as a default value, and different netmasks usually prevent network to function properly.
Back to top
View user's profile Send private message
sieter
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2003
Posts: 111

PostPosted: Sun Aug 17, 2003 12:06 pm    Post subject: Reply with quote

I think there is something wrong with your
netmask and broadcast - adresses:

Bcast:192.168.0.255 Mask:255.255.0.0

with that netmask, try broadcast 192.168.255.255

or, as you use only 2 PC's anyway try netmask 255.255.255.0,
which windows uses by default, if I remember it right...
Back to top
View user's profile Send private message
HeadHolio
Guru
Guru


Joined: 10 Aug 2002
Posts: 445

PostPosted: Sun Aug 17, 2003 3:55 pm    Post subject: followed suggestions.... Reply with quote

First, thanks for the quick replies and suggestions. Here's what I tried...

First I switched the cables for the two NICs in my gentoo box. This would allow me to ping the XP machine (the crossover cable works!), but wouldn't allow me to connect to the internet. I now realised that my problem was with my second ethernet card in my Gentoo box (D-Link DFE-530TX). So I then swapped it with the ethernet card in the XP machine, and it didn't work there either (both machines could no longer ping each other, although the D-Link card reported to be working fine in the XP machine according to the Device Manager). I then swapped the same cards again but this time placed the supposedly dead D-Link card in a different PCI slot in the Gentoo box. Low and behold, everything works again (although I'm not sure for how long).

Well, at least if this happens again anytime soon I'll know that I'll need to purchase a new NIC and not a 70' crossover cable. Thanks for your help guys, I love these forums.

:)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum