Static to DHCP configuration does not changes entry in host


In Open Suse 12.2, when you have static IP configuration, /etc/hosts contains IP(for example a.b.c.d) and hostname entry. and everything working fine.

But when you set DHCP IP configuration using yast, new IP is retrieved from DHCP server and internet is also working fine.

But for DHCP /etc/hosts still contain previous IP - Hostname mapping of Static IP configurations.

So because of this, when you do nslookup for hostname, it will display static IP instead of DHCP ip.

I think, this is problem, Yast should remove entry from /etc/hosts file.


A couple of things:

openSUSE 12.2 is very old; 13.2 is current.

When I ran 12.2 I did not notice what you are reporting, but you may want
to try running the following to see if it helps:

sudo /sbin/netconfig -f update

openSUSE is supported in its own forums, at
Please post there, likely in the networking subforum, if you need further
help with openSUSE.

Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…