Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to send to different networks dhcp servers different hostnames. Can this easily be done?

This should be able to be achieved by NM writing a specified hostname to the merge dhclient config written to /var/run/nm-dhclient-.conf. The "send host-name ..." line in this config is generated at src/dhcp-manager/nm-dhcp-dhclient-utils.c in function nm_dhcp_dhclient_create_config. Tracing the call chain up, it appears as though the hostname argument of this function comes from the NMSettingIP4Config argument in function nm_dhcp_manager_start_ip4 file src/dhcp-manager/nm-dhcp-manager.c. But I don't see where the NMSettingIP4Config get filled in. Figuring out where that comes from would tell us how easy it would be to do this.

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.