I have my main machine (OS X laptop) and a secondary machine (Ubuntu 16.04 server) on a network island: they are connected by a gigabit switch in addition to both being connected to my wireless network. The logic here is that I want to use the secondary machine for NAS and backup purposes that I'd rather not do over wifi, but it isn't feasible to add a wired connection from the main machine to my router/cable hookup. I set up wireless to wired bridging on the secondary machine, and I can happily iperf
between the two at gigabit speeds, so long as I specify IP addresses assigned by connection sharing on the secondary machine (10.42.0.*).
My question is this: how do I get both machines to be identified by their Bonjour / Avahi hostnames rather than ip addresses, but for traffic to go over the fastest route possible? The idea here is that if I mount a network driven (smb://), then take the laptop off of the wired connection, I want it to fallback to the wireless connection. Even when there's a wired connection (tested as above), iperf -c <Bonjour/Avahi hostname of server>
on the primary machine uses the (90% slower) wifi network (192.168.0.* address of the secondary machine). What tool / concepts am I missing in order to ensure traffic goes over the fastest available route?