Re: NetworkManager sends hostname even if disabled in /etc/dhcp/dhclient.conf



On Sat, 2015-05-02 at 19:54 +0200, Jan Heidbrink wrote:
Hi,

I found that my Ubuntu machine always sends its hostname when doing a
DHCP request. I also found that for DHCP requests NetworkManager uses a
config-file /var/lib/NetworkManager/dhclient-eth0.conf which is based on
/etc/dhcp/dhclient.conf and then modified by NetworkManager.

One of these modifications is the following line:

send host-name "myhostname"; # added by NetworkManager

where 'myhostname' is my machines hostname. The original send host-name
line as it was defined in /etc/dhcp/dhclient.conf is commented out.

I'm wondering why NetworkManager does not respect the original
configuration. Also, does someone know how to configure the hostname
that NetworkManager writes into the config-file?

Hi Jan,


Quoting `man nm-settings`

(hope this doesn't line-wrap badly :) )




       Table 13. ipv4 setting
       
┌───────────────────┬──────────────────────────┬───────────────┬────────────────────────────────────────────────┐
       │Key Name           │ Value Type               │ Default Value │ Value Description                     
         │
       
├───────────────────┼──────────────────────────┼───────────────┼────────────────────────────────────────────────┤

       
├───────────────────┼──────────────────────────┼───────────────┼────────────────────────────────────────────────┤
       │dhcp-hostname      │ string                   │               │ If the "dhcp-send-hostname" property 
is TRUE,  │
       │                   │                          │               │ then the specified name will be sent 
to the    │
       │                   │                          │               │ DHCP server when acquiring a lease.   
         │
       
├───────────────────┼──────────────────────────┼───────────────┼────────────────────────────────────────────────┤
       │dhcp-send-hostname │ boolean                  │ TRUE          │ If TRUE, a hostname is sent to the 
DHCP server │
       │                   │                          │               │ when acquiring a lease. Some DHCP 
servers use  │
       │                   │                          │               │ this hostname to update DNS 
databases,         │
       │                   │                          │               │ essentially providing a static 
hostname for    │
       │                   │                          │               │ the computer.  If the "dhcp-hostname" 
property │
       │                   │                          │               │ is NULL and this property is TRUE, 
the current │
       │                   │                          │               │ persistent hostname of the computer 
is sent.   │
       
├───────────────────┼──────────────────────────┼───────────────┼────────────────────────────────────────────────┤



how about that?

Thomas

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]