如何将默认路由添加回 Windows 路由表

sta*_*aaa 5 networking windows windows-7 routing

我需要刷新然后将此默认路由添加回 Windows 路由表:

Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
      0.0.0.0          0.0.0.0      192.168.1.1      192.168.1.3     25
Run Code Online (Sandbox Code Playgroud)

我完全做不到。首先我做route -f,然后我尝试

route add 0.0.0.0 mask 0.0.0.0 gateway 192.168.1.3 interface 192.168.1.1 metric 25
Run Code Online (Sandbox Code Playgroud)

但我刚收到一条消息说

route: bad argument 192.168.1.3.
Run Code Online (Sandbox Code Playgroud)

有谁知道route add添加这条路线的正确命令?

Red*_*ick 8

(已编辑)

ROUTE ADD 0.0.0.0  MASK 0.0.0.0  192.168.1.3  METRIC 25  
Run Code Online (Sandbox Code Playgroud)

根据

C:\>route /?

Manipulates network routing tables.

ROUTE [-f] [-p] [-4|-6] command [destination]
                  [MASK netmask]  [gateway] [METRIC metric]  [IF interface]

  …    
  command      One of these:
                 PRINT     Prints  a route
                 ADD       Adds    a route
                 DELETE    Deletes a route
                 CHANGE    Modifies an existing route
  destination  Specifies the host.
  MASK         Specifies that the next parameter is the 'netmask' value.
  netmask      Specifies a subnet mask value for this route entry.
               If not specified, it defaults to 255.255.255.255.
  gateway      Specifies gateway.
  interface    the interface number for the specified route.
  METRIC       specifies the metric, ie. cost for the destination.
Run Code Online (Sandbox Code Playgroud)

请注意,“网关”表示 IP 地址而不是文字文本。

以上来自 Vista,您的里程可能会有所不同。