美文网首页
添加路由

添加路由

作者: 老魏313 | 来源:发表于2017-10-25 17:28 被阅读0次

Mac:

sudo route -n add -net 192.168.xx.0 -netmask 255.255.255.0 xx.xx.x.xx

Windows:

route -p add 192.168.xx.0 mask 255.255.255.0 xx.xx.x.xx

Mac永久添加路由:

在Launchpad 中找到 Automastor 制作工具, —> 实用工具—> 双击 运行 AppleScript —>

图一.png 图二.png

输入:

on run {input, parameters}

(* Your script goes here *)

do shell script "sudo route -n add -net 192.168.xx.x -netmask 255.255.255.0 xx.xx.x.xx" user name “用户名" password "密码" with administrator privileges

return input
end run

保存(ommand + s) 为 Route_MAC.app 文件.
双击该文件执行

在终端中执行netstat -rn 查看是否添加成功.(或者直接 ping 一下服务器地址)

在系统偏好设置中, —> 用户与群组 —>

重启测试是否开机设置成功

相关文章

网友评论

      本文标题:添加路由

      本文链接:https://www.haomeiwen.com/subject/qtxcpxtx.html