20 Dec 2009

Need Macintosh DHCP help

Posted by AC

I’m trying to simplify my computer network for my upcoming move, and so far, it’s been going pretty well. I think we’ll be able to run with just the D-Link DIR-655 (192.168.1.1) feeding a network with my new ReadyNas NV+ (192.168.1.3) acting as a central file store, iTunes server and Time Machine backup device. And we’ll have a couple of MacBook Pros connecting either wired or wirelessly. In the meanwhile, we’ve got a few other devices on the net including a printer, the old audiotron, etc.

The NAS is currently doing dns on the “sandman” domain. The D-Link is doing “DNS Relay” to cover internet addresses out in the wild-n-woolly. The NAS is currently also doing DHCP so each computer coming onto the net doesn’t need to be manually configured.

But here’s where it gets squirrely. Even though the DHCP server on the NAS is set up to serve itself as a DNS server with highest priority, the powerbook on the net only seems to get the D-Link as a DNS server. For the longest time, I assumed it was a mis-configure on my part with the DHCP server, and I’ve poured over that config to no avail.

Eventually, I ran WireShark on the mac and had it renew its DHCP lease, and got some oddness.
The first is that it doesn’t seem to do a simple DCHP handshake. I don’t know DHCP well, and should probably just sit down and read the RFP, but I see what looks normal at first (.1.30 is the mac, .1.3 is the NAS):

Source Destination Info
0.0.0.0 255.255.255.255 DHCP Discover (txn id ..5d7)
192.168.1.3 192.168.1.30 DHCP Offer (txn id ..5d7)
0.0.0.0 255.255.255.255 DHCP Request (txn id ..5d8)
192.168.1.3 192.168.1.30 DHCP ACK (txn id ..5d8)

But then, after that, there are a couple more “Request/ACK” pairs on txn id ..5d8, and after that, a whole series of “Discover/Offer” pairs on a new txn (..5d9).

Further, in the “ACK” responses, I see the DNS servers just like the DHCP server should be sending them:

Option: (t=6, l=16) Domain Name Server
Option: (6) Domain Name Server
Length: 16
Value: [long hex string]
IP Address: 192.168.1.3
IP Address: 192.168.1.1
IP Address: 68.94.156.1
IP Address: 68.94.157.1

But I can confirm that the Mac just isn’t doing anything with them:Watch Full Movie Online Streaming Online and Download

corinthian:~ capehart$ ipconfig getpacket en0
op = BOOTREPLY
htype = 1
flags = 0
hlen = 6
hops = 0
xid = 4110104014
secs = 0
ciaddr = 0.0.0.0
yiaddr = 192.168.1.30
siaddr = 0.0.0.0
giaddr = 0.0.0.0
chaddr = 64:b9:e8:ca:1d:6e
sname =
file =
options:
Options count is 8
domain_name (string): sandman
domain_name_server (ip_mult): {192.168.1.1}
^^ WTF? ^^
router (ip_mult): {192.168.1.1}
subnet_mask (ip): 255.255.255.0
server_identifier (ip): 192.168.1.1
^^^ Shouldn’t that be the NAS instead? ^^^^
lease_time (uint32): 0xffffffff
dhcp_message_type (uint8): ACK 0x5
end (none):
corinthian:~ capehart$ grep nameserver /etc/resolv.conf
nameserver 192.168.1.1
corinthian:~ capehart$

(and, of course, 192.168.1.1 is the only thing that shows up in the Network control panel.)

In Google-researching this I came across this post mentioning the configuration file /System/Library/SystemConfiguration/IPConfiguration.bundle/Contents/Resources/IPConfiguration.xml and confirmed that mine still had the full set of entries on the DHCPRequestedParameterList key:

DHCPRequestedParameterList

1
3
6
15
119
95
252
44
46
47

I had set up the D-Link a while ago to do the DHCP serving, but I couldn’t configure the DNS server parameters for it. So, for a while, I thought the mac was still getting (or still using) it’s lease from the D-Link, but I did a Release/Renew with the D-Link unplugged and got the same response.

Can anyone tell me what I might be doing wrong? Or at least give me better places to look? Many in-advance “Thank you!”s

Subscribe to Comments

2 Responses to “Need Macintosh DHCP help”

  1. I’m starting to think that it really was using the (stale) lease from the D-Link. I’d been working with it wired. I went out for dinner, came back and tried wireless, and got a self-assigned IP. So maybe the NAS is failing to hand out DHCP leases after all. It sure looks like it’s trying. I see it starting the handshake over and over for the wireless that never connects:

    Dec 20 22:23:48 nas dhcpd: DHCPDISCOVER from 00:26:bb:11:84:c7 via eth0
    Dec 20 22:23:48 nas dhcpd: DHCPOFFER on 192.168.1.31 to 00:26:bb:11:84:c7 via eth0
    Dec 20 22:23:51 nas dhcpd: DHCPDISCOVER from 00:26:bb:11:84:c7 via eth0
    Dec 20 22:23:51 nas dhcpd: DHCPOFFER on 192.168.1.31 to 00:26:bb:11:84:c7 via eth0
    Dec 20 22:23:55 nas dhcpd: DHCPDISCOVER from 00:26:bb:11:84:c7 via eth0
    Dec 20 22:23:55 nas dhcpd: DHCPOFFER on 192.168.1.31 to 00:26:bb:11:84:c7 via eth0

    Maybe if everything is set to DHCP, the D-Link will just take care of it all?

     

    AC

  2. Well, I found one work around, albeit a temporary one. I set up a vhost on the D-Link that routes DNS from the D-Link to the NAS, and then set the D-Link’s “primary” DNS to the EXTERNAL interface of the D-Link causing it to turn it back around internally. If I had a static IP address for my DSL, I’d be done.

    For longer term, maybe I’ll just make an “internal.accapehart.com” subdomain and host it out on easyDNS like I do all my public DNS info.

     

    AC

Leave a Reply

You must be logged in to post a comment.