Static IP Settings Fail [SOLVED}

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
jackmason

Static IP Settings Fail [SOLVED}

Post 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
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
jackmason

Re: Static IP Settings Fail

Post 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.
Detonate

Re: Static IP Settings Fail [SOLVED}

Post 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.
Locked

Return to “Networking”