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.
I have a dhcp server setup to hand out ips and such bases on MAC addresses. I also for most machines have a hostname option specified. I also have my /etc/hosts file setup so I only have to change ips in one file. Within the hosts file there are two aliases, a longer complicated alias used for technical purposes and a shorter more user friendly alias. The file looks something like this:
1.1.1.1 tek3739283 bingo
When my clients request DHCP they receive the correct IP address but receive the incorrect host name. My clients are receiving the tek... name instead of the bingo, which is listed in the /etc/hosts file and the dhcpd.conf file, "option hostname bingo". I finally switched the order of the two names in the /etc/hosts file and the clients began receiving the correct name. Any ideas on why this is happening and how to make it stop? Thanks for your help in advance.
Actually the entries in the /etc/hosts file are used
to resolve names to IP addresses and IP addresses to
names, but it can't set the hostname of a system.
It's the hostname command that manages the hostname.
Typically this is assigned early in the boot process,
so using it on a running system will only change it
until the next boot. To permanently change it, you'll
need to find the procedure for your particular distro.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.