# Static to DHCP configuration does not changes entry in host

**URL:** <https://forums.suse.com/t/static-to-dhcp-configuration-does-not-changes-entry-in-host/26513>\
**Category:** SLES Networking\
**Created:** [December 27, 2014, 4:06pm UTC](https://forums.suse.com/t/static-to-dhcp-configuration-does-not-changes-entry-in-host/26513 "2014-12-27T16:06:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![raxpatel](https://avatars.discourse-cdn.com/v4/letter/r/9d8465/32.png) [@raxpatel](https://forums.suse.com/u/raxpatel)\
**Post date:** [December 27, 2014, 4:06pm UTC](https://forums.suse.com/t/static-to-dhcp-configuration-does-not-changes-entry-in-host/26513/1 "2014-12-27T16:06:03Z")

</div>

Hi,

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.

Thank  
Rakesh

---

<div class="post-metadata">

**Author:** ![ab1](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@ab1](https://forums.suse.com/u/ab1)\
**Post date:** [December 27, 2014, 5:45pm UTC](https://forums.suse.com/t/static-to-dhcp-configuration-does-not-changes-entry-in-host/26513/2 "2014-12-27T17:45:09Z")

</div>

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:

```auto
sudo /sbin/netconfig -f update
```

openSUSE is supported in its own forums, at [https://forums.opensuse.org/](https://forums.opensuse.org/)  
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…
