侧边栏壁纸
  • 累计撰写 793 篇文章
  • 累计创建 1 个标签
  • 累计收到 1 条评论
标签搜索

目 录CONTENT

文章目录

固定路由

Dettan
2021-04-10 / 0 评论 / 0 点赞 / 173 阅读 / 1,177 字
温馨提示:
本文最后更新于 2022-07-23,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。
同时连接多个网络, 可以同时连接内外网
在powerShell 里操作,那里能记住历史命令,有高亮
永久路由:
  网络地址          网络掩码            网关地址      跃点数
192.168.129.0    255.255.254.0       172.27.4.1       1
  192.168.5.0    255.255.254.0       172.27.4.1       1
  192.168.7.0    255.255.254.0       172.27.4.1       1
      0.0.0.0          0.0.0.0      192.168.0.1       1
  172.25.42.0    255.255.254.0       172.27.4.1       1
     10.0.2.0    255.255.254.0       172.27.4.1       1
   10.7.198.0    255.255.254.0       172.27.4.1       1
  172.25.41.0    255.255.254.0       172.27.4.1       1

route -p delete 192.168.129.0 mask 255.255.254.0 192.168.43.1
route -p delete 192.168.5.0 mask 255.255.254.0 192.168.43.1
route -p delete 192.168.7.0 mask 255.255.254.0 192.168.43.1
route -p delete 0.0.0.0 mask 0.0.0.0 192.168.0.1
route -p delete 172.25.42.0 mask 255.255.254.0 192.168.43.1
route -p delete 10.0.2.0 mask 255.255.254.0 192.168.43.1
route -p delete 10.7.198.0 mask 255.255.254.0 192.168.43.1
route -p delete 172.25.41.0 mask 255.255.254.0 192.168.43.1

route -p add 192.168.129.0 mask 255.255.254.0 192.168.43.1
route -p add 192.168.5.0 mask 255.255.254.0 192.168.43.1
route -p add 192.168.7.0 mask 255.255.254.0 192.168.43.1
route -p add 0.0.0.0 mask 0.0.0.0 192.168.0.1
route -p add 172.25.42.0 mask 255.255.254.0 192.168.43.1
route -p add 10.0.2.0 mask 255.255.254.0 192.168.43.1
route -p add 10.7.198.0 mask 255.255.254.0 192.168.43.1
route -p add 172.25.41.0 mask 255.255.254.0 192.168.43.1


route -p delete 192.168.129.0 mask 255.255.254.0 192.168.137.1
route -p delete 192.168.5.0 mask 255.255.254.0 192.168.137.1
route -p delete 192.168.7.0 mask 255.255.254.0 192.168.137.1
route -p delete 0.0.0.0 mask 0.0.0.0 192.168.0.1
route -p delete 172.25.42.0 mask 255.255.254.0 192.168.137.1
route -p delete 10.0.2.0 mask 255.255.254.0 192.168.137.1
route -p delete 10.7.198.0 mask 255.255.254.0 192.168.137.1
route -p delete 172.25.41.0 mask 255.255.254.0 192.168.137.1

route -p add 192.168.129.0 mask 255.255.254.0 192.168.137.1
route -p add 192.168.5.0 mask 255.255.254.0 192.168.137.1
route -p add 192.168.7.0 mask 255.255.254.0 192.168.137.1
route -p add 172.25.42.0 mask 255.255.254.0 192.168.137.1
route -p add 10.0.2.0 mask 255.255.254.0 192.168.137.1
route -p add 10.7.198.0 mask 255.255.254.0 192.168.137.1
route -p add 172.25.41.0 mask 255.255.254.0 192.168.137.1
route -p add 0.0.0.0 mask 0.0.0.0 192.168.0.1

route print
ipconfig
tracert 10.0.2.71


IPv4 路由表
===========================================================================
活动路由:
网络目标        网络掩码          网关       接口   跃点数
          0.0.0.0          0.0.0.0    192.168.58.65   192.168.58.202     50
          0.0.0.0          0.0.0.0       10.10.11.2     10.10.11.185    291
       10.10.11.0    255.255.255.0            在链路上      10.10.11.185    291
     10.10.11.185  255.255.255.255            在链路上      10.10.11.185    291
     10.10.11.255  255.255.255.255            在链路上      10.10.11.185    291
        127.0.0.0        255.0.0.0            在链路上         127.0.0.1    331
        127.0.0.1  255.255.255.255            在链路上         127.0.0.1    331
  127.255.255.255  255.255.255.255            在链路上         127.0.0.1    331
     192.168.58.0    255.255.255.0            在链路上    192.168.58.202    306
   192.168.58.202  255.255.255.255            在链路上    192.168.58.202    306
   192.168.58.255  255.255.255.255            在链路上    192.168.58.202    306
        224.0.0.0        240.0.0.0            在链路上         127.0.0.1    331
        224.0.0.0        240.0.0.0            在链路上    192.168.58.202    306
        224.0.0.0        240.0.0.0            在链路上      10.10.11.185    291
  255.255.255.255  255.255.255.255            在链路上         127.0.0.1    331
  255.255.255.255  255.255.255.255            在链路上    192.168.58.202    306
  255.255.255.255  255.255.255.255            在链路上      10.10.11.185    291

route -p add 172.18.249.0 mask 255.255.255.0 10.10.11.2
route -p add 172.18.249.0 mask 255.255.255.0 192.168.160.1
route -p delete 172.18.249.0
route -p add 0.0.0.0 mask 0.0.0.0 192.168.0.1

ping 172.18.249.201

route -p delete 0.0.0.0
route print
route -p add 172.18.249.0 mask 255.255.255.0 10.10.11.2 route -p add 172.18.249.0 mask 255.255.255.0 192.168.160.1 route -p delete 172.18.249.0 route -p add 0.0.0.0 mask 0.0.0.0 192.168.0.1
# 删除
route -p delete 172.18.249.0 
# 添加
route -p add 172.18.249.0 mask 255.255.255.0 10.10.11.1

route -p add 0.0.0.0 mask 0.0.0.0 192.168.0.1
ping 172.18.249.201

route -p delete 0.0.0.0
route print



0

评论区