Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 8.8.8.8 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.

share|improve this question

2 Answers 2

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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