0

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?

  • 1
    Routing / metrics is what you are missing. – Tim_Stewart Feb 11 '18 at 18:51
  • And as routing doesn't check reachability, you'll have to detect any change in configuration ("taking the laptop off the wired connection") and adjust routes accordingly. – dirkt Feb 17 '18 at 7:13
0

It may be as simple as setting your Ethernet connection's service order above your WiFi connection, waiting 120 seconds for the Bonjour mDNS record to time out, or flushing the mDNS cache.

Unfortunately, I don't have the hardware handy to test the default behaviour; I hope Bonjour honours service order and advertises service changes when higher-priority interfaces are available.

In the Networking pref pane, check to see that Ethernet is above WiFi:Service Order

If WiFi is listed above Ethernet, pull down the gear icon to Set Service Order... Service Order Pulldown

Then in the drop-down window, drag Ethernet above WiFi:

Set Service Order

The change will take effect when you click Apply.

Hopefully, that was it, and this solves the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.