16/01
2008
添加路由时如果想服务器重启时也能有效,则同时将命令写到/etc/rc.local中。但路由操作在linux和freebsd中是不一样的,区别如下:
linux:
以下是代码片段:
查看路由: /sbin/route增加路由: /sbin/route add -host 172.16.78.226 gw 10.55.40.1 /sbin/route add -net 172.16.20.0/24 gw 10.55.40.1删除路由 /sbin/route del -host 172.16.78.226 gw 10.55.40.1 /sbin/route del -net 172.16.20.0/24 gw 10.55.40.1
freebsd:
查看路由: netstat -nr增加路由 /sbin/route add -host 172.16.78.226 10.55.40.1 /sbin/route add -net 172.16.20.0/24 10.55.40.1删除路由 /sbin/route delete -host 172.16.78.226 10.55.40.1 /sbin/route delete -net 172.16.20.0/24 10.55.40.1
越来越强啊恭喜