Page 1 of 1

Static IP Settings Fail [SOLVED}

Posted: Wed Feb 06, 2013 5:39 pm
by jackmason
Installed clean Mint 14 Cinnamon system on a virgin SSD drive. System comes up as 192.168.1.105 and Firefox works.

/etc/network/interfaces file was:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

I modified it to be:

# interfaces(5) file used by ifup(8) and ifdown(8)
#auto lo
#iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.252
netmask 255.255.255.0
gateway 192.168.1.1

then did "ifup eth0" to restart the connection. I got the message:

Lserver books # ifup -a -v
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
Configuring interface eth0=eth0 (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
ip addr add 192.168.1.252/255.255.255.0 broadcast 192.168.1.255 dev eth0 label eth0
RTNETLINK answers: File exists
Failed to bring up eth0.
run-parts --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/000resolvconf
run-parts: executing /etc/network/if-up.d/avahi-autoipd
run-parts: executing /etc/network/if-up.d/avahi-daemon
run-parts: executing /etc/network/if-up.d/ntpdate
run-parts: executing /etc/network/if-up.d/samba
run-parts: executing /etc/network/if-up.d/upstart
run-parts: executing /etc/network/if-up.d/wpasupplicant

If I restart the computer, it hangs for a while trying to get a response from the network, then comes up. The network is not operational when it finally comes up.

When I /etc/network/interfaces back to the way it was, everything works. All of the articles in the forums indicate the changes to /etc/network/interfaces I made should be all that was neeeed to create a static IP address.

What did I do wrong?

Thanks

Re: Static IP Settings Fail

Posted: Wed Feb 06, 2013 6:29 pm
by jackmason
Out of frustration, I again reboot the system. This time it came up and had the static IP address as it should be.

ifup failed again immediately before the reboot, so the file settings are apparently okay. It appears to be a quirk in ifup.

Re: Static IP Settings Fail [SOLVED}

Posted: Thu Feb 07, 2013 1:29 pm
by Detonate
Instead of running ifup try running

Code: Select all

sudo service networking restart
and that would have restarted the network with the settings you made in the interfaces file without having to reboot.