MacBook Pro Mid-2015, macOS Catalina 10.15.2.

# summary

I connected to wifi and a wired LAN. Wifi is the first in the Service Order in Network Preferences. There are some hostnames in the wired LAN that don't exist on the wifi.

How can I make it so that hostnames which don't exist on the wifi network, are "looked up" in the wired LAN network?

---------

I am connected to a Wi-Fi network (which has an internet connection), and I am using a USB ethernet adapter to connect to a second LAN (which doesn't allow internet access).

I changed my System Preferences > Network ordering so that the Wi-Fi takes precedence over the wired LAN. If I don't do this, then it seems I can't access the internet.

However, that means that the custom hostnames from the wired LAN aren't available:

    $ ping customhostname
    ping: cannot resolve customhostname: Unknown host


if I turn Wi-Fi off then it works:

    $ ping customhostname
    PING customhostname.mycompany.co.uk (192.168.100.200): 56 data bytes

Additionally, I can leave Wi-Fi turned on and still access that computer via the IP:

    $ ping customhostname
    ping: cannot resolve customhostname: Unknown host
    $ ping 192.168.100.200
    PING 192.168.100.200 (192.168.100.200): 56 data bytes


But how can I make it so that hostnames which aren't recognised (in this case, `customhostname`) by the wifi interface, are "looked up" in the wired LAN interface?

I don't want to have to memorise the IP address, and manually update my own records whenever it changes.