cat /etc/sysconfig/static-route any net 10.0.0.0/24 gw 192.168.1.2 注:默认情况下主机中并没有该文件,之所以可以是因为/etc/init.d/network启动脚本会调用该文件,具体调用部分代码如下: # Add non interface-specific static-routes. if [ -f /etc/sysconfig/static-routes ]; then grep "^any" /etc/sysconfig/static-routes | while read ignore args ; do /sbin/route add -$args done fi (责任编辑:IT) |