0

I have one network cable connected to my Mac, and I've set up two services in the Network settings:

  1. Internet Realtek LAN

    IP: 192.168.1.1 | DNS: 192.168.1.1 or 1.1.1.1 (either works for me)

  2. Labo Realtek LAN

    IP: 192.168.137.1 | DNS: 192.168.137.1

When I ping the server or access it via IP using curl or a browser, everything works fine. However, I need both DNS settings to work simultaneously. From what I've observed, macOS uses the DNS of the service listed first in the service order under Network settings. This means only one DNS is active at a time.

Is this correct? If so, how can I configure macOS to use both DNS settings as needed? Any solutions or workarounds would be appreciated.

enter image description here

enter image description here

enter image description here

enter image description here

1
  • 1
    That's not really how DNS works. If you query a server, and get NXDOMAIN, it's not going to round-robin to the next server and ask again. You would need to run a single server that could respond for both networks, and probably forward queries it didn't recognize vs responding with NXDOMAIN. Commented May 30 at 14:02

1 Answer 1

0

I finally found a way to have two networks, one LAN and one VLAN. See my configuration below:

  1. Internet Realtek LAN

    • IP: 192.168.1.1
    • DNS: 192.168.1.1 or 1.1.1.1
  2. Labo Realtek LAN

    • IP: 192.168.137.1
    • DNS: 192.168.137.1

The order is quite important Setting > Network > ... > Set Service Order....

Image Description

The trick was to add the DNS of the VLAN 192.168.137.1 before 1.1.1.1.

Image Description

And also put it here.

Image Description

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .