Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I usually run with eth0 config'd statically from info in /etc/network/interfaces, but sometimes need to use a dhcp acquired config. Running dhclient just tells me it's now an upstart job and suggests running reload, but reload dhclient responds 'Unknown job: dhclient.'

How can I make it run?

share|improve this question
add comment

2 Answers 2

Configuring an interface to use DHCP (client), just put this in your /etc/network/interfaces:

auto eth0
iface eth0 inet dhcp

to avoid NetworkManager managing it. Restart NetworkManager to pick up on that:

# service network-manager restart

If you need to run dhclient manually after configuring it yourself using ifconfig or ip commands, you just can and I don't see how upstart is involved here.

For example:

Have it configured manually in /etc/network/interfaces:

auto eth0
iface eth0 inet manual

Then the interface is down by default,

# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr b4:b5:2f:xx
          BROADCAST MULTICAST  MTU:1500  Metric:1

so, bring it up with

# ifconfig eth0 up
# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr b4:b5:2f:xx
          UP BROADCAST MULTICAST  MTU:1500  Metric:1

and start dhclient:

# dhclient eth0
# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr b4:b5:2f:xx
          inet addr:192.168.0.134  Bcast:192.168.0.255  Mask:255.255.255.0
share|improve this answer
add comment

While everything gertvdijk says is true, the warning message is also real:

# 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
#

It doesn't keep the command from working though.

share|improve this answer
    
The question is about a different message: Unknown job: dhclient. So I believe the OP runs service dhclient start or alike. –  gertvdijk Jan 26 '13 at 10:01
    
Where does the output from dhclient go? –  dep May 24 '13 at 1:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.