You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

MAC not accepting dns server settings from dhcp

I have a dhcp binding for my MAC computer that way it always gets the same address from dhcp. However, I recently made changes on the router so the MAC gets leased a different ip address along with specific dns options. Yet, my MAC keeps using the same old binding and will not take the new dns server options. I've spent hours trying to fix this all to no avail. I removed the static binding so the MAC gets a random ip like every other client in the network but it still has the same dns. Also tried to remove dns options from the router all together; makes no difference. I ran the following command on Mojave but no dice:

$ sudo killall -HUP mDNSResponder;sudo killall mDNSResponderHelper;sudo dscacheutil -flushcache

$sudo killall -HUP mDNSResponder; sleep 2;


When the computer connects to a different/new network, it always accepts the dns server address from the network; however, for some reason it is stuck with the old dns whenever I connect to home wifi.

I have also restarted the computer.


Thoughts anyone?

Posted on Jan 7, 2020 2:11 PM

Reply
Question marked as Top-ranking reply

Posted on Jan 8, 2020 10:17 PM

So I performed some further testing and here's a breakdown of how I resolved the issue:


1)Turned off the wifi on my MBP


2)Took off all references to the MBP's client-id/MAC address by clearing/removing it's binding from the router


3)Cleared the dynamic dns binding for my iPhone


4)Configured a static binding to assign the address the MBP kept requesting (10.20.0.110) to my iPhone instead. That way, when the MBP joins the network and requests the address, the router denies the request.


5)Configured the desired static binding for the MBP.


6)Enabled wifi on the iPhone but iPhone exhibited the same exact symptom and was requesting for it's previous ip address


7)Deleted wifi network from iPhone and then rejoined it back -- viola! iPhone inherited the static binding (10.20.0.110)


8)Turned on wifi on MBP, but it won't join the network and kept prompting for password -- despite entering the password multiple times. LOL.


9)Restarted the MBP and it joined the network successfully but for some strange reason, this time the router simply assigned the MBP a random ip. Toggled wifi on MBP and the router immediately assigned it the desired static ip (and MBP did not complain)


Could this maybe be a bug?

Similar questions

12 replies
Question marked as Top-ranking reply

Jan 8, 2020 10:17 PM in response to zazzau

So I performed some further testing and here's a breakdown of how I resolved the issue:


1)Turned off the wifi on my MBP


2)Took off all references to the MBP's client-id/MAC address by clearing/removing it's binding from the router


3)Cleared the dynamic dns binding for my iPhone


4)Configured a static binding to assign the address the MBP kept requesting (10.20.0.110) to my iPhone instead. That way, when the MBP joins the network and requests the address, the router denies the request.


5)Configured the desired static binding for the MBP.


6)Enabled wifi on the iPhone but iPhone exhibited the same exact symptom and was requesting for it's previous ip address


7)Deleted wifi network from iPhone and then rejoined it back -- viola! iPhone inherited the static binding (10.20.0.110)


8)Turned on wifi on MBP, but it won't join the network and kept prompting for password -- despite entering the password multiple times. LOL.


9)Restarted the MBP and it joined the network successfully but for some strange reason, this time the router simply assigned the MBP a random ip. Toggled wifi on MBP and the router immediately assigned it the desired static ip (and MBP did not complain)


Could this maybe be a bug?

Jan 8, 2020 10:34 AM in response to zazzau

Verify from >System Preferences>Network>Advanced>Proxies>>


that SOCKS proxy is not checked. Adware/malware can make this change.


adware/malware launch daemons can set SOCKS proxies without user participation.

(SOCKS is an Internet protocol that exchanges network packets between a client and server through a proxy server.)



https://support.apple.com/guide/mac-help/enter-proxy-server-settings-on-mac-mchlp2591/mac

Jan 9, 2020 6:26 AM in response to zazzau

Thanks for the feedback,


Interesting! I cannot conclude on a "bug" from the description in you last post. I had my share of strange behaviors with home network configurations. Few things I know:


  • Home Wifi/Internet consumer routers are not just routers in fact. They are multifunctional devices which seems to take some liberty in the implementation of the different network protocols and RFCs. Enterprise level routers (And other devices) are very different to that respect.
  • Apple own implementation of the same protocols seems picky sometime when interacting with third party devices. Not even talking about the Apple way to manage the same protocols...


