windows solaris 修改 路由 命令

来源:互联网 发布:安装阿里旺旺mac版 编辑:程序博客网 时间:2024/06/05 06:01

windows 查看路由表:

route print
修改路由基本命令:

ROUTE [-f] [-p] [-4|-6] command [destination] [MASK netmask]  [gateway] [METRIC metric]  [IF interface]

netmask:指定此路由项的子网掩码值。 如果未指定,其默认设置为 255.255.255.255。

windows95之后的系统,用-p 选项可以使添加路由重启后不消失

添加路由:

route add 0.0.0.0 mask 0.0.0.0  129.129.1.1 metric 3 if 2

删除路由:(如果有两个0.0.0.0,则mask和gateway要写,否则全删)

route delete 0.0.0.0 mask 0.0.0.0 192.168.1.1 metric 100 if 13


solaris中,查看路由:

netstat -nr

添加路由:
route add -net destination next-hop metric

















-bash-3.2# uname -a
SunOS SolETH0 5.10 Generic_147441-01 i86pc i386 i86pc