Click to See Complete Forum and Search --> : cannot ping with hostname


Memo
01-15-2003, 05:44 PM
Can someone help:
First af all I am a Linux newbie.

The problem with my network setup is I cannot ping to other computers on the network by their hostname.
I cannot ping my hostname also.

I can ping other computers by IP, I already checked the resolv.conf file, the ip on the nameserver is right.

I don not have a static IP, I use DHCP.

Also I'm able to surf the internet.

I had on this machine Mandrake 8.2 installed and it was working fine, but when I installed Red Hat 7.2 it just stoped working.

Please help

Thanks in advanced.

ferreter
01-15-2003, 05:49 PM
Try adding the entries in the /etc/hosts file to be able to ping them by name.

neondog
01-15-2003, 05:50 PM
1. Can you ping the machine by the IP address?

2. Is a firewall running that blocks ICMP packets?

Memo
01-15-2003, 05:52 PM
Well the thing is that we are going to test it as a webserver, and the other computers on the network cant ping to the linux box by its name.

The box is getting an ip but cannot ping to other computers on the network

Memo
01-15-2003, 05:58 PM
neondog:

I can ping by ip on the network.

2. Is a firewall running that blocks ICMP packets?
I'm a linux newbie please explain ICMP.

I know the linux has no firewall.
But when mandrake was installes, I coulf ping on the network by hostname.

bwkaz
01-16-2003, 10:58 AM
ICMP is the protocol on top of IP that ping uses. It sends an ICMP "echo request" packet, and receives an ICMP "echo response" packet back. ICMP is a lot like TCP, except that it isn't intended for sending a lot of data, mostly control messages (router advertisement is another packet type, and there are others).

As far as the problem goes, what does your /etc/nsswitch.conf file look like? Specifically, the hosts, networks, protocols, services, and ethers lines?

Mine look like this:

hosts: files dns
networks: files

protocols: db files
services: db files
ethers: db files If you don't have dns on the hosts line, then the system won't even check the resolv.conf file's nameserver lines.

Memo
01-16-2003, 12:57 PM
checked
hosts: files dns nis

I also tried with host -a [somehostname]
and I get :

Trying "somehostname.DOMAINNAME.com."
Trying "somehostname."
Host rzfcxf. not found: 3(NXDOMAIN)
Received 99 bytes from **.***.***.***#53 in 2474 ms

any other files I should check ?