MacOS – Using Wi-Fi and Ethernet at the same time

macosNetwork

I'm using the macOS High Sierra. There are two network interfaces on my Mac, Wi-Fi and Ethernet. The Wi-Fi is connected to the Internet directly, and the Ethernet is connected to out company's local network. They're in different subnets, one of which is 10.0.0.0/8 and another is 192.168.0.0/16. The Wi-Fi has faster speed than the Ethernet, but the sources in the local network cannot be accessed via Wi-Fi.

Now I want to route the traffic based on the urls. For example, I want all the access to *.corp.com to the Ethernet and others to Wi-Fi. The problem is the DNS. Those *.corp.com are only valid locally, which means they can only be queried in the local network. If I put Wi-Fi on the top priority, then all the access to *.corp.com would fail due to DNS query failure, because the system will use the DNS servers configured by the Wi-Fi router. However, if I set the Ethernet to the first, all the traffic will go to Ethernet.

I've tried the way to configure the route table manually, but it didn't work. The same DNS issue.

So if there any good ways to handle this situation?

Best Answer

Set your DNS server manually to the corporate one, prioritise wi-fi in network settings so it's the default gateway and route 10.x.x.x out through ethernet?