View previous topic :: View next topic |
Author |
Message |
Whissi Retired Dev
Joined: 12 Jan 2011 Posts: 222
|
Posted: Wed Jan 12, 2011 10:33 pm Post subject: [SOLVED] dhclient doesn't set domain-name |
|
|
Hi,
I have network with an own domain name (intern.example.org for example).
A Debian system is running a dhcpd (isc-dhcpd-4.1.1-P1) and a DNSd.
Everything is working fine:
Other clients (Windows, Debian and Ubunt systems) will get the network configuration by the DHCP. Every client will set the domain-name option for example correctly.
Now I added my first Gentoo system to my network. It's running dhclient (isc-dhclient-V3.1.2p1-Gentoo).
The problem is, that dhclient does not set the domain. For example, after dhclient received the configuration from the dhcpd, my "/etc/resolv.conf" looks like
Code: | gentoo ~ # cat /etc/resolv.conf
# Generated by dhclient for interface eth0
search intern.example.org
nameserver 192.168.1.2 |
but I expected
Code: | domain intern.example.org
search intern.example.org
nameserver 192.168.1.2 |
I captured the DHCP request and ACK, I can see that dhclient is requesting the domain-name as configured, and also receiving the domain-name... but it isn't set.
Here are some configuration files:
Code: | gentoo ~ # cat /etc/conf.d/net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d. To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).
config_eth0=( "dhcp" )
module_eth0=( "dhclient" ) |
Code: | gentoo ~ # cat /etc/dhcp/dhclient.conf
send host-name "gentoo";
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
netbios-name-servers, netbios-scope, interface-mtu,
ntp-servers; |
_________________ Regards,
Whissi
Last edited by Whissi on Thu Jan 13, 2011 8:44 pm; edited 1 time in total |
|
Back to top |
|
|
tony-curtis Tux's lil' helper
Joined: 20 May 2006 Posts: 111
|
Posted: Wed Jan 12, 2011 11:37 pm Post subject: |
|
|
"search" does the same thing as "domain" here, however search lets you list out multiple names, whereas domain is just a single value.
There's a man page for resolv.conf(5) that shows how this process works. |
|
Back to top |
|
|
Whissi Retired Dev
Joined: 12 Jan 2011 Posts: 222
|
Posted: Wed Jan 12, 2011 11:53 pm Post subject: |
|
|
tony-curtis wrote: | "search" does the same thing as "domain" here, however search lets you list out multiple names, whereas domain is just a single value.
There's a man page for resolv.conf(5) that shows how this process works. |
No, it doesn't the same thing here: Without "domain",
won't work for example.
You need both. And remember, Debian and Ubuntu will set both values like expected. _________________ Regards,
Whissi |
|
Back to top |
|
|
tony-curtis Tux's lil' helper
Joined: 20 May 2006 Posts: 111
|
Posted: Thu Jan 13, 2011 12:02 am Post subject: |
|
|
Oh, well my brain apparently failed today. I've never actually encountered that problem (in over 20 years ) |
|
Back to top |
|
|
Veldrin Veteran
Joined: 27 Jul 2004 Posts: 1945 Location: Zurich, Switzerland
|
Posted: Thu Jan 13, 2011 12:25 am Post subject: |
|
|
check if you have your hostname (without domainname) listed in /etc/hosts.
If you remove it, hostname -f should work again.
cheers
V. _________________ read the portage output!
If my answer is too concise, ask for an explanation. |
|
Back to top |
|
|
cwr Veteran
Joined: 17 Dec 2005 Posts: 1969
|
Posted: Thu Jan 13, 2011 9:13 am Post subject: |
|
|
I've had a similar problem with a missing local domain name, where the answer was to use eg:
xxx.xxx.xxx.xxx localhost.localdomain localhost
and not
xxx.xxx.xxx.xxx localhost localdomain.localdomain
in /etc/hosts.
I can't imagine why this would make a difference, but apparently it does. It might work
for DHCP as well.
Will |
|
Back to top |
|
|
Whissi Retired Dev
Joined: 12 Jan 2011 Posts: 222
|
Posted: Thu Jan 13, 2011 8:43 pm Post subject: |
|
|
Hi,
Veldrin wrote: | check if you have your hostname (without domainname) listed in /etc/hosts.
If you remove it, hostname -f should work again. |
Yes, the hostname without the domain-name was listed in the hosts file.
I removed it and hostname -f is now working as expected.
Thank you! _________________ Regards,
Whissi |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|