1834646 Members
1931 Online
110069 Solutions
New Discussion

Re: /etc/hosts modifed

 
Kenn Chen
Advisor

/etc/hosts modifed

i have modified my host file with new IP address but i try to ping the hostname it still ping to old ip address.
Cyber Zen
5 REPLIES 5
Deepak Extross
Honored Contributor

Re: /etc/hosts modifed

Do you have a DNS entry for the server?
Try doing a 'nslookup '.
Deepak Extross
Honored Contributor

Re: /etc/hosts modifed

Stefan Saliba
Trusted Contributor

Re: /etc/hosts modifed

Check out the order of the Nameserver switch configuration. You can check this from SAM under Networking and Communications.

It may be set to check DNS then /etc/hosts. Change the order.

To be sure you can also edit the file /etc/resolv.conf and hash out any line referring to a DNS server.

Good luck stefan
Sebastian Galeski_1
Trusted Contributor

Re: /etc/hosts modifed

Is this new address in tis same subnet???
Check resolving /etc/resolv.conf
nslookup ip_address
nslookup name
check how is configured: /etc/nsswitch.conf if is not try to creste /etc/nsswitch.conf with next entry
hosts: files [NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=continue TRYAGAIN=return]
everything in one line

hope it help
Rita C Workman
Honored Contributor

Re: /etc/hosts modifed

Because I have had someone do this...

When you modified the /etc/hosts...did you do a search to ensure that the name or IP is not referenced elsewhere? Is it possible the name or alias is duplicated elsewhere in the host file?

When you do nslookup by IP and then by name you should get the same results..and they should be the results you expect..

Just a thought,
Rita