linux和freebsd下的路由操作的区别
发布于 2008-01-16 15:31 1 阅读:105,115 评论:1 标签: FreeBSD Linux 路由

    添加路由时如果想服务器重启时也能有效,则同时将命令写到/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

越来越强啊恭喜

越来越强啊恭喜

by 新起点 2008-01-17 10:18:11
Warning: Trying to access array offset on value of type bool in /opt/bitnami/apache/htdocs/workingsmarty/templates_c/e21e83752348f01f75c472238af0e4512d51cc32_0.file.left_look.html.php on line 154

Warning: Trying to access array offset on value of type bool in /opt/bitnami/apache/htdocs/workingsmarty/templates_c/e21e83752348f01f75c472238af0e4512d51cc32_0.file.left_look.html.php on line 172