I'm setting up a media server at home with an old PowerMac that I found rotting in some cellar (great computer by the way, I don't understand why they wanted to throw it away) and I installed Debian Jessie on it for this purpose. I also set up Avahi to make it discoverable by other computers on the network and everything is working fine.
My problem arises from the fact that the computer has two network cards, one of which is a Gigabit Ethernet card and one that supports only Fast Ethernet. Because my home router is pretty old and crappy it has only 100BaseT Ethernet ports and 802.11g WiFi, which makes the Gigabit network card pretty much useless.
To make the wider bandwith of some use (as a workaround until I buy a decent router), I thought to connect the PowerMac to the router through the slow card and connect the fast one directly to my iMac (where I'd have the most benefit from the higher speed). After adjusting the network settings I've been able to get the link working and as a result I can access the PowerMac from two IPs on the other computer.
My doubt is: which interface will be used when connecting to it through its Bonjour name? I know for sure that the iMac knows both addresses and the output of dns-sd
proves that:
$ dns-sd -Q powermac.local
DATE: ---Sat 31 Aug 2013---
20:02:55.800 ...STARTING...
Timestamp A/R Flags if Name Type Class Rdata
20:02:55.927 Add 2 4 PowerMac.local. Addr IN 169.254.174.174
20:02:56.017 Add 2 5 PowerMac.local. Addr IN 192.168.1.43
But how can I be sure that every time I access PowerMac.local
the system selects the best IP address? In this example it's the first one listed by dns-sd
, but it isn't always the case and I don't know how to explicitly tell to the software to use one of them.
EDIT: Regarding Danila's answer, I found this command through a quick search, is it the correct command? (eth1
is the Gigabit card)
route add -net 192.168.1.43 netmask 255.255.255.255 dev eth1