There is absolutely no requirement for the DNS server(s) specified by DHCP to be the address of the router - and indeed that will only be the case where the router is also acting as a DNS server - which is usually true for small home networks, but often untrue for corporate networks - indeed the larger the network the less likely the DNS servers are related to the router.
DHCP allows for the specification of arbitrary DNS servers - the person that set up the DHCP server simply configured nameservers outside the range you expect. This could be for performance, convenience or other reasons.
In case I've slightly misinterpreted the question or its intent has been obscured by editing - /etc/resolv.conf
contains information about DNS servers and name resolution. It says nothing about routing.
4Sorry to bug you again, but what version of Mac OS X is this? Also, you say “the file contains two IP address that are not even of the form
192.168.1.0
-255
.” Then what are these addresses? IPv6 addresses? Or DNS server addresses outside of the192.168.1.0
-255
range? The more details you provide the better answers/clarifications the community can provide as well. – JakeGould – 2015-09-07T05:20:00.947Apparently these are the DNS servers of my ISP. Since this is a home network, I was expecting my DNS server to actually be my router. I am confused on how a packet is able to go from my computer to the IP address outside my local network. Doesn't it first need to go to the router before this DNS server? – user912083132 – 2015-09-07T06:18:17.493
Have you checked the DNS settings for the active network interface under “[Device/Interface] -> Advanced… -> DNS” If they match the contents of
/etc/resolv.conf
that gives you another way to confirm this. But also some routers might just do DNS passthrough? These kind of details—like what router brand you are using and perhaps what modem as well—are all critical to helping the community better understand the whole picture so we can help you. – JakeGould – 2015-09-07T06:21:43.730Yes, checking the DNS settings confirms this. The router brand is Arris. – user912083132 – 2015-09-07T07:03:53.280
Maybe the full brand and model number of the router/modem would help? – JakeGould – 2015-09-07T07:05:48.617
"Doesn't it first need to go to the router before this DNS server?" - Yes, it does. Thats what the subnet mask and standard gateway are for.
Your OS sees, that your DNS servers IP is not within your local network, which is determined from the subnet mask and your local IP which tells it, that it needs to send the physical ethernet packets to the Standard gateway machine, in this case your home router. – Tobias Mädel – 2015-09-07T13:06:16.393