1

I start by saying that my experience in networking is somewhere between low and medium.

I'm working on a Linux machine with DHCP configured and from tcpdump traces I see that the dhclient send the hostname "linux" in Option 12, Request packages. I verified the files /etc/hostname, /etc/hosts and /etc/dhclient.conf and there's no parameter related to the hostname that have the value "linux". I must specify that I use dhcpcd.

Any help/hint is appreciated since I don't have any ideas where that value is set.

1 Answer 1

3

From man 5 dhclient.conf, the config entry is send host-name <...>. It's near the bottom. The example they give is:

interface "ep0" {
  send host-name "andare.example.com";
  request subnet-mask, broadcast-address, time-offset, routers,
    domain-name, domain-name-servers, host-name;
}

But, I doubt you need to put it under an interface section. I would not worry if it's sending Linux, just override it.

It may be being set via systemd. on openSUSE, the manpage for dhclient says it has a -H switch. YMMV.

3
  • I checked the dhclient.conf and there's no send host-name. Only some send fqdn, but with the correct domain name. While in DHCP file from /etc/sysconfig/network there's DHCLIENT_HOSTNAME_OPTION="AUTO".
    – 23ars
    Commented Mar 30, 2022 at 8:38
  • 1
    It doesn't matter whether it's in dhclient.conf or not, just go by what the man page says. That send fqdn id for DDNS, again, look at the manpage. Commented Mar 30, 2022 at 8:43
  • Thankgs, I'll try!
    – 23ars
    Commented Mar 30, 2022 at 8:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .