LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Ping working in one direction only (https://www.linuxquestions.org/questions/linux-networking-3/ping-working-in-one-direction-only-4175439585/)

crs17 12-01-2012 09:19 AM

Ping working in one direction only
 
I have a simple three node wireless linux network as follows:

hostname IP notes
crs 192.168.0.101 laptop
cuda-host 192.168.0.100 desktop
192.168.0.103 wireless router ethernetted to WIFI modem

/etc/hosts on crs and cuda-host look like:
--->
127.0.0.1 localhost
127.0.1.1 crs -or- cuda-host
192.168.0.101 crs
192.168.0.100 cuda-host
<---
From crs I can ping (and ssh) cuda-host but from cuda-host I can't ping (or ssh) crs. Instead I get:
--->
craig@cuda-host:~$ ping crs
PING crs (192.168.0.101) 56(84) bytes of data.
From cuda-host (192.168.0.100) icmp_seq=1 Destination Host Unreachable
From cuda-host (192.168.0.100) icmp_seq=2 Destination Host Unreachable
From cuda-host (192.168.0.100) icmp_seq=3 Destination Host Unreachable
<----
doing arp-scan from cuda-host I don't see crs. What I get is:
---->
craig@cuda-host:~$ sudo arp-scan -I wlan0 -l
Interface: wlan0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.8.1 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)
192.168.0.1 1c:af:f7:cc:85:cb D-LINK INTERNATIONAL PTE LIMITED
192.168.0.103 50:63:13:c1:7d:f5 Hon Hai Precision Ind. Co.,Ltd.

2 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.8.1: 256 hosts scanned in 1.781 seconds (143.74 hosts/sec). 2 responded
<-----
D-LINK is my wireless modem. I thought .103 was my wireless modem. have never heard of the company Hon Hai. Arp-scan looks similar on crs

Any idea what's going on here?

Thanks,

Craig

business_kid 12-01-2012 10:36 AM

Quote:

/etc/hosts on crs and cuda-host look like:
--->
127.0.0.1 localhost
127.0.1.1 crs -or- cuda-host
192.168.0.101 crs
192.168.0.100 cuda-host <---
I don't like that.
It's good to have the 192.168.x network in /etc/hosts (Uf the IPs are static) but I would not list a box by it's ip and 127.0.0.1. Hosts is for other boxes.

There are 3 boxes, so three lines in /etc/hosts
127.0.0.1 line
router line
other box line (crs on cuda-host; cuda-host on crs)

jefro 12-01-2012 02:24 PM

Ping is a two way test. It proved what you wanted to know in the first test. That being a connection. The things that could stop it are the ability to offer or accept icmp. That could include the host, client or any device in between or firewalls or ports.


All times are GMT -5. The time now is 10:24 AM.