cat /etc/sysconfig/static-route

any net 10.0.0.0/24 gw 192.168.1.2


注:默认情况下主机中并没有该文件,之所以可以是因为/etc/init.d/network启动脚本会调用该文件,具体调用部分代码如下:

#Addnoninterface-specificstatic-routes.if[-f/etc/sysconfig/static-routes];thengrep"^any"/etc/sysconfig/static-routes|whilereadignoreargs;do/sbin/routeadd-$argsdonefi