LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices



Reply
 
Search this Thread
Old 02-22-2004, 07:51 AM   #1
acampbell
Member
 
Registered: Nov 2003
Location: London
Distribution: Debian
Posts: 116

Rep: Reputation: 16
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.
 
Old 02-22-2004, 08:42 AM   #2
neilcpp
Member
 
Registered: Jul 2003
Location: England
Distribution: Debian Wheezy, FreeBSD 10.0 anything *nix to get my fix
Posts: 328

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

 
Old 02-22-2004, 11:21 AM   #3
acampbell
Member
 
Registered: Nov 2003
Location: London
Distribution: Debian
Posts: 116

Original Poster
Rep: Reputation: 16
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.

 
Old 02-22-2004, 03:14 PM   #4
neilcpp
Member
 
Registered: Jul 2003
Location: England
Distribution: Debian Wheezy, FreeBSD 10.0 anything *nix to get my fix
Posts: 328

Rep: Reputation: Disabled
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.
 
Old 02-23-2004, 04:04 AM   #5
acampbell
Member
 
Registered: Nov 2003
Location: London
Distribution: Debian
Posts: 116

Original Poster
Rep: Reputation: 16
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
 
Old 02-23-2004, 11:08 AM   #6
paintcheck200
Member
 
Registered: Sep 2003
Location: Michigan
Distribution: Gentoo, Knoppix
Posts: 69

Rep: Reputation: 15
can you ping the loopback address on the desktop? 127.0.0.1
 
Old 02-23-2004, 12:46 PM   #7
acampbell
Member
 
Registered: Nov 2003
Location: London
Distribution: Debian
Posts: 116

Original Poster
Rep: Reputation: 16
Quote:
Originally posted by paintcheck200
can you ping the loopback address on the desktop? 127.0.0.1
Yes .

Last edited by acampbell; 02-23-2004 at 12:51 PM.
 
Old 02-23-2004, 06:26 PM   #8
beyer42
Member
 
Registered: Dec 2003
Location: San Jose
Distribution: Redhat WS 3
Posts: 410

Rep: Reputation: 30
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
 
Old 02-24-2004, 04:27 AM   #9
acampbell
Member
 
Registered: Nov 2003
Location: London
Distribution: Debian
Posts: 116

Original Poster
Rep: Reputation: 16
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.
 
  


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
How come I can ping between machines, but not get internet? ozymandias Linux - Networking 5 09-11-2005 05:20 PM
machines with different submasks can ping each other, why? learnfast Linux - Newbie 1 03-11-2005 10:11 AM
PPP establish can ping the gateway router but unable to ping the host deepalalla Linux - Networking 0 11-18-2004 10:10 AM
Ping between machines triplem Linux - Networking 1 04-14-2003 06:17 PM
Can't ping windows machines by hostname explorer Linux - Networking 10 03-06-2003 01:44 PM


All times are GMT -5. The time now is 01:11 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration