Issue: IP address in Ubuntu gets cleared automatically after sometime [Solution]


I have set an ip address for eth0 interface in Ubuntu and it worked for a while. But after sometime, the IP address is automatically removed from the eth0 interface in-spite of having the entry for eth0 in /etc/network/interfaces file.

How to solve this issue?


It can happen if the Network Manager in Ubuntu is controlling the interfaces. Try removing the Network Manager and then restart the network service.

ip address ubuntu

Why ip address gets removed automatically in Ubuntu?

If you have network-manger installed, then it might cause an issue if IP address is manually set.

Remove the Network Manager from the system:

$ sudo  apt-get purge network-manager

Bring the eth0 interface up either by restarting the network service or using ifup command.

# ifup eth0


# /etc/init.d/networking restart

Since the Network Manager is removed, the IP address configured will remain as long as the entry for eth0 present in /etc/network/interfaces file.

Related Content
vps germany
Disclaimer: The content published in this article is the views of the author only. Techglimpse does not gurantee accuracy, completness or validity. If you believe the content on this post violates your copyright, please send us a mail for removal. Read more.