Apple Event: May 7th at 7 am PT

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

DNS resolv problems

Hi

I am using my MacBook in our university network and since I updated it to OS 10.6.6 I have problems accessing other computers on the network by their computer names. I talked to one of our IT techs and he found out that the DNS servers in the /etc/resolv.conf file are not the same as in System Preferences. In the resolv.conf file the DNS server are the addresses of my internet provider from home. Somehow when I am at uni these addresses won't be updated to the uni network. After manually changing the DNS server addresses in the resolv.conf file to the uni DNS servers then everything works fine again, e.g. I can now access other computer on the uni network by their names. Any ideas why the resolv.conf file won't be updated after changing from my home to uni network? Before the update to 10.6.6 I never had a problem with accessing computer on my uni network.

Thanks for any help.

MacBook 2.2 GHz, Mac OS X (10.6.6)

Posted on Mar 3, 2011 4:21 PM

Reply
8 replies

Mar 3, 2011 6:48 PM in response to cat-tooth

/etc/resolv.conf is dynamically modified, so making manual changes to /etc/resolv.conf may disappear.

A lot depends on your System Preferences -> Network -> Advanced -> TCP/IP settings.

Generally, they are set to use the DHCP server, which is suppose to provide an IP address, a network mask, a router address, AND DNS servers.

If you are not set to use DHCP, that might explain the DNS server issue.

Or it is always possible that for some reason your DHCP server does not play nice with Mac OS X.

If you wish to manually set your DNS servers, you would do this via System Preferences -> Network -> Advanced -> DNS -> DNS Servers -> [+]. The changes you make here will be written to your /etc/resolv.conf.

If you need different DNS servers for home vs school, then you can always create multiple Network Locations. System Preferences -> Network -> Location -> Edit Locations -> [+] (or duplicate), then via your Apple menu -> Location you can switch between a Home vs School configured location.

Mar 3, 2011 7:32 PM in response to BobHarris

Thanks for your reply.

The DNS server is set up in system preferences properly but any change there (e.g. if I change the server address) won't be reflected in the resolv.conf file at all. The file stays unchanged containing the settings from my home network and not the DNS settings from my uni network, which are set up in the system preferences. Any idea why the resolv.conf does not change at all here at uni?

Mar 3, 2011 8:19 PM in response to BobHarris

I just checked the entries in /var/run/resolv.conf and the DNS server entries are as they should be here at uni meaning it has the uni DNS server in it. So the link to the /etc/resolv.conf must be broken. But I edited the /etc/resolv.conf yesterday for the first time while the problem appeared a couple of days before yesterday. How can I fix the link?

Mar 4, 2011 6:07 AM in response to cat-tooth

I just checked the entries in /var/run/resolv.conf and the DNS server entries are as they should be here at uni meaning it has the uni DNS server in it. So the link to the /etc/resolv.conf must be broken. But I edited the /etc/resolv.conf yesterday for the first time while the problem appeared a couple of days before yesterday. How can I fix the link?


sudo rm /etc/resolv.conf
sudo ln -s /var/run/resolv.conf /etc/resolv.conf

Mar 6, 2011 3:22 PM in response to cat-tooth

I just went back to uni today and realised that even after re-establishing the link between the /var/run/resolv.conf and the /etc/resolv.conf, the latter is still displaying the incorrect setup and it is not synchronised with the /var/run/resolv.conf that shows the correct DNS server settings. Any idea why it is still not working properly and why the /etc/resolv.conf is still different to the /var/run/resolv.conf?

DNS resolv problems

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