Network Manager does not connect the network adapter to a network with a DHCP server automatically

Bug #1059065 reported by Carla Sella on 2012-09-30
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Undecided
Unassigned

Bug Description

When I insert a network cable into my ethernet port, network manager does not automatically assign an IP to my network device eth0:
I was carrying out laptop testing on Networking - Cabled in Ubuntu Desktop amd64 for Quantal Beta 2 (http://laptop.qa.ubuntu.com/qatracker/milestones/239/builds/24437/testcases/894/results), I disabled wireless networking in Network Manager, inserted a network cable into my ethernet port, but no IP address is assigned to eth0.
I had to open terminal and insert this command:
 sudo ifconfig eth0 192.168.17.30 up
only after this did my wired network start working.
This is my hardware: http://wiki.ubuntu-it.org/CarlaSella/HP%20G62%20Notebook%20PC.

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: network-manager 0.9.6.0-0ubuntu7
ProcVersionSignature: Ubuntu 3.5.0-16.25-generic 3.5.4
Uname: Linux 3.5.0-16-generic x86_64
ApportVersion: 2.5.3-0ubuntu1
Architecture: amd64
CRDA:
 country VN:
  (2402 - 2482 @ 40), (N/A, 20)
  (5170 - 5250 @ 40), (N/A, 20)
  (5250 - 5330 @ 40), (N/A, 20), DFS
Date: Sun Sep 30 15:40:25 2012
IfupdownConfig:
 auto lo
 iface lo inet loopback
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Alpha amd64 (20120905.2)
IpRoute:
 default via 192.168.17.1 dev wlan0 proto static
 169.254.0.0/16 dev wlan0 scope link metric 1000
 192.168.17.0/24 dev wlan0 proto kernel scope link src 192.168.17.12 metric 9
NetworkManager.state:
 [main]
 NetworkingEnabled=true
 WirelessEnabled=true
 WWANEnabled=true
 WimaxEnabled=true
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: network-manager
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile..etc.NetworkManager.NetworkManager.conf: 2012-09-17T23:05:36.330751
nmcli-con:
 NAME UUID TYPE TIMESTAMP TIMESTAMP-REAL AUTOCONNECT READONLY DBUS-PATH
 BUFFALO-BD0F00 1ceceeb7-895a-43ad-800c-e671c9c8c45f 802-11-wireless 1349012428 Sun 30 Sep 2012 03:40:28 PM CEST yes no /org/freedesktop/NetworkManager/Settings/2
 AndroidCarla c861f07f-5da6-4ec5-aded-0f150f90196c 802-11-wireless 1348502860 Mon 24 Sep 2012 06:07:40 PM CEST yes no /org/freedesktop/NetworkManager/Settings/1
 AViLUG b3fb7913-913f-47cd-a3a8-9f6ebb2dcc63 802-11-wireless 1347395074 Tue 11 Sep 2012 10:24:34 PM CEST yes no /org/freedesktop/NetworkManager/Settings/0
nmcli-dev:
 DEVICE TYPE STATE DBUS-PATH
 eth0 802-3-ethernet disconnected /org/freedesktop/NetworkManager/Devices/1
 wlan0 802-11-wireless connected /org/freedesktop/NetworkManager/Devices/0
nmcli-nm:
 RUNNING VERSION STATE NET-ENABLED WIFI-HARDWARE WIFI WWAN-HARDWARE WWAN
 running 0.9.6.0 connected enabled enabled enabled enabled enabled

Carla Sella (carla-sella) wrote :
description: updated
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu laptop testing tracker.

A list of all reports related to this bug can be found here:
http://laptop.qa.ubuntu.com/qatracker/reports/bugs/1059065

tags: added: laptop-testing
Carla Sella (carla-sella) wrote :

I see this line in the modified Network Manager configuration file:
no-auto-default=C8:0A:A9:11:DE:0A,
This MAC address is my network card's.
I do not know how this got there, I'm attaching a screenshot of my wired configuration in Network Manager.

Carla Sella (carla-sella) wrote :

I commented the line:
no-auto-default=C8:0A:A9:11:DE:0A
in the file /etc/NetworkManager/NetworkManager.conf
stopped and restarted Network Manager and now when I insert the network cable in my ethernet port my network eth0 device get's an IP automatically from DHCP.
I do not undersand how the file /etc/NetworkManager/NetworkManager.conf got modified though.
Could it be some previous configuration in Network manager that, after beeing cancelled left something over in the configuration file ?

Carla Sella (carla-sella) wrote :

I tried this:

I turned off wireless network.
I went in Network Manager, modified my cabled network configuration from DHCP to fixed, entered an IP adress and everything else is needed to make my wired network work.
I turned detached my eth0 cable, turned on wirelss network, and canceled the wired configuration I had entered previously.
I turned off wireless network again and tried to plug in a network cable in my eth0 port.
I had the problem I reported at the beginning of this bug.
I took a look at the /etc/NetworkManager/NetworkManager.conf file and this is what is in it now:

[main]
plugins=ifupdown,keyfile
dns=dnsmasq

#no-auto-default=C8:0A:A9:11:DE:0A,

no-auto-default=C8:0A:A9:11:DE:0A,

[ifupdown]
managed=false

As you can see there is another line "no-auto-default=C8:0A:A9:11:DE:0A," that is not commented.
I think that, if you configure a wired network without DHCP in Network Manager and then cancel it the no-auto-default line remains in the configuration file and is not cancelled, so the next time you try to use DHCP you are not able to.

That is expected behavior; you'll want to create a new connection for fixed rather than modifying the default one. In any case, if the default dhcp connection is changed, you should have two connections so that standard DHCP can still work for wired.

Since this isn't a bug but expected behavior, I'm closing this report as "Invalid".

Changed in network-manager (Ubuntu):
status: New → Invalid
Carla Sella (carla-sella) wrote :

@ Mathieu
Thank you for the answer, I understand that you say that what happened to me is not a bug but the default behaviour.
But I am not sure I was clear explaining what happened.
I had a configuration for my wired network it was with a fixed IP, I then cancelled it so I did not have any connections configured anymore, I mean that in Network Manager the wired tab was empty, no configurations.
I thought that if there was no configuration in Network Manager, attaching a network cable to the ethernet port should make the eth0 device get an IP using DHCP.
I just want to be sure I explained myself clearly.

Changed in network-manager (Ubuntu):
status: Invalid → New
Carla Sella (carla-sella) wrote :

I marked the bug new, if what I wrote on comment #8 was understood correclty please mark the bug invalid again.
Thank you.

Got it, I understand what you mean now.

Unfortunately, the configuration is not "reset" if you delete all available connections, you'll likely want to go back to nm-applet and click on the wired device (a connection in nm-applet named "Auto ethernet" or something like it) to allow it to connect, which should create a new DHCP configuration.

In other words, after cancelling connections, when there is nothing listed in the Connection Editor, you'll want to go back to nm-applet and click on the "automatic" entry that should be there (you may need to disconnect and reconnect the cable for it to appear).

As far as I can tell, this properly handles the cases where someone deleted all the configurations, and allows one to recover from the customized connections being deleted. "no-auto-default" is required to avoid re-creating a default connection which would be automatically tried when a cable is connected.

Still, there doesn't seem to be a bug here, so I'm setting this back to Invalid.

Changed in network-manager (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers