OpenVPN 2.5.3
文档
# 英文显示控制台输出,便于输出格式预览
chcp 437
# 查询 Met ,优先走的网络要使其 Met 置前,即 Met 越小,越提前,
C:\>netsh interface ipv4 show interface
Idx Met MTU State Name
--- ---------- ---------- ------------ ---------------------------
1 75 4294967295 connected Loopback Pseudo-Interface 1
15 100 1500 connected Ethernet
15 200 1500 connected VPN
route print
route delete 192.168.0.0
route -P add 172.16.0.0 MASK 255.255.255.0 192.168.0.1 Metric 200 IF 15
- -P:即 persistent 的意思,表示将路由表项永久加入系统注册表;
- add:添加
- 172.16.0.0:目的网络的网段(也可以是单IP)
- MASK 255.255.255.0:目的网络的子网掩码
- 192.168.0.1:下一跳IP地址
- Metric:权重
- IF:接口ID
https://blog.csdn.net/chenlycly/article/details/52142999
https://jemmywalker.pixnet.net/blog/post/38323627
https://docs.microsoft.com/zh-tw/troubleshoot/windows-client/networking/default-gateway-route-not-appear
https://superuser.com/questions/12022/how-can-i-make-the-windows-vpn-route-selective-traffic-by-destination-network
https://serverfault.com/questions/696827/can-i-add-a-static-route-to-a-vpn-network-if-the-default-gateway-ip-is-dynamic/696854
https://sc1.checkpoint.com/documents/SMB_R80.20/AdminGuides/Locally_Managed/EN/Content/Topics/Configuring-Routing-Table.htm?TocPath=Appliance%20Configuration%7CManaging%20the%20Device%7C_____5
https://tekbloq.com/2018/10/24/how-to-add-a-static-route-to-the-windows-routing-table/
  Created: 2021-09-25 02:10:25   1273