Ping by hostname

Hello everyone

I have a partition with a problem with ping.

If I do a ping by ip for example ping 1.1.1.1 I got no problem but If I ping by hostname for example ping partition1 take almost a minute to respond me.

I have Aix 5.3 and I have another 19 partitions with no problem. The only one is this one. all of them with Aix 5.3

The network area told me that we dont have own DNS.

Do you have some tips or which files check. In the resolv.conf I got the dns name even we dont have one.

Thanks in advance for your comments

check if /etc/resolv.conf is empty / not available, if it exists move it away, to /etc/resolv.conf.bkp for example (just if you are 100% sure you don't have DNS)

perhaps you are using ldap/nis for name resolution?
check /etc/netsvc.conf

you need one entry for hosts, should be
hosts=local4

which means Name resolution comes from /etc/hosts file (IPv4)

I agree with funksen: name resolution is a staged process and you could configure it to first ask a nameserver (or several nameservers successively) and only then consult the local "/etc/hosts" file.

If the system is configured to try using a nameserver which doesn't exist this would account for the time it takes to resolve the hostname.

I hope this helps.

bakunin

Thanks for your comments funksen and bakunin

I have one question which files I need to check por to see "If the system is configured to try using a nameserver"

I add the line hosts=local4 in the /etc/hosts.

And I dont use ldap or nis name resolution but in my file /etc/netsvc.conf I have this hosts=bind4,local

I have to put the dns on the /etc/resolv.conf because If I dont do this, when I try to login takes some time (like a minute) to let me in the server. but this dns not are own

Thanks for your tips again

change

hosts=bind4,local

to

hosts=local4,bind4

and remove the line

hosts=local4

and everything should be fine

and check if the host(s) you want to ping really are in the /etc/hosts file

take a look at the entry

"nameserver" in /etc/resolv.conf and ask you network team if they are still valid

Thanks for your comments

It works.