View previous topic :: View next topic |
Author |
Message |
HeadHolio Guru
Joined: 10 Aug 2002 Posts: 445
|
Posted: Sun Aug 17, 2003 3:35 am Post subject: can't ping other computer |
|
|
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 |
|
|
dasalvagg Apprentice
Joined: 26 Jun 2002 Posts: 183 Location: NY
|
Posted: Sun Aug 17, 2003 6:11 am Post subject: |
|
|
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 |
|
|
Leander256 l33t
Joined: 05 Jul 2003 Posts: 910 Location: Singapour
|
Posted: Sun Aug 17, 2003 8:14 am Post subject: |
|
|
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 |
|
|
sieter Tux's lil' helper
Joined: 03 Jan 2003 Posts: 111
|
Posted: Sun Aug 17, 2003 12:06 pm Post subject: |
|
|
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 |
|
|
HeadHolio Guru
Joined: 10 Aug 2002 Posts: 445
|
Posted: Sun Aug 17, 2003 3:55 pm Post subject: followed suggestions.... |
|
|
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 |
|
|
|