-   Linux - Networking (
-   -   name resolution problems (

vlyamtse 10-22-2011 06:16 AM

name resolution problems
I have to change name resolution for RedHat 5 system so that the name will be resolved to "real" IP address ( assigned to eth0) vs. loopback. I have dns server from my provider, so in /etc/nsswitch.conf resolution via /etc/hosts is first, and via dns service second
hosts: files dns

and I changed "/etc/hosts":
# is assigned to eth0 myhost

"hostname -f" now returns "" but is it enough to assume that name resolution working?
The application software still fails due to name resolution problems... Is there anything else i should do ?

Also, how can i set /etc/hosts name assignment for dynamic ( DHCP assigned) address, vs. static?
Thank you,

catkin 10-22-2011 10:39 AM

What is the application software and what is the error message it gives?

xywang 10-22-2011 01:26 PM

on your RH5 system if you get eth0 IP from DHCP you only need to put your hostname in entry along with the 'localhost'. like this, localhost your-rh5-hostname
/etc/hostname sets your hostname at boot time.
/etc/resolv.conf domain entry sets the dnsdomainname at boot time.
the name-to-ip lookup of your system local application will use the address, and for your remote application they need to relay on the DNS that is integrated with the DHCP where DHCP will dynamically update the DNS server on IP assignment and return.

All times are GMT -5. The time now is 08:27 AM.