Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 15752  / 2 Years ago, thu, january 6, 2022, 1:30:14

In my 12.04 Precise install, when I boot the system, or when I plug in an ethernet cable, dhclient isn't run automatically on my wired eth0 connection. I have no running dhclient daemon. When I run dhclient manually it succeeds at pulling an address and configuring eth0 and the route table. It does output the following however :



jdoe@example:~$ sudo dhclient eth0
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service smbd reload

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the reload(8) utility, e.g. reload smbd


which indicates that it's an upstart managed thing. There are no upstart scripts in /etc/init/ for dhclient.



I'm running isc-dhcp-client version 4.1.ESV-R4-0ubuntu5.1, the current stable release.




  • Should dhclient be running all the time as a daemon on a standard 12.04 desktop install?

  • Is dhclient supposed to be launched during machine boot via upstart as the curious message I get when running dhclient suggests?

  • Should I have one of these ifplugd or netplug packages to launch dhclient when a cable is plugged into eth0?

  • Is dhclient instantiated by NetworkManager perhaps and not running at all times?

  • For a standard Ubuntu 12.04 install should NetworkManager have anything listed in the "Wired" tab of the Network Connections dialog? [example screenshot] I've both created a Wired connection profile and left it blank, neither affects dhclient being run



Other symptoms that I'm experiencing for context are :




  • NetworkManager doesn't gracefully manage when the wired and wireless connections are both connected, it merely uses the wireless

  • NetworkManager doesn't connect the VPN I have configured and sometimes try to use, over the wired network, it will only connect it over the wireless network.



@roadmr had asked for the content of /etc/network/interfaces :



# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
#NetworkManager#iface eth0 inet dhcp
# This is an autoconfigured IPv6 interface
iface eth0 inet6 auto

More From » 12.04

 Answers
2

When you power up the system, the first thing that should notice the Ethernet interface is the kernel. Based on the PCI ID, the kernel will try to load an appropriate driver for the card.



In your /var/log/syslog file you should see something like this:



Jun 21 09:54:59 snowflake kernel: [ 2600.056067] sky2 0000:03:00.0: eth0: Link is up at 1000 Mbps, full duplex, flow control rx
Jun 21 09:54:59 snowflake kernel: [ 2600.056731] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Jun 21 09:54:59 snowflake NetworkManager[1059]: <info> (eth0): carrier now ON (device state 20)
Jun 21 09:54:59 snowflake NetworkManager[1059]: <info> (eth0): device state change: unavailable -> disconnected (reason 'carrier-changed') [20 30 40]
Jun 21 09:54:59 snowflake NetworkManager[1059]: <info> Auto-activating connection 'Wired connection 1'.


This tells you that the kernel notifies NetworkManager about the device. What I think happens (just speculating here) is that the kernel notifies udev, udev in turn tells NetworkManager (who may be registered to receive udev events) and then NetworkManager handles the rest of the configuration.



Now, NetworkManager will refuse to manage any interface that's declared in /etc/network/interfaces. This is because it assumes that, if you configured it manually in that file, you want to manage it yourself.



So one way to get NetworkManager to manage your interface is to remove the entries in /etc/network/interfaces. That's why I asked you to add that data, so we can see if this is what's happening and maybe advise further. Of course, with the proper configuration even in /etc/network/interfaces, the interface should work well even without NetworkManager and without you having to do it manually every time. Still, the place to look at what may be happening is that file :)


[#37379] Friday, January 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
heaco

Total Points: 479
Total Questions: 124
Total Answers: 114

Location: Lesotho
Member since Sat, Oct 1, 2022
2 Years ago
;