Forcing static address in 12.04

rikona rikona at
Mon Jun 8 04:42:41 UTC 2015

Hello Karl,

Sunday, June 7, 2015, 5:47:39 PM, Karl wrote:

> On Sun, 2015-06-07 at 15:30 -0700, rikona wrote:
>> I had to replace a failed router in the lan, and needed to temporarily
>> set a 12.04 box to dhcp. It had a fixed IP since installation. After
>> the router was configured, I tried to set it back to fixed, but can't.
>> The network window(s) let me set 'manual' to get a fixed address, BUT
>> the save button gets grayed out and the fixed IP can't be saved.

> Just to make sure that we know what's going on, could you please show
> us:
> - the output from "ifconfig | grep eth"

Just gives HW address, which is as expected.

> - the output from "grep eth /etc/udev/rules.d/70-persistent-net-rules"

no such file

> - the output from "grep eth /etc/network/interfaces"

auto eth0
iface eth0 inet static

but that's after the blow up, before it was different/dynamic

> Assuming you do actually have an eth0 interface, there are two main ways
> to give it a fixed IP address:

> Using network manager, the usual process would be roughly as follows:

> - in /etc/network/interfaces, make sure that eth0 is not mentioned, or
> that any lines that do mention it are commented out. Network manager
> will not manage any interfaces that are defined
> in /etc/network/interfaces.

that was how it was initially

> - right click on network manager applet at top right

After the blow up, it had some complaint about not having network
manager. Didn't get the exact error.

> - click on "edit connections"

> - locate the ethernet interface (usually at the top of the list)

> - if no connections are shown under "Ethernet", click the little
> triangle at left of the entry, that should drop down a list of available
> ethernet connections

> - click on "wired connection 1"

> - click on the "edit" button

> - in the edit dialogue, click on the "General" tab

> - check "automatically connect" and "all users may connect"

> - leave everything else alone in this tab

> - click on the click on "IPv4 settings" tab

> - select the "Manual" method

as soon as I do this the 'save' is grayed out

> - if any entries are shown, use the "Delete" button to remove them

I didn't try this - it was the only operating connection and I was

> - click the "Add" button

> - type your desired IPv4 address into the "Address field"

> - type the right netmask into the "Netmask" field (probably

> - type the right gateway address into the "Gateway" field

> - type the address of your nameserver into the "DNS Servers" field (you
> can put in more than one). If you don't know the right nameserver
> address, the address of your router will usually work.

> - if you want search domains, type them into the "search domains" field

> - check "require IPv4 addressing for this connection to complete"

> - click the "Save" button

> When you connect your ethernet interface to your network, it should come
> up with the desired IPv4 address.

> Alternative method:

> In /etc/network/interfaces, put something like this:

> auto eth0
> iface eth0 inet static
>    address
>    netmask
>    gateway
>    dns-nameservers

I tried this, with the right info, of course. This was in several net

I have a thought in retrospect - I copied from the net, then changed
parts but not all. Could it be that the EOL or other chrs caused

> Save the changes, then restart Network Manager:

>    sudo restart network-manager

got an error, didn't really understand it... didn't seem that bad

> Then bring up the interface manually:

>    sudo ifup eth0

this is when the box blew up

> If you don't make frequent changes to your network configuration, I'd
> recommend using the second method.

Doesn't look that good to me, given the result. :-)))

>> Most of the boxes FIPs are set by the router/mac address, and I'd prefer to do it
>> there if possible.

> If you want to do the fixed IP via a DHCP reservation in the router, and
> the router has already given the address out to some other device, then
> you will have to make sure that the other device is turned off, then
> reboot the router, then put in your reservation. The simplest way to do
> this is usually to just unplug everything from your switch except the
> desired device (your Linux box in this case), reboot the router, do the
> reservation, then plug everything else back in.

> Doing DHCP reservations on home routers is generally painful as they
> tend to have very primitive little DHCP servers.

Agreed, and some are better than others. Figured this one out -
operator error. One was supposed to be .....18 and I had it in as
.....8 which was an address conflict. Worked OK when I did it
correctly. Could have saved waiting 2+ hours on the phone too. [goes
away grumbling...]

Thanks for the suggestions...



More information about the ubuntu-users mailing list