How can I apply static IP settings system-wide with Network Manager?

Asked by metale

Binary package hint: linux-backports-modules-intrepid

Ubuntu 8.10

Likewise-open can't connect to domain controller before first login enables the network.

Therefore, I have to login 1st as a local user (which enables networking via network manager), restart the likewise-open process, logoff and then I can login correctly with likewise-open.

Shouldn't full networking be enabled before login? I can't even ping that computer until it is logged in.

I expected to be able to ping that computer / use likewise open before having to localy login to enable network.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu network-manager Edit question
Assignee:
No assignee Edit question
Solved by:
metale
Solved:
Last query:
Last reply:

This question was originally filed as bug #304496.

Revision history for this message
Chris Coulson (chrisccoulson) said :
#1

I don't think this is a kernel bug. Re-assigning to network-manager.

Could you please attach your /var/log/daemon.log and /var/log/messages after a fresh boot?

Thanks

Revision history for this message
metale (joaorafael-iol) said :
#2
Revision history for this message
metale (joaorafael-iol) said :
#3

Here they go.

Revision history for this message
metale (joaorafael-iol) said :
#4

Sorry, had to cut out old log lines.

Revision history for this message
metale (joaorafael-iol) said :
#5
Revision history for this message
Chris Coulson (chrisccoulson) said :
#6

Thanks. How come you added the linux-meta task again?

I've had a look at your logs, and this looks like a configuration issue rather than a bug. When your computer first boots, Network Manager tries to activate your network connection using DHCP (because this is your system-wide setting, and is also the default). However, this fails (presumably because you don't have a DHCP server on your network?), as indicated by the following entries in your log:

Dec 4 10:20:14 estagiario1 NetworkManager: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) complete.
Dec 4 10:20:14 estagiario1 dhclient: Internet Systems Consortium DHCP Client V3.1.1
Dec 4 10:20:14 estagiario1 dhclient: Copyright 2004-2008 Internet Systems Consortium.
Dec 4 10:20:14 estagiario1 dhclient: All rights reserved.
Dec 4 10:20:14 estagiario1 dhclient: For info, please visit http://www.isc.org/sw/dhcp/
Dec 4 10:20:14 estagiario1 dhclient:
Dec 4 10:20:14 estagiario1 NetworkManager: <info> DHCP: device eth0 state changed (null) -> preinit
Dec 4 10:20:14 estagiario1 dhclient: Listening on LPF/eth0/00:0c:f1:7f:47:05
Dec 4 10:20:14 estagiario1 dhclient: Sending on LPF/eth0/00:0c:f1:7f:47:05
Dec 4 10:20:14 estagiario1 dhclient: Sending on Socket/fallback
Dec 4 10:20:15 estagiario1 dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
Dec 4 10:20:15 estagiario1 avahi-daemon[4635]: Registering new address record for fe80::20c:f1ff:fe7f:4705 on eth0.*.
Dec 4 10:20:15 estagiario1 gdmgreeter[5138]: Gtk-WARNING: Incapaz de localizar motor de temas na module_path: "ubuntulooks",
Dec 4 10:20:19 estagiario1 dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
Dec 4 10:20:23 estagiario1 dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
Dec 4 10:20:28 estagiario1 dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
Dec 4 10:20:37 estagiario1 dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 17
Dec 4 10:20:54 estagiario1 dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14
Dec 4 10:20:59 estagiario1 NetworkManager: <info> Device 'eth0' DHCP transaction took too long (>45s), stopping it.
Dec 4 10:20:59 estagiario1 NetworkManager: <info> eth0: canceled DHCP transaction, dhcp client pid 5139
Dec 4 10:20:59 estagiario1 NetworkManager: <info> Activation (eth0) Stage 4 of 5 (IP Configure Timeout) scheduled...
Dec 4 10:20:59 estagiario1 NetworkManager: <info> Activation (eth0) Stage 4 of 5 (IP Configure Timeout) started...
Dec 4 10:20:59 estagiario1 NetworkManager: <info> (eth0): device state change: 7 -> 9
Dec 4 10:20:59 estagiario1 NetworkManager: <info> Marking connection 'Auto eth0' invalid.
Dec 4 10:20:59 estagiario1 NetworkManager: <info> Activation (eth0) failed.

When you log in, the network activates because it seems that you have set up a static IP in your users network settings. This setting hasn't been made system-wide, which is why your network doesn't work until you log in

Could you please confirm that this is how you have your network settings configured?

Revision history for this message
metale (joaorafael-iol) said :
#7

Sorry about the linux-meta task, it was my error. The site asked me about it and I clicked it... dumb me.

Yes, the server does not have DHCP enabled. The computer is setup as static IP. How can I make that system-wide or where can I learn how to?

Revision history for this message
Chris Coulson (chrisccoulson) said :
#8

I'm not sure how to do it really, but I know network manager can be configured system-wide. I'll convert this bug report in to a support request where you'll probably get help from someone who knows how to do it.

Revision history for this message
Steven Danna (ssd7) said :
#9

Try the following:

(1) Right-Click on the Network Manager Icon.
(2) Click on "Edit Connections"
(3) Click on the "Add Connection"
(4) Give the Connection a Name
(5) Check "System Setting"
(6) Go to the IPv4 tab and then select "Manual" rather than "DHCP"
(7) Put in your desired settings.
(8) Click "OK"

I can't really test these directions; however, unless I am misunderstanding what you want to do, I think that should work for you.

Revision history for this message
metale (joaorafael-iol) said :
#10

I had to do it this way:

1- Edit the "auto" connection on the network manager, turn off "start automatically" and "system setting";
2- Only then would the static IP connection accept the "system setting" parameter.

It works now. Thanks everyone.

Revision history for this message
MrSato (shawn-satoveillon) said :
#11

Awesome, thanks metale! I've been fighting this for a week! This fixed it for me as well. I already had a profile for the static config, in addition to the auto eth0, so I could switch to it upon login. Even when I deleted the auto eith0 profile it always returned. configurations in the auto eth0 would never stick.

THIS IS A BUG! No one can convince me otherwise. Imagine a someone new to Ubuntu installing Ubuntu on their PC and trying to configure their network and every time they reboot it loses the configuration. The process metale and I had to do is not acceptable. Any would-be windows converts are going to deal with that for about a day and go back to XP or Vista. Plus, it was fine in 8.04.

Revision history for this message
Serrano Pereira (serrano-pereira) said :
#12

(5) Check "System Setting"

I can't find that option anywhere on Ubuntu 9.10 Karmic. Is this the same as "Avaiable to all users"? Could someone point me in the right direction?

1- Edit the "auto" connection on the network manager, turn off "start automatically" and "system setting";

What "auto" connection? There are about 5 connections in my network manager that start with "Auto". But no option "System Setting" is available anywhere.

Revision history for this message
Serrano Pereira (serrano-pereira) said :
#13

Well, I think I figured it out. It seems to work now after doing the following steps on Ubuntu 9.10 Karmic:

1) Right-Click on the Network Manager Icon.
2) Click on "Edit Connections"
3) Uncheck "Connect Automatically" and "Available to all users" from all connections in the network manager.
3) Click on the "Add" to add a new connection.
4) Give the Connection a Name (e.g. "System Setting")
5) Enter all your connection settings (e.g. Static IP, etc)
6) Check both "Connect Automatically" and "Available to all users" for this connection only.
7) From now on, you'll be asked for the root password when editing this connection.
8) Click "Apply..."
9) Check if the new connection works ok by selecting it.

After reboot, the connection should be established before login.