Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DHCP settings

Status
Not open for further replies.

sendhilk

IS-IT--Management
Mar 29, 2001
109
0
0
US


Hi,
I have a server which has a static IP presently. I want it to be on the DHCP. so i made the changes accordingly. But when i log out and login it says that the /etc/hosts file was inconsistent.i checked the same and found it to have the previsous static IP. so i removed it from the hostfile and there is not entry for my server in the host file. but when i log out and log in again it still gives the same error probably because it doesn't find an entry for my host. so i added the current dhcp address in the hostfile. but this is not going to work because my server will pick up a new dhcp address. My question is how will the hostfile for my server look if it is on the DHCP.

Thanks,
Sendhil
 
A couple things I would look at. First I would set my host address in /etc/hosts to 127.0.0.1, the loopback address. That way you'll always get to your machine no matter what address you get or the status of the network.
Second, if your machine is truly a server I would look at getting a static address. If people need to get to it all the time then you're never going to give up the address anyway so get one assigned to you. This is ust my personal preference since it seems as if there is always someone who trys to get to a server using the ip address.
Third, if you still want to dhcp your address, then you should be resolving your name using a dynamic domain name server. They are normally tied into the dhcp server so names/addresses get recorded/removed as the addresses are assigned/recovered.

Good luck, and I'm sure you'll get other opinions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top