Sharing a printer via Rendezvous across sub nets

Jan 30, '03 08:53:22AM

Contributed by: silvermy

I wanted to share my USB printer with my roommate's Mac. It wouldn't work - no printer would show up in the Rendezvous pane of the Add Printer dialog. It turns out the problem is with AT&T Cable; or rather, the way it does things.

AT&T Cable in San Francisco is an odd beast. Their central will hand out DHCP addresses to any host connecting to a cable modem - rather nice, since you get a mostly-static global IP address for each machine (at least four allowed per household), nor is a "router" required - a hub is plenty enough. Sadly, the IPs they hand out are rarely on the same class C (Subnet Mask 255.255.255.0) network - the network mask their DHCP server hands out! What this means is that Rendezvous will not work between machines in the same house.

The solution is to give the machines a secondary IP address which is on a shared IP subnet. My method is to use the command /sbin/ifconfig en0 alias 192.168.1.?, where ? is a number between 2 and 254 - different for each machine. The 192.168.?.? subnet is "private," which means it won't colide with any global addresses.

This solved the problem instantly. A little bit more work, and I had a startupItems script put together as well (contact me for details) that adds the alias every time the machine boots.

It is VERY cool to be able to share a USB printer between two Macs with nearly no effort.

Comments (8)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20030130055322819