# dhcpcd DNS resolving

## theonlymcc

I can connect to my work network just fine. dhcpcd returns me an IP. I have checked the DHCP/DNS server (Windows Server 2003)as well. It has an entry in the DHCP but has no Host (A) record in DNS. So when I hostx my box I get an error. If I use samba it correctly uses netbios. But I don't need samba. What could be the problem? /etc/hosts? /etc/hostname?

----------

## robgrady

I am having the same problem and have not yet resolved it.  I have very little networking experience, but here is what I have done so far.  There is a patch to dhcpcd to enable the option for sending fully qualified domain name (FQDN) which I think is called option 81 in Windows.  As I understand it, this option tells the DHCP server to update the DNS server when it assigns an IP address.  Unfortunately, I have installed this patch and it still doesn't work.  So I have run out of ideas now.

Nothing I have changed in /etc/hosts, /etc/hostname, /etc/domainname, etc. has helped.  Though, after installing the patch, I edited my /etc/conf.d/net file to add 

```
dhcpcd_eth0="-h <hostname> -F both"
```

The "-F both" enables the FQDN option (the dhcpcd man page gives more info).  If I get any further, I will let you know.

----------

## theonlymcc

Thanks for the info. I too have installed the patch but with no success as to fixing the problem. Not really sure what else to do either.

----------

## robgrady

Just a quick update, it looks like this might be something on the server end for me.  I just spoke with our tech support and there is some sort of master list that my computer needs to be on in order to get registered on the DNS server.  I will let you know if this turns out to be the problem for me.

----------

## theonlymcc

Well interestingly enough, my co-worker uses Debian with dhclient and when he connects viz DHCP he also gets registered with the DNS server. I have tried dhclient but it didn't change anything.

----------

## aleskx

 *robgrady wrote:*   

> Just a quick update, it looks like this might be something on the server end for me.  I just spoke with our tech support and there is some sort of master list that my computer needs to be on in order to get registered on the DNS server.  I will let you know if this turns out to be the problem for me.

 

Did you ever discover anything on the server side?

I am having the same problem (applied patch with -F, did not help). My sysadmin (of course) claims the problem is on my side because there are some redhat dhcp client machines that work fine.

----------

## robgrady

Not yet, I have been bounced around a bit by the various tech support areas.  I have sent an email to the latest person to get my request, but he has not responded yet.

----------

## theonlymcc

Well now the truth comes out. My co-worker who uses Debian is indeed having the same problem with dhclient. It appears that his SAMBA netbios binding was the cause for his DNS resolving. So it appears to be a problem with how the Windows 2000/2003 Servers are configured. The question is: what is incorrectly configured and how to fix it?

----------

## speed_bump

You are looking for ddns updates. In the windows world the client machines themselves handle this sort of thing. A bit danerous IMHO as clients can say whatever they want. In the Linux/Unix world, this is something that the DHCP server handles. After the DHCP server hands out the lease, it sends an update to the name server telling it which IP address the client holds. 

I haven't found any support for doing the updates within dhcpcd itself, so it looks like the changes will have to be made on the DHCP server - to send the updates - and on the DNS server - to accept the updates.

Be careful as a large number of systems rely on dns names for authentication or access. Allowing arbitrary updates to those names can open you up to some nasty problems.

----------

## nobspangle

If you have admin access to the windows dhcp server this is easy to solve. If you look at the settings there is a tick box that says something like "perform dns updates for clients that don't request e.g. NT 4.0" 

You need to tick this box and also fill in the update credentials tab (on one of the advanced buttons) with the username and password of a user with permissions to update the nameserver.

----------

## robgrady

I finally got a response on the situation, and it looks like I am being added manually to the DNS server.  I think, for security purposes, hostnames must be added to the DNS server manually, but the entry can be updated automatically.  Now, I have not yet been added so none of this is working yet.  But I will let you know if/when it is working.

----------

