Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

At my office, there is a Windows Server 2008 router, 192.168.16.1, which is our default gateway. This sends data through our main internet connection. This works perfectly.

192.168.16.1 also has another internet connection that is currently sitting unused. This connects to a router, 192.168.1.254 which then connects to our secondary internet connection.

I have set up Routing and Remote Access to route the 192.168.1.* range to our internal network, and I am able to ping 192.168.1.254 from my desktop that has an IP address of 192.168.16.22.

I have a very intensive upload and download task for a linux box in the same office, so I want to set up a static route so I do not tie up our main internet connection and affect my co-workers. So, my plan is to set up this box with a static route.

From the linux box, I am able to ping 192.168.1.254, but I am unable to add a static route to the destination server in our data center:

$ sudo route add -host 123.123.123.123 gw 192.168.1.254 dev eth0
SIOCADDRT: No such process

From extensive googling, this error message seems to indicate that I am unable to access 192.168.1.254 to set up a route, yet I can ping it. I attempted to add a static route to 192.168.1.254, which worked perfectly, but this did not solve the issue (as expected).

I am not advanced enough at networking to diagnose this issue further as my background is software development, not system administration. I would be very grateful for any advice given.

Thank you for your time.

share|improve this question
add comment

2 Answers 2

up vote 4 down vote accepted

Is the desktop on 192.168.16.0/24?

You cannot add a route (to any target) via a gateway which you are not directly connected to, because your computer does not know how to find it's way to the router without going through the default route.

share|improve this answer
    
Correct, the routing decision needs to be set on 192.168.16.1. –  Mark Wagner Nov 15 '10 at 17:27
add comment

Regarding the part of the question about setting persistent routes in an AWS EC2 instance running Ubuntu, the correct place to place static routes to persist through an AWS reboot, stop, and start is here:

/etc/rc.local

Within that file, you need to place your routes in the line above the last line. Your lines should look just like this:

route add -net XXX.XXX.XXX.XXX netmask XXX.XXX.XXX.XXX gw XXX.XXX.XXX.XXX

Running the sudo command will be lost on reboot.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.