Skip to content

在Mac中使用两个网卡分别访问内/外网 | SparkydogX Blog #126

Description

@sparkydogX

https://sparkydogx.github.io/2019/07/26/mac-auto-choose-net/#more

在使用Mac时,如果同时连接了有线网和无线网,那么系统会根据设置好的优先级,使用优先级更高的网络。优先级可以在网络设置中更改。有时内网无法访问外网,而我们又需要使用内网资源。这时可以同时用两块网卡分别连接内网和外网,并将外网所用的网卡设置成更高的优先级。 而后只需要修改路由规则。在命令行运行netstat -rt查看当前的规则。添加路由表语句:sudo route add -net 192.0.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions