View previous topic :: View next topic |
Author |
Message |
RazielFMX l33t
Joined: 23 Apr 2005 Posts: 835 Location: NY, USA
|
Posted: Wed Aug 13, 2014 2:10 pm Post subject: [SOLVED] DNS Search Suffix list from DHCP Server |
|
|
I am trying to get dhcpcd to respect the DNS search list sent by the DHCP server. Currently, local dns resolution only respects the dnsdomainname on my Gentoo box. However, running an ipconfig /all on my Windows 7 machine lists the full 'DNS Suffix Search List' as it should.
Any ideas how I get this to work short of manually overriding the domain entry in /etc/resolv.conf?
Last edited by RazielFMX on Thu Aug 14, 2014 6:45 pm; edited 1 time in total |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
RazielFMX l33t
Joined: 23 Apr 2005 Posts: 835 Location: NY, USA
|
Posted: Thu Aug 14, 2014 2:02 pm Post subject: |
|
|
Awesome.
I do not see the search list coming back even though I am asking for it (but it magically works on Windows). Is there something different that can be requested (or that Windows is doing) to get this list?
Code: |
# dhcpcd -U4 eno1
broadcast_address=XXX.XXX.XXX.XXX
dhcp_lease_time=691200
dhcp_message_type=5
dhcp_rebinding_time=604800
dhcp_renewal_time=345600
dhcp_server_identifier=XXX.XXX.XXX.XXX
domain_name=this.is.my.domain.com
domain_name_servers='AAA.AAA.AAA.AAA BBB.BBB.BBB.BBB CCC.CCC.CCC.CCC
ip_address=XXX.XXX.XXX.XXX
network_number=XXX.XXX.XXX.XXX
routers=XXX.XXX.XXX.XXX
subnet_cidr=24
subnet_mask=255.255.255.0
|
My dhcpcd.conf:
Code: | # A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.
# Inform the DHCP server of our hostname for DDNS.
hostname
# Use the hardware address of the interface for the Client ID.
#clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
duid
# Persist interface configuration when dhcpcd exits.
persistent
# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit
# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# Respect the network MTU.
# Some interface drivers reset when changing the MTU so disabled by default.
#option interface_mtu
# A ServerID is required by RFC2131.
require dhcp_server_identifier
# Generate Stable Private IPv6 Addresses instead of hardware based ones
slaac private
# A hook script is provided to lookup the hostname if not set by the DHCP
# server, but it should not be run by default.
nohook lookup-hostname
|
|
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
RazielFMX l33t
Joined: 23 Apr 2005 Posts: 835 Location: NY, USA
|
Posted: Thu Aug 14, 2014 2:37 pm Post subject: |
|
|
Unfortunately wireshark is not an option (corporate controlled windows desktop). Based on MSDN, it looks like Option 119.
Looking through the code for dhcpcd, I find 119 enumerated as DHO_DNSSEARCH, but the only reference I find is in the IPv6 code... which isn't really a reference but rather a compatibility struct
Code: | ~/tmp/dhcpcd-6.4.3 $ find . -type f -exec grep DHO_DNSSEARCH {} /dev/null \;
./dhcp.h: DHO_DNSSEARCH = 119, /* RFC 3397 */
./dhcp6.c: { DHO_DNSSEARCH, D6_OPTION_DOMAIN_LIST }, |
Unless of course this is handled in the resolve.conf hook, then I'm barking up the wrong tree. |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
RazielFMX l33t
Joined: 23 Apr 2005 Posts: 835 Location: NY, USA
|
Posted: Thu Aug 14, 2014 5:36 pm Post subject: |
|
|
I wasn't sure how to force a renew using dhcpcd, so I did a release and restarted the service.
I see in the request, under option 55 (Paramater Request List), I have 119 (Domain Search). I do not see it in the ACK or the OFFER, so I'm going to have to assume it something specific in the domain controller that allows approved Windows machines access to this information but not other systems.
Thanks for the help, this has been a fun learning experience! |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Thu Aug 14, 2014 5:59 pm Post subject: |
|
|
RazielFMX wrote: | I wasn't sure how to force a renew using dhcpcd |
Code: | dhcpcd -n $interface
# or for all interfaces
dhcpcd -n |
Quote: |
, so I did a release and restarted the service.
I see in the request, under option 55 (Paramater Request List), I have 119 (Domain Search). I do not see it in the ACK or the OFFER, so I'm going to have to assume it something specific in the domain controller that allows approved Windows machines access to this information but not other systems.
Thanks for the help, this has been a fun learning experience! |
No problem!
If you install openresolv, you have options to add a custom search list if needed. _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
|
|