Again, thanks for sharing your experience.


WD

Jan 11, 2020 10:27 AM in response to Wilddrums

So there seems to be something more sinister going on here. After I got everything working, I noticed that my MBP later reverted to using it's old dns -- even though it accepts the static ip from the router. What I noticed is that the iPhone will accept the dns setting from dhcp as long as the MBP is not connected on the network. As soon as I connect the MBP to the network and toggle WiFi on iPhone, the iPhone inherits the same dns from MBP (the old dns.) So clearly, it seems the MBP syncs networking settings with all my apple devices (perhaps it uses iCloud keychain to do this.)


iPhone dns before connecting to MBP to WiFi (notice it has the correct dns of 10.20.0.254):




MBP plugged in few minutes later (notice it is getting old dns ending in .37):



iPhone after MBP has been connected to WiFi (and WiFi toggled on iPhone)


Jan 8, 2020 6:40 AM in response to zazzau

OK. It was a "first thing to try" type of suggestion.


DNS handling in macOS is puzzling me sometime. It falls under the more general concept of "resolving". Look at the command "scutil --dns" and the file /etc/resolv.conf for example. Not sure how all this interacts with the different components of macOS.


For Wifi, DNS is defaulting to the Router address and it seems difficult to change this behavior. This also the default IP routing address.


When connecting to other networks, you said it accepts the new DNS address, do you mean other than the router address?


Not very helpful but I'm interested by the issue.


WD

Jan 8, 2020 1:20 PM in response to zazzau

I went ahead and created another static dhcp binding (10.20.0.101) on my router but my macbook just won't even accept the ip address offered; instead it requests for the ip address from the previous static binding (10.20.0.110) that I had configured from the get go:


Jan 7 19:09:33.269: DHCPD: client is confused about its IP address (requested 10.20.0.110, assigned 10.20.0.101).


Jan 7 19:09:34.265: DHCPD: DHCPREQUEST received from client 0138.f9d3.831d.24.

Jan 7 19:09:34.265: DHCPD: DHCPREQUEST received on interface Vlan20.

Jan 7 19:09:34.265: DHCPD: client rejected 10.20.0.101, sent 10.20.0.110.

Jan 7 19:09:34.265: DHCPD: server-id specified by client (0) 10.20.0.254


I also have no idea why the client (macbook) is specifying a server-id of 10.20.0.254 in the last log message; this is the address of the dns server I have configured in the dhcp pool for this client. Any suggestions here will be very helpful.

Jan 15, 2020 12:03 PM in response to zazzau

@ Apple Support: the issue here has nothing to do with home network. The problem is that once the MBP connects to a network for first time, it gets all its settings from dhcp just fine: IP address lease, default-gateway info and DNS address. However, what I have noticed is that if I were to go back to the router/dhcp server and change the DNS option sent out as part of the dhcp lease, the MBP accepts everything from dhcp except the *new/updated* dns. The MBP sticks with the dns address it learned the first time -- almost as though it gets this information from local cache. I have Windows machines at home that aren't seeing this problem -- the issue is only seen on MBP. Here is what my dns config looks like at the moment:


ip dhcp pool wireless

network 10.20.0.0 255.255.255.0

default-router 10.20.0.120

dns-server 10.20.0.254 x.x.x.x


*please note the x.x.x.x is a real IP address, I'm just sensoring it as part of this post


The MBP is suppose to get an address from the dhcp pool (which it does) along with the gateway/default-router info (which it also does); however, it does not acquire the 10.20.0.254 and x.x.x.x address for dns -- instead it uses the dns address that was previously configured (one I had been using for years and which the MBP is used to.) Those address are the .37 and .39 addresses you see in the screenshot. I only recently changed the dns address config on the dhcp/router to 10.20.0.254 and x.x.x.x fairly recently; all other devices have since now updated to using this new address for dns but NOT my MBP. I have two MBP at home and both are seeing this issue. These machines have connected to this network for years; just that any new changes to dns isn't acceptable to the machines. I have 2 windows machines and a chrome book and NONE are having this issue.

MAC not accepting dns server settings from dhcp

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.