Results 1 to 2 of 2

Thread: Setting up a static route

  1. #1
    Join Date
    Jul 2010

    Setting up a static route

    I want to create a permanent static route from my nagios ubuntu 12.04 virtual machine to my windows 2003 server. I'm not very good at networking, any help would be appreciated. I have found many guides all very similar but I don't understand what IPs to put in where and seem to get it to work.
    Thanks in advanced for the help,

    EDIT: They are on different networks.
    Last edited by Jettyz; July 25th, 2012 at 11:50 AM.

  2. #2
    Join Date
    Nov 2008
    Metro Boston
    Kubuntu 14.04 Trusty Tahr

    Re: Setting up a static route

    I presume there is a router between the two networks, otherwise you won't be able to connect at all.

    Do both networks already have a default gateway defined? If they share a common gateway router, machines on both networks should be able to ping machines on the other network now. If they can't do that, there may be some type of firewalling rule on the shared router getting in the way.

    Now lets take a more complex situation. Machine A with address wants to connect to machine B at Machine A uses a router at as its default gateway, while B uses If the router at is "multi-homed" with an interface on the network as well, say, you can tell machine A to use that router to connect to the network like this:

    sudo /sbin/ip route add via
    Now traffic for .2 network will be sent to where it will be forwarded along to machines in the network.

    In brief, somewhere there is a router that sits between your two networks. Write a routing rule like the one above that sends traffic for the other network to the shared router. Once you have a rule that works, you can add it to /etc/rc.local so it will be run at each reboot. (Omit the sudo when adding the route command to rc.local.)

    If you can't figure out how to apply these scenarios to your situation, we need a lot more details. Specifically how both machines connect to the network and what routers are in use.
    Last edited by SeijiSensei; July 25th, 2012 at 02:55 PM.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts