At my office, there is a Windows Server 2008 router,, which is our default gateway. This sends data through our main internet connection. This works perfectly. also has another internet connection that is currently sitting unused. This connects to a router, 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 from my desktop that has an IP address of

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, but I am unable to add a static route to the destination server in our data center:

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

From extensive googling, this error message seems to indicate that I am unable to access to set up a route, yet I can ping it. I attempted to add a static route to, 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.


Is the desktop on

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.

  • Correct, the routing decision needs to be set on – Mark Wagner Nov 15 '10 at 17:27

You can get the "SIOCADDRT: No such process" error if "You attempted to set a route for a network before setting a host route for the gateway which handles traffic for that network."

e.g. for local -> -> 172.19.0.xx

[root@local]# route add -net gw netmask dev eth0
SIOCADDRT: No such process

ANSWER: First create a host route, then create a net route.

e.g. for network in question: local -> ->

sudo route add -host dev eth0

sudo route add -net netmask gw dev eth0

A static route will still load the network, I guess it depends ;). The upload/download traffic has to cross the network. So it will affect other users of the network. You can bandwidth-limit the traffic or move that traffic to quieter hours if you wish to reduce affect on other network users. e.g. rsync has good bandwidth limiting options.

I had a similar issue with routing and SIOCADDRT. local -> dockerserver -> dockercontainer. Adding host route then net route made the routing work in one direction.

This helped me https://support.symantec.com/en_US/article.TECH142841.html

Full routing example, routing working both ways:


### 0. create host route for gw and net route local->docker
[root@local]# route add -host $dockerservernet dev eth0
[root@local]# route add -net $dockerservernet gw $dockerserver netmask dev eth0

### 1. route on dockerserver to local
[root@dockerserver ~]# route add -net $localnet netmask dev eno1
[root@dockerserver ~]# ping $local

### 2. route FROM dockercontainer to local (via gateway dockerserver)
[root@dockercontainer /]# route add -net $localnet netmask gw gateway dev eth1
[root@dockercontainer /]# ping $local

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 /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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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