OS X DHCP and DNS

Discussion in 'NZ Computing' started by Lawrence D'Oliveiro, Mar 1, 2009.

  1. I have a client running a bunch of Macs, both OS X and older MacOS 9.
    There's a Linux box providing DHCP, DNS and time service. All the Macs are
    set to pick up their IP config via DHCP, and at least the IP address
    allocation part works fine. The MacOS 9 boxes pick up the DNS setting OK
    too.

    But the OS X boxes will not. I'm running dnsmasq, which serves up any
    internal names it finds in the /etc/hosts file, and passes on the rest of
    the queries to the ISP's real name servers. That way all the machines can
    access services such as the company timesheets system using a URL like

    http://timesheets/

    This works fine, except for the OS X machines. They will not resolve the
    "timesheets" domain name. I tried "timesheets." instead of "timesheets",
    thinking it might be something to do with default suffixes, but it made no
    difference. The only way I can get them to work is to put in the actual IP
    address of the timesheets server.

    It was so simple with Open Transport on MacOS 9--just leave all the settings
    blank, and it gets them from the server. But OS X isn't that simple. What am
    I missing?
     
    Lawrence D'Oliveiro, Mar 1, 2009
    #1
    1. Advertisements

  2. Lawrence D'Oliveiro

    EMB Guest

    What do you get in response to typing

    ipconfig getpacket en0
     
    EMB, Mar 1, 2009
    #2
    1. Advertisements

  3. What would that do?
     
    Lawrence D'Oliveiro, Mar 1, 2009
    #3
  4. Lawrence D'Oliveiro

    EMB Guest

    It would show what DHCP parameters are actually being picked up by osX.
     
    EMB, Mar 1, 2009
    #4
  5. Does it initiate a DHCP transaction?
     
    Lawrence D'Oliveiro, Mar 2, 2009
    #5
  6. Lawrence D'Oliveiro

    David Empson Guest

    No, it just reports the result of the last DHCP transaction, so it will
    confirm details such as which DHCP server responded, the DNS server it
    specified to be used, and the default domain name (if one was supplied).

    (Thanks for the pointer, EMB - I wasn't aware of that one.)

    You can also get some of this information with:

    cat /etc/resolv.conf

    This would also reveal if the computer has been separately configured
    with another DNS server address.

    You seem to disproved the possibility of a default domain name
    interfering, so the most likely explanation is that Mac OS X is using
    the wrong domain name server.

    A little monitoring with tcpdump might provide some clues. Try something
    like this:

    sudo tcpdump -i en0 -s 0 -n port 53
     
    David Empson, Mar 2, 2009
    #6
  7. The question, why? All the MacOS 9 machines work just fine. Therefore the
    actual DHCP transaction itself cannot be at fault.

    The problem is that the OS X machines are not using the information being
    supplied to them. The question I'm asking is: what can I do about this?
     
    Lawrence D'Oliveiro, Mar 2, 2009
    #7
  8. Lawrence D'Oliveiro

    Enkidu Guest

    What was the problem? I missed it. Different DHCP clients recognise
    different DHCP Options: MS clients only recognise 1, 3, 6, 15, 44, and 46.

    http://support.microsoft.com/kb/121005/

    I don't know what OS X supports.

    Cheers,

    Cliff
     
    Enkidu, Mar 2, 2009
    #8
  9. I should've Googled, shouldn't I? Here's an interesting page
    <http://qmail.jms1.net/djbdns/osx.shtml> with some info that I might look
    into.

    By the way, interesting that my original posting has already become hit
    number four when searching for "os x dhcp dns", copied on some USENET-
    mirroring site.
     
    Lawrence D'Oliveiro, Mar 2, 2009
    #9
  10. Lawrence D'Oliveiro

    David Empson Guest

    Probably not, but Mac OS X might have some other configuration you've
    missed which is giving it an additional DNS server, and it is using that
    one in preference to the one specified by the DHCP server. Looking at
    the content of /etc/resolv.conf will establish whether the DNS
    configuration is what you expect it to be, and in particular whether
    there might be an unexpected extra domain name server listed.

    After doing a little light experimentation myself I can't see any other
    obvious explanation - if my DHCP server doesn't supply a default domain
    name and I do a DNS lookup of a single word with no periods, Mac OS X
    issues a DNS request to the configured server asking for the specified
    name as I entered it. (My DNS server doesn't recognise it, but that is a
    separate issue.)
    You first need to establish what is wrong about the configuration of the
    Mac OS X machine and then work out how that bad configuration appeared.
     
    David Empson, Mar 2, 2009
    #10
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.