Operating System - HP-UX
1834163 Members
2590 Online
110064 Solutions
New Discussion

Re: DHCP'ed and no looking back

 
SOLVED
Go to solution
Scott McDade
Frequent Advisor

DHCP'ed and no looking back

I enabled DHCP on my 11i workstation and now I can't get CDE to load. If I do an interactive boot I see that DHCP is working and I am getting an IP. Is there something I am missing or forgot to do. To enable the dhcp I simply modified the /etc/rc.config.d/netconf file and changed the DHCP cleint flag to 1. Now CDE will not load and I am in a loop.

Any suggestions?

-S
Keep it Simple!~
7 REPLIES 7
Patrick Wallek
Honored Contributor

Re: DHCP'ed and no looking back

You probably need to add the IP address that you got via DHCP into the /etc/hosts file on your workstation.

CDE does not behave well when there are any types of problems with hostname and / or IP address lookup.

Jeff Schussele
Honored Contributor

Re: DHCP'ed and no looking back

Hi Scott,

Do you still have a static IP for the host in it's /etc/hosts file?

If you use DNS to resolve does the DHCP server report the assigned IP to DNS?

Sounds like a name resolution problem to me.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Scott McDade
Frequent Advisor

Re: DHCP'ed and no looking back

Patrick:

By having to add the ip address to the /etc/hosts file defeats the whole purpose of using DHCP? I am not assured the same IP every time. How do I get around that?
Keep it Simple!~
Patrick Wallek
Honored Contributor
Solution

Re: DHCP'ed and no looking back

Whether or not you get the same IP address next time you reboot the workstation depends entirely on how your DHCP server is set up. I had a PC at my previous job where I had the same IP address, gotten through DHCP, for a year or more. The only time it changed was when I moved to a different floor in the building and thus a different subnet.

Does you DHCP server update a DNS server with this machines IP address? If so, you will need to set up DNS on this machine and set it so that it looks at DNS first for the IP address. The files you would need to set up are /etc/resolv.conf and /etc/nsswitch.conf.

Also have a talk with your DHCP administrator and see how the DHCP server and the IP address leases are set up.

I am personally not a big fan of DHCP for unix machines, for reasons such as this.
Jeff Schussele
Honored Contributor

Re: DHCP'ed and no looking back

If you're going to use DHCP for UNIX workstations you've got to use DNS. Which means the DHCP server MUST report IP assignments to the DNS server.

The only other option is, as Patrick states, is to get the DHCP server to give you a long lease & put that IP in the /etc/hosts file.

I, too, am NOT a big fan of DHCP in the UNIX workspace.
Why do I need a dynamic IP for a box I VERY rarely reboot?!?!?

My 2 cents,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
A. Clay Stephenson
Acclaimed Contributor

Re: DHCP'ed and no looking back

If you are going to do this, the best way to do this is by downloading and installing dhcpd and dynamic dns from www.isc.org; they're the guys who developed this stuff. You really can't depend upon things like long lease times. Also, their dhcpd is far more flexible and powerful than the bootpd used by HP. As a IP address is handed out, named is automatically updated with the new IP address.
If it ain't broke, I can fix that.
Sundar_7
Honored Contributor

Re: DHCP'ed and no looking back

Hi,

Try renaming /etc/resolv.conf to something else.

# mv /etc/resolv.conf /etc/resolv.conf.test

Now CDE should start..

rgds
Learn What to do ,How to do and more importantly When to do ?