Network reconfiguration silently does nothing

Asked by Me

I just installed 14.04 and let it do the default dhcp. Now I want to configure it properly. I use the System Settings and made the changes and nothing happened. I ran the "service network restart" command but apparently ubuntu thought networking was a better name, so I ran "service networking restart" and nothing happened. I went and looked in the init script and found that it was just silently quitting if "init_is_upstart". Silent fails are inexcusable, especially deliberate ones like that. I commented those out, but of course, that didn't change anything. In the modern age, one really should not have to reboot the system to get a simple reconfiguration to happen. I'd really like to move away from the Mac as a desktop, and so far, Ubuntu is the closest to being a usable desktop, but frustrations like this make it difficult. Not to mention various crashes and hangs...

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Me
Solved:
Last query:
Last reply:
Revision history for this message
Me (zgzx68-alan-kecsoh) said :
#1

Sorry my frustration got away from me, but there really is a question there: just how *do* you reconfigure without rebooting?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

Just use network manager. The settings will apply as you expect. What are you setting that DHCP cannot do for you?

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

Network reconfiguration on Ubuntu should be possible "on the fly" without any need to restart a demon or rebooting.
What "configure it properly" special settings do you need?
System settings - network should allow you to configure most network settings without too much effort.

Are you talking about a server, or do you have a desktop?
What network device(s) do you want to use? Cable-bound Ethernet or WLAN?

What is the output of the terminal commands
uname -a
lsb_release -a
sudo lshw -C network
ifconfig

Revision history for this message
Me (zgzx68-alan-kecsoh) said :
#4

It is my desktop which is used for system administration (mostly centos) so needs a static address for firewall permits as well sshing into it. The specifics of the configuration shouldn't matter though - the question is where is the standard way to reconfigure networking and have it take effect immediately and permanently, if such a thing exists?

A little more editorial: When there is something that says "Settings" you expect it to be your configuration tool, especially when it has a section for configuring the item you want to configure. Pretty much every other such tool makes those changes at some commit point, though often for embedded devices they do just reboot the device. If it's not going to do them immediately, it should say when they will take effect (e.g. "Apply" or "Reboot to have changes take effect"). Just silently doing nothing is not user friendly, which is surprising, because Ubuntu is generally the most user friendly of the linux desktops I've been trying. Things like having the shell tell you which package you need to install to run that command that isn't there is pretty nice for example.

Without the gui, I would expect to be able to edit /etc/network/interfaces and do a service networking restart and have everything reconfigure, but that simple, easy to use, capability has been lobotomized, and again, it just silently does nothing even though it knows someone's expecting something to happen at that point (you give it a command for a reason after all).

It seems like networking has been split into 3 or 4 places in ubuntu, with vestiges laying around here and there to confuse people who aren't used to it.

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

Using the network configuration dialogue in the system settings area should have done everything that you need (both configuring the network with immediate effect and storing the information in the configuration files for future use).
Editing configuration files is not the recommended way and definitely needs some kind of restarting (either the service or full rebooting) for the changes to take effect.

See also
https://help.ubuntu.com/community/NetworkAdmin
http://www.debianadmin.com/ubuntu-networking-for-basic-and-advanced-users.html
http://www.ubuntugeek.com/ubuntu-networking-configuration-using-graphical-tool.html

Revision history for this message
Me (zgzx68-alan-kecsoh) said :
#6

All three of those links are outdated, and two of them explicitly stated you can do "service networking restart" to get the changes to take effect, but in 14.04, the networking init script explicitly quits "if init_is_upstart". It looks like ubuntu is halfway to switching to some entirely different setup because the systemd mess wasn't good enough ;-)

I'll just mark this as solved with the answer being: you either run ifconfig manually or reboot immediately if you want to make sure that your changes will work after the next reboot.