LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   dhcpd can't get IP on reboot (https://www.linuxquestions.org/questions/linux-networking-3/dhcpd-cant-get-ip-on-reboot-313209/)

carpchowder 04-14-2005 11:35 AM

dhcpcd can't get IP on reboot
 
Hey, I'm running Slackware 10 and I can get an IP address sometimes.
However, when I reboot I have no eth0. I run rc.inet1 and it just times out and never brings up the interface with an address. If I bring it up with ifconfig I never get an address.

If I halt the system, and wait long enough (I'm not sure how long is actually enough) sometimes it comes up and DHCP gets me an address which I then keep until I reboot.

What information would you need?
THanks

michaelsanford 04-14-2005 07:35 PM

Where are you getting an IP address from (a router, another linux box, your ISP)?

carpchowder 04-14-2005 11:10 PM

Its a dhcp server, I think its NT? Its on a company network, I'm trying to wean in some linux, maybe get some fans? I have never had any dhcp client problems before, and its only on reboot... the configuration works and comes up automatically if I power the box down. Like when I get in tomorrow? It will magically work like nothing happened, but if I rebooted it I'll be hosed. Any idea's what is going on? The client is dhcpcd
Thanks again

michaelsanford 04-14-2005 11:37 PM

Wanna show us what this looks like?
Code:

cat -n /etc/rc.d/rc.inet1.conf | grep [0]
(Please post your result wrapped in (code)(/code) to preserve the tabs and make it readable, in case you weren't going to already :D )

benjithegreat98 04-15-2005 08:34 AM

Look through your log files in /var/log to see if that reveals anthing. Do you have access to the DHCP server? Maybe it has some logs that can be looked through.

Maybe you could be allowed to use a static IP....

carpchowder 04-15-2005 09:12 AM

(code)
7 # Config information for eth0:
8 IPADDR[0]=""
9 NETMASK[0]=""
10 USE_DHCP[0]="yes"
11 DHCP_HOSTNAME[0]="Wilson"
20 IPADDR[2]=""
30
(/code)

The log reveals repeated timeouts waiting for a DHCP_ACK, I dont have access to the server, but if I did.... what would you suggest trying?:)

benjithegreat98 04-15-2005 09:38 AM

On line 11 try making that say DHCP_HOSTNAME[0]=""

carpchowder 04-15-2005 02:48 PM

No dice on the DHCP_HOSTNAME=""

eth0 is not listed for ifconfig, I can bring it up but have no IP. Rerunning rc.inet1 times out, ps doesnt list dhcpcd as running and then ifconfig doesnt list eth0 anymore. It seems as if the DHCP server is not responding at all to anything from dhcpcd? Any more idea's?

Thanks fella's

michaelsanford 04-15-2005 02:58 PM

Yeah, I would suggest trying to call the sysadmin and asking for a static IP, then you can just put that info into that file above and (hopefully) be done with it.

If your DHCP acknowledge request is timing out it sounds like there is a problem with the DHCP server renewing your lease. Can you post one or two lines of the result of this?
Code:

cat /var/log/messages | grep DHCPACK
Also, do you have any custom firewall rules on your box?

michaelsanford 04-15-2005 03:02 PM

By the way, the fact that dhcpd is not running is right since dhcpd is itself a DHCP server and hands out IPs to other people.

Also, it's very curious that rc.inet1 would time out. It sounds more and more to me like a problem with the dhcp server on your network.

carpchowder 04-15-2005 04:07 PM

Oh, sorry. I thought dhcpcd was a dhcpcd was a DHCP client that configured my interface? In the rc.inet1 script the command the script says something like... (this is a vague and probably really poor/incorrect interpretation) if the interface isnt up or configured, configure it with dhcp. And one of the commands after that comment is /sbin/dhcpcd -d -t 10

so i figured that dhcpcd must be what I need to communicate to my companies DHCP server. Now the logs seem to indicate the DHCP server isnt acknowledging my DHCP_DISCOVER requests.

What program is doing the requesting? (I thought it was dhcpcd) I am hoping maybe there is a client setting I can try?

Thanks!

michaelsanford 04-15-2005 04:15 PM

Sorry! My fault, it is dhcpcd (dhcpd is a different program) I misread your last post.

Wanna post some of your /var/log/message results?

carpchowder 04-16-2005 10:16 AM

Here is my /var/log/debug, I'm no longer at work so it might be a second before I can get back to it. I've also convinced the net admin to show me the server error logs, that wont be until monday as well. As you'll see by the end of the log, I shut down the system totally and when I restarted it? It just worked fine. I realize I could just leave it alone and not worry about it, but I want to know why reboot wont get me an address through DHCP. I updated to slack 10.1, but the problem remains...


Code:

Apr 15 18:48:54 Wilson kernel: CPU:    After generic, caps: 0383f9ff
00000000 00000000 00000000
Apr 15 18:48:54 Wilson kernel: CPU:            Common caps: 0383f9ff
00000000 00000000 00000000
Apr 15 18:48:57 Wilson dhcpcd[216]: broadcasting DHCP_DISCOVER
Apr 15 18:49:54 Wilson dhcpcd[1225]: broadcasting DHCP_DISCOVER
Apr 15 18:50:09 Wilson dhcpcd[1257]: broadcasting DHCP_DISCOVER
Apr 15 20:19:51 Wilson dhcpcd[1372]: broadcasting DHCP_DISCOVER
Apr 15 20:47:30 Wilson dhcpcd[1417]: broadcasting DHCP_DISCOVER
Apr 15 20:47:45 Wilson dhcpcd[1419]: broadcasting DHCP_DISCOVER
Apr 15 20:52:00 Wilson dhcpcd[1433]: broadcasting DHCP_DISCOVER
Apr 15 20:52:27 Wilson dhcpcd[1454]: broadcasting DHCP_DISCOVER
Apr 15 20:53:30 Wilson dhcpcd[1475]: broadcasting DHCP_DISCOVER
Apr 15 20:56:15 Wilson dhcpcd[1518]: broadcasting DHCP_DISCOVER
Apr 15 20:59:18 Wilson dhcpcd[1561]: broadcasting DHCP_DISCOVER
Apr 15 21:02:24 Wilson kernel: CPU:    After generic, caps: 0383f9ff
00000000 00000000 00000000
Apr 15 21:02:24 Wilson kernel: CPU:            Common caps: 0383f9ff
00000000 00000000 00000000
Apr 15 21:02:26 Wilson dhcpcd[217]: broadcasting DHCP_DISCOVER
Apr 15 21:02:27 Wilson dhcpcd[217]: broadcastAddr option is missing in
DHCP server response. Assuming 192.168$
Apr 15 21:02:27 Wilson dhcpcd[217]: dhcpIPaddrLeaseTime=259200 in DHCP
server response.
Apr 15 21:02:27 Wilson dhcpcd[217]: DHCP_OFFER received from  (192.168.1.2)
Apr 15 21:02:27 Wilson dhcpcd[217]: broadcasting DHCP_REQUEST for 192.168.1.248
Apr 15 21:02:27 Wilson dhcpcd[217]: dhcpIPaddrLeaseTime=259200 in DHCP
server response.
Apr 15 21:02:27 Wilson dhcpcd[217]: DHCP_ACK received from  (192.168.1.2)



All times are GMT -5. The time now is 04:17 PM.