Windows 添加路由(Route)

# 查看网卡编号
route print 

# if是网卡编号 192.168.1.0是目标网段 192.168.1.254是网关 metric 是优先级 数越小优先级越高
route add -p 192.168.1.0 mask 255.255.255.0 192.168.1.254 if 19 metric 1

# 删除
route delete 192.168.1.0 mask 255.255.255.0

# 清缓存
netsh interface ip delete destinationcache
posted @ 2022-07-06 22:59  ChasingDreams  阅读(676)  评论(0编辑  收藏  举报