Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
there wouldn't be an entry, if the IP isn't fixed, an entry for it makes no sense. If you have a reservation on the DHCP server and the address therefore IS fixed, then the entry is exactly the same as for any other.
There wouldn't be any entry. Could you please ellaborate why you want to add dhcp ip in hosts file? Normally dhcp server provides the DNS information to dhcp clients.
To expand. Hosts file is a way to force static IP's to outbound names. DHCP can be used to assign ip addresses to systems both your local ip and networked ip. So if your lan's ip changes because of lease changes you have to follow names by some other method usually. I would consider static arp entries instead. A static arp entry would force the local machine to always connect to some lan mac address at the static ip in the arp table.
I wanted this entry because we are using flexlm on the machine and if I didn't enter my hostname in hosts file. it gave the error for starting flexlm license server.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.