LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   Cannot ping between 2 machines on same router (https://www.linuxquestions.org/questions/linux-wireless-networking-41/cannot-ping-between-2-machines-on-same-router-149092/)

acampbell 02-22-2004 06:51 AM

Cannot ping between 2 machines on same router
 
I have two computers, desktop and notebook, connected to a router. The desktop (arcadia) is connected by cable; the notebook (mimosa) is connected by wireless link.

Both are reaching the internet without problems. I would like to set up ssh to connect between them but I cannot even ping between them. Turning the firewalls off does not help.

I have no idea where to begin looking for the problem here.

neilcpp 02-22-2004 07:42 AM

two basic checks you should make:

1. Subnet addresses. Check that both machines have static IP addresses within the same subnet range e.g 10.10.10.5 & 10.10.10.6.
If you have both machines set to get IP address automatically by DHCP, the local network connection you want will not work.

2. Netmask settings. Assuming your subnet addresses are ok, you need to ensure that both machines have the same netmask settings. If you only have a small home network, this is usually going to be:
netmask 255.255.255.0.

:Pengy:

acampbell 02-22-2004 10:21 AM

Quote:

Originally posted by neilcpp
two basic checks you should make:

1. Subnet addresses. Check that both machines have static IP addresses within the same subnet range e.g 10.10.10.5 & 10.10.10.6.

Should be OK: 192.168.0.20 and 192.168.0.21.

If you have both machines set to get IP address automatically by DHCP, the local network connection you want will not work.

No, I don't have DHCP running.

2. Netmask settings. Assuming your subnet addresses are ok, you need to ensure that both machines have the same netmask settings. If you only have a small home network, this is usually going to be:
netmask 255.255.255.0.

This is what I have.

:Pengy:


neilcpp 02-22-2004 02:14 PM

Can you say if either or both machines have linux? Also, how do you connect to the internet?

It would be helpful if you could post the results of the command 'ifconfig -a' from both of your machines.

acampbell 02-23-2004 03:04 AM

Quote:

Originally posted by neilcpp
Can you say if either or both machines have linux? Also, how do you connect to the internet?

It would be helpful if you could post the results of the command 'ifconfig -a' from both of your machines.

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

Yes, both are running linux Debian - no Windows.

Oddly enough, I can now ping from the laptop to the desktop though not the reverse. But ssh does not work in either direction (i.e. does not connect at all).

Desktop ifconfig -a:

eth0 Link encap:Ethernet HWaddr 00:0B:2B:02:32:FB
inet addr:192.168.0.20 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:122990 errors:0 dropped:0 overruns:0 frame:0
TX packets:129853 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:35541283 (33.8 MiB) TX bytes:11633328 (11.0 MiB)
Interrupt:11

gre0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:1476 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:0
RX bytes:0 (0.0 b) TX bytes:0 (0.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:2138 errors:0 dropped:0 overruns:0 frame:0
TX packets:2138 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:194032 (189.4 KiB) TX bytes:194032 (189.4 KiB)

tunl0 Link encap:IPIP Tunnel HWaddr
NOARP MTU:1480 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:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
--------------------------------------------------
Laptop ifconfig -a

eth0 Link encap:Ethernet HWaddr 00:40:96:44:E9:53
inet addr:192.168.0.21 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:54992 errors:17330 dropped:0 overruns:0 frame:17330
TX packets:36121 errors:1 dropped:0 overruns:0 carrier:0
collisions:12870 txqueuelen:1000
RX bytes:48403696 (46.1 MiB) TX bytes:3260904 (3.1 MiB)
Interrupt:3 Base address:0x100

gre0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:1476 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:0
RX bytes:0 (0.0 b) TX bytes:0 (0.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:476 errors:0 dropped:0 overruns:0 frame:0
TX packets:476 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:56416 (55.0 KiB) TX bytes:56416 (55.0 KiB)

tunl0 Link encap:IPIP Tunnel HWaddr
NOARP MTU:1480 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:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

wifi0 Link encap:UNSPEC HWaddr 00-40-96-44-E9-53-00-00-00-00-00-00-00-00-00-00
BROADCAST MULTICAST MTU:2312 Metric:1
RX packets:54992 errors:17330 dropped:0 overruns:0 frame:17330
TX packets:36121 errors:1 dropped:0 overruns:0 carrier:0
collisions:12870 txqueuelen:100
RX bytes:48403696 (46.1 MiB) TX bytes:3260904 (3.1 MiB)
Interrupt:3 Base address:0x100

paintcheck200 02-23-2004 10:08 AM

can you ping the loopback address on the desktop? 127.0.0.1

acampbell 02-23-2004 11:46 AM

Quote:

Originally posted by paintcheck200
can you ping the loopback address on the desktop? 127.0.0.1
Yes .

beyer42 02-23-2004 05:26 PM

Please output netstat -rn for both machines.

The gateway setting for both machines should be the router IP address.

just a sidenote: you mentioned the laptop is connected via wireless, but I just see eth0 as device configured to 192.168.0.21

acampbell 02-24-2004 03:27 AM

Quote:

Originally posted by beyer42
Please output netstat -rn for both machines.

The gateway setting for both machines should be the router IP address.

It is - on both:

Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0



just a sidenote: you mentioned the laptop is connected via wireless, but I just see eth0 as device configured to 192.168.0.21

You are right about this, though it seemed to work. However I have reset the IP to that which is set in the router for the wireless card (192.168.0.22). This works too, although I can still ping only from the laptop to the desktop and cannot ssh either way.


All times are GMT -5. The time now is 12:06 AM.