[CentOS] adding static route via network setup fails

Tue Apr 28 19:21:48 UTC 2009
nate <centos at linuxpowered.net>

Kai Schaetzl wrote:
> I want to add the following route command
> route add -net 192.168.2.0/27 gw 192.168.2.3

try

any net 192.168.2.0 netmask 255.255.255.224 gw 192.168.2.3

in your /etc/sysconfig/static-routes file

Though I'm not sure why you'd want to have a static
route that points to a local interface, just set the
subnet of the interface to 255.255.255.224 and you
don't need a static route.

I use that syntax and it works fine..

nate