# Freebsd dhcp client  from a Windows dhcp server



## Dillweed (Sep 3, 2009)

Hey all,

I think this might be a better question for a windows forum, however this problem did not exist when using a linux distro.

I have a freebsd server as a dhcp client on the network. I can get an IP address no problem, however I can not resolve the IP address using the common name (freebsd.xxx.com). Now, I didn't have this particular problem using linux so I thinking it might exist as a freebsd problem with the dhcp client, rather than a windows issue. Or possibly something that I have not set in the dhclient.conf file...if that is necessary as my dhclient.conf is blank.

I do have /etc/rc.conf set as 


```
hostname="freebsd.CHS.HOME"
ifconfig_xl0="DHCP"
```

and as far as I can see that is all I need to do for a dhcp client.

Anyway, I was wondering if anyone had any knowledge into correcting this?

Thanks in advance.


----------



## Alt (Sep 3, 2009)

May be you need to set up default dns servers to give it dhcp clients..
Can you ping an internet IP?


----------



## Dillweed (Sep 3, 2009)

Unfortunately I'm not the network admin so I don't know how the dns server is setup. The funny thing is that the windows clients can resolve each other as well as a ubuntu server that we had going. I wonder why the windows clients can see the freebsd server.

I've actually noticed this on my network at home. The linux and windows clients can resolve each other via common names, but the freebsd can't. Why is that?

Thanks for the help


----------



## Alt (Sep 3, 2009)

Seems there is a domain, not just dhcp =)


----------



## Dillweed (Sep 3, 2009)

Well yes this is a domain. The freebsd can ping internet sites. But my question is on the local network, why doesn't the windows computers see the freebsd machine. I don't think I need a dns outside the local network to see an internal machine, right? 

Still my question is why the windows machines can resolve each other using the local network names, but the windows machines can't resolve the freebsd machine.


----------



## Dillweed (Sep 3, 2009)

Dang can't edit posts.  I mean to say yes we have a domain, but having a outside domain name shouldn't matter when it comes to finding an internal computer.


----------



## DutchDaemon (Sep 3, 2009)

What's in /etc/resolv.conf on the FreeBSD vs the Linux machine(s)?


----------



## SirDice (Sep 4, 2009)

Dillweed said:
			
		

> The freebsd can ping internet sites.


Which means name resolving works.



> But my question is on the local network, why doesn't the windows computers see the freebsd machine.


Because there's usually nothing running on a bsd box that presents itself to a windows machine. Or do you mean the hostname of the bsd box cannot be resolved on a windows box?



> I don't think I need a dns outside the local network to see an internal machine, right?


This would be a security risk, so no. 



> Still my question is why the windows machines can resolve each other using the local network names, but the windows machines can't resolve the freebsd machine.


Ah, right. Does your network use Dynamic DNS? It could be the fbsd machine isn't sending its hostname to the dhcp server, hence no name will be registered in DDNS.


----------



## Dillweed (Sep 4, 2009)

Thanks for the replies. Yes my problem is that the windows boxes can't resolve the hostname for the bsd computer. I guessing that the freebsd computer is not sending its hostname. I have tried setting the dhclient.conf to send the hostname but even that doesn't work. Yet, I would guess the bootup scripts do the same thing with the hostname from /etc/rc.conf. I guess I'm missing something, but for the life of me I can't figure out what it is.

Thanks for the help all.


----------



## SirDice (Sep 4, 2009)

Have a look on the Windows DHCP server. See if the fbsd box registered properly there. If that works it's a DHCP-DDNS issue.


----------



## Dillweed (Sep 5, 2009)

I wish I had access to the windows box that is assigning ip's but I don't. I'll ask the IT dude to see what he says and get back to you all.

But the bigger issue here is the fact that when we were testing a linux box (ubuntu) the windows clients could resolve the linux hostname without problems and nothing changed within the dhcp server. Is freebsd not sending something that it should to the dhcp server or is it something else?

Thanks for the help!


----------



## SirDice (Sep 5, 2009)

Also make sure the hostname is set correctly (that's including the domain name) in /etc/rc.conf.


----------



## Dillweed (Sep 10, 2009)

Sorry about the delay, I was waiting to get with the IT admin to discuss this situation. We are using windows 2003 server and after investigating some of the settings on the windows server it appears that freebsd is not setting an "A" record on the local dns server that resides on Windows 2003. I'm not a networking guru, so honestly I'm sure what that means. The admin can set the "A" record manually and then the windows clients can resolve the hostname for freebsd. But my question still remains why doesn't freebsd no set an "A" record on the local dns server, but ubuntu or linux, in general, does? 

Here is what I have in my rc.conf file

```
hostname="freebsd.xxx.xxxx"
keyrate="fast"
linux_enable="YES"
saver="logo"
sshd_enable="YES"
ifconfig_xl0="DHCP"
mysql_enable="YES"
apache22_enable="YES"
sendmail_enable="NONE"
```

We are still trying to determine what the problem might be here, so any help would be greatly appreciated.

Thanks!


----------

