Adding static route

lenoil

Registered
We're bringing up an OS X system for graphics work. The machine needs to be able to ftp to our imagesetter, which due to licensing restrictions has a hard-wired IP address that is outside of or subnet range and cannot be changed. Our old computer, running Tenon's MachTen, was able to talk to the imagesetter by the addition of a route command in /etc/rc.local. This isn't working well in OS X. First of all, issuing a route command in terminal isn't quite working:

%route add -iface dest_address my_address

This seems to add a route, because netstat -r reveals (after a long pause):

Destination Gateway Flags Refs Use Netif Expire
dest_address my_address UHS 0 0 en0

However, traceroute -r dest_address yields "Network is unreachable."

Reading up on routed, I added the following /etc/gateways file:
host dest_address gateway my_address metric 0 passive

This also does nothing. Help!
 
Unfortunately due to the way that IP works there is no way for your Macs to talk to the imagesetter directly as long as they live in separate address ranges. You have to bridge between two networks at some point, and you have basically three options available:

These are not two physical networks; both devices are on the same Ethernet. Therefore, all that is needed is to add a routing table entry for each device to let them know that they can talk to each other by means of the standard en0 interface. As I said, this was working perfectly with the prior Mac that was running MachTEN Unix. So why isn't this working from MacOS X and what must I do to make it work?
 
Originally posted by testuser
Forgive this question if it seems ignorant, but would it be possible to set up IP Aliasing (multihoming) on the Mac so that it functions on both subnets?

That would work in theory, but how can I tell the Classic app that packages the files and sends them to the imagesetter to use that alternative IP address, while everything else on the machine should use the primary IP address?
 
...erm, does routed use netinfo? can't remember and I'm sitting at my NT box atm (yeuch) so can't check.

C
 
Making progress. Apparently the routing code just couldn't understand how a host could be directly connected when it wasn't in the range of any connected network. I added '-netmask 255.255.255.254' to the route command, telling route that this was in fact another network (of one machine) on our Ethernet. That did the trick in OS X: I was able to ftp to the imagesetter. Unfortunately, this fix didn't work in Classic - the app that sends the files hangs when trying to connect. Any suggestions?
 
This forum hasn't been the help I'd hoped - I had to figure this all out myself. Anyways, I mentioned above how I was able to get OS X to add the static route. To get the same thing in Classic, I purchased the program IPNetRouter from Sustainable Softworks. It provides an interface to add routes to Open Transport. Now both Classic and Carbon apps can talk to our imagesetter. Anyone need some film output?
 
Back
Top