Is Ethernet sharing over WiFi from a Mac supposed to hand out 192.168.2.1 as the DNS server

dnsinternet-sharingwifi

I have a MacBook Pro and I share its Ethernet connection to my iPhone and iPad as well as other wireless devices (enabling Internet Sharing in the Sharing preferences). However when I check on my iPhone what DNS it hands out, it shows 192.168.2.1. Should that be? That's not any actual DNS server, that's something local to the network. It's not even the home router, something about the Mac I think.

In the past I had problems where I couldn't use the Internet on the devices that were connecting to the shared WiFi unless I manually set the DNS server on each wireless device (not the Mac) to some actual server like 8.8.8.8. That was a workaround for my iDevices that let me make that change but not for other devices.

I've upgraded my OS to El Capitan since I made those initial observations, but I checked again and it is still putting out that same DNS server. I'm not sure if the Internet still wouldn't work on other devices since I'm not using them. But is that the right IP?

If relevant, here is my Ethernet settings:
Network Preferences

Best Answer

...when I check on my iPhone what DNS it hands out, it shows 192.168.2.1.

What you are seeing is completely normal.

To verify this, I setup Internet Sharing over WiFi with my Ethernet adapter as my primary connection and got the exact same results you did (the IP addresses varied some, but it's irrelevant).

I even tried it on a Windows Phone - here's the screenshot of the settings the phone got from my iMac:

enter image description here

When you enable Internet Sharing, it turns your Mac into a DHCP server and DNS forwarder - basically, it turns into a router along with NAT and firewall services to boot.

The IP address that you are seeing - 192.168.2.1 - is the bridge interface on your Mac. It's what bridges the connection between the Wireless LAN you set up in Internet Sharing and your physical Ethernet adapter.

Executing ifconfig in Terminal brings up the following:

en0: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
    options=10b<RXCSUM,TXCSUM,VLAN_HWTAGGING,AV>
    ether a8:20:66:39:2c:1c 
    inet6 fe80::aa20:66ff:fe39:2c1c%en0 prefixlen 64 scopeid 0x4 
    inet 192.168.10.100 netmask 0xffffff00 broadcast 192.168.10.255
    nd6 options=1<PERFORMNUD>
    media: autoselect (1000baseT <full-duplex,flow-control,energy-efficient-ethernet>)
    status: active
en1: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
    ether 8c:2d:aa:3a:ec:83 
    inet6 fe80::8e2d:aaff:fe3a:ec83%en1 prefixlen 64 scopeid 0x5 
    inet 169.254.89.94 netmask 0xffff0000 broadcast 169.254.255.255
    nd6 options=1<PERFORMNUD>
    media: autoselect
    status: active

bridge100: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=3<RXCSUM,TXCSUM>
    ether aa:20:66:93:de:64 
    inet 192.168.2.1 netmask 0xffffff00 broadcast 192.168.2.255
    inet6 fe80::a820:66ff:fe93:de64%bridge100 prefixlen 64 scopeid 0xc 
    Configuration:
        id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
        maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
        root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
        ipfilter disabled flags 0x2
    member: en1 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 5 priority 0 path cost 0
    nd6 options=1<PERFORMNUD>
    media: autoselect
    status: active

If you notice, there is now a bridge100. This is a virtual interface that was created on the WLAN adapter. If you execute that command in your Terminal, you should get something similar.

As for your DNS, what is happening is that your phone/tablet will send the DNS request to your Mac, and then your Mac will take that request and send it to the DNS hosts you have listed. When the response comes back, your Mac will pass it along to the wireless client that made the request.

I also tested browsing the Internet and fetching mail - all worked with no problem. I am running El Capitan 10.10.5

Are you having that problem now?