I have create a connection from network manager GUI with wired connection and in IPv4 setting tab, with all details like IP address,netmask,gateway and DNS server.

Also change the /etc/network/interface file with below details:

auto eth0
iface eth0 inet static
address 172.xx.xxx.xxx
netmask 255.255.xxx.x
gateway 172.xx.xxx.x
dns-nameservers 172.xx.x.x

After restarting the machine I got the network connected and from ifconfig output got the IP address as I provided in network manager GUI or in interfaces file.

But the main issue is,this internet connection got disconnected after 10/15 mins. And this time ip address got change to dynamic ip like 169.XXX.XXX.XXX.

Please help me to resolve this issue.


Nuke /var/lib/dhcp3/dhclient.leases.

If that doesn't work, make sure you're not running Network Manager (I'm assuming this is a headless server so I don't expect it to be), WICD or any other network-managing interferer.

If you have NM (et al) and need it, just teach it the same settings as your main /etc/network/interfaces config. Bit hacky but it should do the trick.

  • Err... how do I undo the nuking? Is there a copy of that file anywhere? – UniversallyUniqueID Mar 23 '16 at 2:32

The problem is that NetworkManager will over ride your settings in /etc/network/interface

Easiest method of configuring your ip address DNS servers is to use NetworkManager

Use "manual method".

Under IPv4, fill in your ip address, netmask, dns server(s), etc

enter image description here

Your other option, if you want to use /etc/network/interface, would be to disable network manager.

If you are still having a problem, check the logs to see if there is a clue as to why your network connection is being dropped and/or post more information on your hardware.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.