Link to home
Start Free TrialLog in
Avatar of Don Smith
Don Smith

asked on

changing static ip on ubuntu 16.04 won't take

I have recently installed an Ubuntu 16.04 VHD image. Initially the /etc/network/interface file was empty. I put in the ip address info that I was provided by our network guy.
ifconfig showed eth0 as the interface name.
I edited the interface file to have the following:
auto eth0
iface eth0 inet static
address 10.100.1.6
gateway 10.100.0.1
submask 255.255.248.0
dns-nameservers .....

the network folks changed their minds and wanted to put my server on a different subnet.
I have edited the interface file.
auto eth0
iface eth0 inet static
address 10.99.0.6
gateway 10.99.0.1
submask 255.255.240.0
I have flushed the interface.
I have tried rebooting and actually shutting down the system.

but each time when I boot back up the interface continues to be configured with the old IP.

what am I doing wrong?
What do I need to do in order for the new IP to be loaded into the configuration?

Thanks in advance.
Avatar of Robert Kasinjeni
Robert Kasinjeni
Flag of Malawi image

Avatar of Don Smith
Don Smith

ASKER

I followed the instructions in the link.

the image didn't have network-manager installed.
resolv.conf already has my dns server ip's.
restarted network service
checked 'ip a'
still shows the old ip in the interface details.

any other suggestions?
I believe I found the issue.  I had a near duplicate named file. I'm not sure if it existed before or if I accidentally saved it as 'interface' instead of 'interfaces' but the interfaces file had the old ip info in it.

I tried to search for any file with the old ip address but I came up empty.
I tried :   find / * | grep "10.100.1.6"    but it came back empty yet the /etc/networking/interface file did have this string in it.

What did I do wrong in my search?
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.