娃哈哈好喝-真的!
技术够用就行,吃好喝好睡好!

macos添加静态路由

macos添加静态路由

1、添加基于网络接口的路由
wahaha@wahahadeMacBook-Pro ~ % sudo route add -host 172.30.30.30 -iface lo0
wahaha@wahahadeMacBook-Pro ~ % sudo route add -net 172.30.30.0/24 -iface lo0
2、添加基于网关的路由
wahaha@wahahadeMacBook-Pro ~ % sudo route add -net 172.30.30.0/24 192.168.1.1
wahaha@wahahadeMacBook-Pro ~ % sudo route add -host 172.30.30.30 172.30.30.254
3、删除静态路由
wahaha@wahahadeMacBook-Pro ~ % sudo route delete 172.30.30.0/24
wahaha@wahahadeMacBook-Pro ~ % sudo route delete 172.30.30.30
4、查看路由表
wahaha@wahahadeMacBook-Pro ~ % netstat -rn
赞(0)
未经允许不得转载:娃哈哈好喝 » macos添加静态路由
分享到: 更多 (0)