Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have 2 computers with Linux running on them:

  • ip: 192.168.0.1 hostname: COMPUTER1
  • ip: 192.168.0.2 hostname: COMPUTER2
  • ip: 192.168.0.3 the router

I configured the /etc/hostname files with the corresponding hostname on both computers.
I also configured the /etc/hosts files:

127.0.0.1   localhost.localdomain   localhost COMPUTER1  
::1         localhost.localdomain   localhost COMPUTER1

And I did the same thing with COMPUTER2 for the second computer.
The IP adresses are provided from the router via DHCP. On both computers the DNS server is the router: /etc/resolv.conf

nameserver 192.168.0.3

I can ping 192.168.0.2 from COMPUTER1 and COMPUTER2.
I can ping COMPUTER1 from itself but I can't ping COMPUTER1 from COMPUTER2.

Does anyone know how to solve it?

share|improve this question
1  
did you add the names COMPUTER1 and COMPUTER2 to the other host's host file or the routers DNS zone? it looks like as it stands now, only the localhost can resolve COMPUTER1 or COMPUTER2. –  Frank Thomas Jun 20 '13 at 15:58
    
I added them to the /etc/hostname and /etc/hosts files on both computers. And I don't know what the routers DNS zone is. –  Nicolas Jun 20 '13 at 16:00
    
may be being pedantic, but to clarify, the host file on COMPUTER1 has a line for COMPUTER2 with the IP 192.168.0.2 ? –  Frank Thomas Jun 20 '13 at 16:01
    
If you setup the IP and Default gateway properly, then it should work. Can you see if you have iptables on both machines are running or not? –  user2480011 Jun 20 '13 at 16:01
    
whats your router model? if possible, adding the hosts to its zone is the best possible solution. –  Frank Thomas Jun 20 '13 at 16:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.