Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've been trying to find out with the man page and some other sources if the exit status doesn't necessarily mean you achieved an address but I'm thinking I maybe didn't read it correctly. Does anyone know why dhclient would still exit with status 0 if it doesn't think I'm connected to a network? RHEL 6 seems to have some serious network issues.

Mostly I'm just confused as to whether or not I'm reading what the exit status is supposed to mean here.

I run 'dhclient eth0' Nothing returns in stdout. Yes where I am plugging in has DHCP set up correctly.

I should mention that if I pop in Fedora 13 live disc and drop to bash I can do the exact same steps and get on the network just fine. The only difference being that I used Fedora 13 rather than RHEL 6 disc.

share|improve this question
    
Are you calling dhclient with any parameters? Is it emitting any output? Are you actually connected to a network with a DHCP server? Do you have a cached lease? –  Gilles Mar 1 '11 at 21:00
    
I just edited the main description but my only param is 'eth0.' There's no output. Yes, I know the network is setup with DHCP, when not using RHEL 6 (live-disc or otherwise) dhclient works just fine. –  jphenow Mar 1 '11 at 21:06
    
I have this same issue with a fresh install of RHEL6. What are we missing here? –  user5809 Mar 17 '11 at 5:04
    
Is NetworkManager running? Is there a dhclient already managing eth0? –  Mikel Mar 17 '11 at 8:20
    
No we turn NM off almost as fast as we sign in the first time - gets in the way. No when I run dhclient on eth0 there isn't already a dhclient running it - I usually do it on boot and even if somehow it already had one I usually run a killall somewhere in there. –  jphenow Mar 21 '11 at 15:13

2 Answers 2

Even with NetworkManager running, you can to use dhclient. Try killing dhclient and call it again:

# killall dhclient
# dhclient

If this doesn't help, you must see your network configuration, there are a lot of information about it in manpages (see 'man -k dhclient').

Anyway, this may help too: http://serverfault.com/questions/231076/configuring-dhcp-on-rhel-6

share|improve this answer
    
What does "dhclient -d" tell you? –  barrycarter Mar 26 '11 at 15:50
    
-d forces dhclient to run in foreground, even when it has configured an interface –  D4RIO Mar 26 '11 at 19:37
    
I meant -v, sorry. I was thinking of dhcpcd –  barrycarter Mar 26 '11 at 19:51
    
from the manpage: ` The client normally prints no output during its startup sequence. It can be made to emit verbose messages displaying the startup sequence events until it has acquired an address by supplying the -v command line argument.` –  D4RIO Mar 27 '11 at 1:19

There might be a "hook script" running that is exiting with a status code 0 indicating to the main dhcp3-server program that all is well, but it really isn't.

On my Debian system the directories are /etc/dhclient-enter-hooks.d (intuition tells me here is to look) and /etc/dhclient-exit-hooks.d, don't know where'd they be for Red Hat.

share|improve this answer

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.