Ubuntu 14.04 -- I cannot change IP from dynamic to static address

Hello Experts,

I am having a strange situation with my newly install Ubuntu workstation. I cannot change the IP address using the GUI.

I am trying to change from dynamic to static IP address.

I tried a few things such as text editing  this:

sudo vi /etc/network/interfaces

"auto eth0
iface eth0 inet static
        address 192.168.1.100
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1"

What is it that I need to keep in mind to do this please?

Do I need to remove the dhcp client?
marceloNYCMiddle-Tier AdministratorAsked:
Who is Participating?
 
marceloNYCMiddle-Tier AdministratorAuthor Commented:
I did what you said and no luck... Still wit5h the DHCP address
0
 
Rezwan IslamSystems AdministratorCommented:
Hi,
What IP do you see registered under eth0 when you run "ifconfig -a eth0"?
No, you do not need to remove dhcp client.
The settings on the /etc/network/interfaces file is right, you only need the following lines to make it work though.

auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1

and make sure you reload network by using the following and not by “service networking start|stop|restart” as this will not work (this is a bug in 14.04). You can restart Ubuntu box to make this happen anyway.

$sudo ifdown eth0 && sudo ifup eth0
0
 
marceloNYCMiddle-Tier AdministratorAuthor Commented:
It worked....

Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.