Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here is my route -n output:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface   U     0      0        0 virbr0

And if I try to add a static route by this command:

route add -net netmask gw

I get the following output:

SIOCADDRT: No such process

Why that? Can anybody explain my the concept of adding static routes in linux.

If I also have a route-eth0 file under the /etc/sysconfig/network-scripts/ directory, with this line in it: via, no effect is achieved after I restart the network.

So, can anybody give me some explanations, links or related stuff to read on this?


NOTE: What I observed: if I have added the network and points to 'default' gateway (, my command works good. But if I haven't it, I got the already mentioned ERROR. So, can you show me what I need to do more and where I'm wrong?

P.S. I'm a kind of a newbie in linux networking.

share|improve this question
Are your IP's in network-scripts valid ? – Lucas Kauffman Jan 13 '12 at 12:55
there is probably something wrongly configured in your networking. post your /etc/sysconfig/network-scripts/ifcfg-eth0 and /etc/sysconfig/network files – thanosk Jan 13 '12 at 12:55
@thanosk I don't have a /etc/sysconfig/network-scripts/ifcfg-eth0 file. And my network file looks like:NETWORKING=yes HOSTNAME=artaxerxe. So, if I need more on this, just suggest me what I need to do. Thanks. – artaxerxe Jan 13 '12 at 13:00
What do you have under? Also, can you run the following and paste it into your paste: "ip addr" – Rilindo Jan 13 '12 at 13:30
The posted output seems to be taken from 'route -n' not from 'ifconfig'. – Khaled Jan 13 '12 at 17:39
up vote 1 down vote accepted

The route you're trying to add is recursive.

route add -net netmask gw

This translate to the following:

The next hop for is

Ok. What is the next hop for

The next hop for is

> Uh? But this ain't possible. Then outputs the cryptic SIOCADDRT: No such process

This is confirmed by the second route you added:

route add -net netmask gw 192.168.122.x

Your default gateway should be in the network to be reachable from your computer.

share|improve this answer

Your Answer


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.