Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a MacBook running Snow Leopard in our company's internal network, which is basically a Windows domain network. Our TO department complains about my MacBook not specifying a name to the DHCP server. Accordingly, the MacBook isn't resolvable by anything else than its IP address from our Windows workstations.

I already

  • set the NetBIOS name in the Network settings in the OSX Control Panel
  • set the DHCP Client ID in the Network settings in the OSX Control Panel
  • set the "Computer Name" in Control Panel > Sharing.
  • set the hostname using sudo scutil --set HostName MACBOOK001 (and rebooted)

... but all of that didn't solve the problem.

Can anyone tell me how to make OSX register its hostname to the DHCP server so that it can be reachable e.g. using ping MACBOOK001

share|improve this question

6 Answers 6

I'd say the problem is on the DHCP server end rather than your MacBook. The Windows DHCP server has a number of options for updating DNS records, and can behave a bit differently for clients that are or are not members of the domain. In the Windows 2003 version, there is a checkbox for updating clients that do not request updates (It mentions NT clients). From memory, I think that is what you will need to ensure is checked.

share|improve this answer
1  
GREAT point. Although I mentioned that what he was describing was actually DNS-related, there is that checkbox in the DHCP server configuration, and it is not checked by default. –  KCotreau May 30 '11 at 14:49

I am experiencing this same problem using MacOS X 10.7.2 (client) and Windows Server 2008 R2 (DHCP and DNS server). The Mac registers with DHCP fine, but cannot register its hostname.

Shortening the Mac's hostname seems to fix the problem. After some crude experiments, I have found that hostnames longer than 16 characters prevent the Mac from registering its hostname with DNS, while hostnames 16 or shorter work fine. This limit only applies to the machine hostname, not the FQDN.

So, try shortening your Mac's hostname to be 16 characters or less. Please post back if this works - I'd be interested to hear!

EDIT: Oh, and you'll also need Barryj's option set. Windows DHCP config > Rightclick the scope > Properties > DNS Tab > Enable all checkboxes and the bottom radio button

share|improve this answer
2  
Oh, and you'll also need Barryj's option set. Windows DHCP config > Rightclick the scope > Properties > DNS Tab > Enable all checkboxes and the bottom radio button. –  RusNewman Dec 9 '11 at 23:43
    
Unfortunately, I'm afraid I won't be able to definitely validate any answer since I don't have the slightest access or even influence over the windows server configuration here. I can, hoever, tell you that the hostname has been ABCD_MACBOOK1 (13 chars) the whole time, so although your answer might be part of a solution, it doesn't seem to be the one single solution by itself. Still, your help is much appreciated! –  netmikey Jan 28 '13 at 14:21
    
I've been experience similar problems and found that it's the "computer name" that causes the problem. The OS setup sets this to something like "fred's macbook". I found that changing it to "myhost" fixed the problem (see also serverfault.com/questions/486269) –  starfry Apr 20 '13 at 19:53

DNS hostname length per RFC is 64 characters (with 255 total for the FQDN). Microsoft NetBIOS name length is 16 characters (15 of the name plus 1 for a special class tag). What I've found is that, using a Windows-based DHCP/DNS infrastructure, you are automatically limited to a 15-char length even if you don't care about NetBIOS and even if your DNS hostname length is otherwise perfectly RFC compliant.

So static IPs can be whatever you want, since DNS will let you enter the long name. But dynamic/DHCP are limited to 15 if you want them to self-register in DNS.

I'm guessing that if you were to use a Unix/Linux back-end, you would not have this problem.

share|improve this answer

First, you are trying to register it to the DNS server, which handles resolution. You may be looking in the wrong area for settings to change.

Search DNS on the first document, and see if any of their suggestions help you. I also included a couple others, which looked helpful. There are known bugs, so there might not be a simple answer without troubleshooting, and knowing specifics about your local domain.

http://www.macwindows.com/snowleopardAD.html http://hintsforums.macworld.com/showthread.php?t=104825 http://www.applesource.com.au/how-to/soa/Connect-a-Mac-to-Windows-Small-Business-Server/0,2000451082,339287478,00.htm

share|improve this answer
1  
See barryj's comment and ask your Windows administrator to make sure that box is checked, and that he restarts the service after checking it. –  KCotreau May 30 '11 at 14:51
    
It is unusual to allow random hosts to change DNS settings. You normally need to be authenticated to do that. What happens on some routers, including Windows Servers if set that way, is that DHCP clients are are automatically added to DNS, using authentication credentials from the DHCP server. –  user165568 Dec 9 '13 at 1:47

I discovered that Macs sometimes send their hostname in the request, and sometimes do not. In particular I found that if the computer name (Control Panel > Sharing -> Computer name) contains a space, then NO hostname will be sent (under OS X 10.6). If it does NOT contain a space, then it WILL be sent.

I compared the DHCP requests using tcpdump, with and without a space in the computer name.

With the computer name chris-macbook-space:

11:13:41.939462 IP (tos 0x0, ttl 255, id 36007, offset 0, flags [none], proto UDP (17), length 328)
0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:17:f2:xx:xx:xx, length 300, xid 0x9b57c74c, secs 1, Flags [none]
  Client-Ethernet-Address 00:17:f2:xx:xx:xx
  Vendor-rfc1048 Extensions
    Magic Cookie 0x63825363
    DHCP-Message Option 53, length 1: Discover
    Parameter-Request Option 55, length 10: 
      Subnet-Mask, Default-Gateway, Domain-Name-Server, Domain-Name
      Option 119, LDAP, Option 252, Netbios-Name-Server
      Netbios-Node, Netbios-Scope
    MSZ Option 57, length 2: 1500
    Client-ID Option 61, length 7: ether 00:17:f2:xx:xx:xx
    Lease-Time Option 51, length 4: 7776000
    Hostname Option 12, length 19: "chris-macbook-space"

With the computer name chris-macbook space:

11:07:13.077664 IP (tos 0x0, ttl 255, id 36003, offset 0, flags [none], proto UDP (17), length 328)
0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:17:f2:xx:xx:xx, length 300, xid 0x432cbbda, secs 2, Flags [none]
  Client-Ethernet-Address 00:17:f2:xx:xx:xx
  Vendor-rfc1048 Extensions
    Magic Cookie 0x63825363
    DHCP-Message Option 53, length 1: Discover
    Parameter-Request Option 55, length 10: 
      Subnet-Mask, Default-Gateway, Domain-Name-Server, Domain-Name
      Option 119, LDAP, Option 252, Netbios-Name-Server
      Netbios-Node, Netbios-Scope
    MSZ Option 57, length 2: 1500
    Client-ID Option 61, length 7: ether 00:17:f2:xx:xx:xx
    Lease-Time Option 51, length 4: 7776000

Note the missing Hostname Option 12, length 19: "chris-macbook-space" in the latter case.

So you could try removing spaces and any other special characters from the computer name, to see if that enables it to be resolved on the network.

share|improve this answer

Looks like you need to make a change to file sharing. So go to settings, sharings and then check file sharing. Where the computer name is make sure the name you want is in there. Then click on the edit button and verify that the name you entered is in there with ".local" added. Omit the quotation marks.

Should do the the job

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.