Selectively use network port

1

At home I have both an iMac and a Mac Mini, both running OS X 10.6.6. Both connect to the internet via the same 802.11n wireless network, however performance can be very poor when I perform a large file transfer between the two - largely, I suspect, due to the fact that they are competing for the same slice of spectrum when the sender is going to the router and the receiver is coming back from the router.

It occurs to me, however, that they are both sitting on the desk next to each other. Is it possible to string an Ethernet cable between them, so they can talk directly, but they will use the Ethernet link only to talk to each other - any messages for the internet at large or the rest of the LAN go straight onto AirPort?

Ideally this should be as transparent as possible, so that I can refer to them by the same (Bonjour) host name from either Mac, or another device on the LAN. In addition, it must work when either machine is switched off - I don't want to route the internet connection of one through the other, and neither can be guaranteed to be on.

Scott

Posted 2011-01-31T20:34:41.023

Reputation: 5 323

Answers

1

If you connect the 2 machines with a crossover cable, you can create a private subnet between them. If this private subnet has no gateway address, then your traffic will always route through the wireless network by default.

In order to make use of the private subnet, you would need to specify an IP address on the private subnet.

So for example:

iMac: Wireless IP: 192.168.1.4 Wired IP: 172.16.1.4 Default Gateway: 192.168.1.1

Mac Mini: Wireless IP: 192.168.1.5 Wired IP: 172.16.1.5 Default Gateway: 192.168.1.1

So in order to move a file from the iMac to the Mac Mini, you could do something like: scp really_big_file.ext user@172.16.1.5:my_new_filename.ext

Kirk

Posted 2011-01-31T20:34:41.023

Reputation: 2 182

Would this allow Bonjour to be used, or would I need to add entries manually in /etc/hosts? – Scott – 2011-02-01T08:57:35.713

It's been a while since I looked at how Bonjour worked. It is a multicast DNS based system so in theory it might work. What I'm not sure about is how Bonjour would react on a subnet with no default gateway. – Kirk – 2011-02-01T22:03:06.187

Incidentally, how are you transferring files between the 2 servers? AFP? SMB? FTP? This technique would definitely work with SMB (just mount smb://my.private.ip.address, but I'm not sure about with AFP (probably very related to the Bonjour questions). At the very least it is a simple solution that is easy to rollout of if it doesn't do what you want. Nothing more than the price of a crossover cable. – Kirk – 2011-02-01T22:03:48.387

Just got round to trying it, and I'm glad to report that Bonjour does indeed work, though it takes a little while for it to realise that the other address exists, and a little extra time for it to decide to use it. I'm mainly using Rsync over SSH - it's not that I can't use an IP address; it's that I don't want to. Names are easier to type than numbers. – Scott – 2011-02-04T18:57:24.483