欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Windows 添加删除 route

程序员文章站 2022-06-02 19:08:01
...
显示IP路由: route print

显示路由表中192开头的:

route print 192.*

添加192.168.100.1为默认网关的路由:

route add 0.0.0.0 mask 0.0.0.0 192.168.100.1
添加路由: 目的为:10.100.0.0  子网:255.255.0.0  下一跳为:192.168.0.1

route add 10.100.0.0 mask 255.255.0.0 192.168.0.1

添加永久路由

route -p add 10.100.0.0 mask 255.255.0.0 192.168.0.1

route add 10.100.0.0 mask 255.255.0.0 192.168.0.1 metric 7

route add 10.100.0.0 mask 255.255.0.0 192.168.0.1 if 0×3
删除路由:

route delete 10.41.0.0 mask 255.255.0.0

删除所有以192开头的路由

route delete 192.*

将(192.168.0.0 mask 255.255.0.0)的路由改为172.20.128.1

route change 192.168.0.0 mask 255.255.0.0 172.20.128.1