AFP548 Changing the world one server at a time.

How to set Static route in leopard.

Home › Forums › OS X Server and Client Discussion › File Serving › How to set Static route in leopard.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #371895
    verl810
    Participant

    Hello all,

    I use nfs and ssh on our local network. We have Mac clients and Linux servers. The clients (macs) are on our network and the file servers share a second network with the tape back up system. We are starting to migrate to Leopard (10.5). One problem I have encountered is I am unable to figure out how to set a permeant static route. So the clients can get to the servers from boot time on. I can set the route with “sudo route add -net 172.24.38.0/24 -interface en0” then I can ssh without getting time outs and I can mount nfs shares.

    In Tiger (10.4) I added the file NetworkLocal in /System/Library/StartupItems and edit a couple of rc files. I called Apple and the haven’t a clue or aren’t talking if they do, because route is a terminal command. Yeah I didn’t get it either.

    If you could point me to some documentation that would be OK. I have no problem with RTFM I just don’t know where the M is and Welcome to Leopard didn’t help. Google hasn’t turned up anything for 10.5.

    Thanks.

    Rich
    verl810@mac.com

    #371978
    verl810
    Participant

    Here is what I have and it doesn’t seem to work, but I agree it should:

    in /System/Library/StartupItems/

    bash-3.2$ cat NetworkLocal
    #!/bin/sh

    ##
    # Load network kernel modules
    ##

    . /etc/rc.common

    StartService ()
    {
    ConsoleMessage “Loading Network Local”
    route -nv add -net 172.24.38.0/24 -interface en0
    }

    StopService ()
    {
    return 0
    }

    RestartService ()
    {
    return 0
    }

    RunService “$1”
    bash-3.2$ cat StartupParameters.plist
    {
    Description = “Network Local”;
    Provides = (“NetworkLocal”);
    Requires = (“Network”);
    OrderPreference = “None”;
    }

    The author of the FAQ I got this from suggested also editing Localizable.strings in Resources/English.lproj. I didn’t change this in 10.4 so I left it. The rc changes I thought I made where for nfs and gone after updates of 10.4. I am not sure what update replaced them. The route add still works in Tiger 10.4.XX.

    The command ‘sudo route -nv add -net 172.24.38.0/24 -interface en0’ works in 10.5 until restarted (as one would expect).

    I could find somewhere to stick the command in a script after the network starts.

    Thanks for the suggestion, maybe the syntax I have has changed, I haven’t found anything from Apple pointing out changes in their underlying Unix/Darwin. Other that a marketing statement about being more like Linux.

    Best regards,
    Rich

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.