route: Manipulates network routing tables.

... The examples for the command "route"
... "route" Excerpt from Microsoft Windows Help
... Important information, tips for the "route" command

The command: "route" is on Windows 11, 10, .. available

The examples for the command "route"

The route command is used to view or modify the routing table of a Windows computer. Here are some examples of using the "route" command: ### View routing table: Example 1: View the entire routing table:

route print

This command shows the complete routing table including network interfaces, network addresses, gateway addresses and metrics. Example 2: View the routing table for a specific destination host:

route print -4

This command shows the routing table for the specific destination host (here ### Adding routes: Example 3: Adding a static route:

route add mask

This command adds a static route for network with subnet mask and gateway Example 4: Adding a persistent route:

route -p add mask

This command adds a persistent static route for network with subnet mask and gateway The `-p` option makes the route persistent so that it is retained after a reboot. ### Deleting routes: Example 5: Deleting a static route:

route delete

This command deletes the static route for network Example 6: Deleting all persistent routes:

route -p delete *

This command deletes all persistent routes. Be sure to use this with caution as it will remove any persistent routes. ### More options: Example 7: Changing the metric of a route:

route change mask metric 10

This command changes the metric of the route for the network to 10. These examples are intended to give you an idea of ??how the "route" command can be used in different scenarios. Depending on your specific needs and network settings, the parameters may vary. Use `route/?` for a full list of options and parameters.

"route" Excerpt from Microsoft Windows Help

Microsoft Windows [Version 10.0.19045.3693]
(c) Copyright 1985-2023 Microsoft Corp.


Manipulates network routing tables.

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

  -f           Clears the routing tables of all gateway entries.  If this is
               used in conjunction with one of the commands, the tables are
               cleared prior to running the command.
  -p           When used with the ADD command, makes a route persistent across
               boots of the system. By default, routes are not preserved
               when the system is restarted. Ignored for all other commands, 
               which always affect the appropriate persistent routes. This 
               option is not supported in Windows 95.
  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
  gateway      Specifies gateway.
  interface    the interface number for the specified route.
  METRIC       specifies the metric, ie. cost for the destination.

All symbolic names used for destination are looked up in the network database
file NETWORKS. The symbolic names for gateway are looked up in the host name
database file HOSTS.

If the command is PRINT or DELETE. Destination or gateway can be a wildcard,
(wildcard is specified as a star '*'), or the gateway argument may be omitted.

If Dest contains a * or ?, it is treated as a shell pattern, and only
matching destination routes are printed. The '*' matches any string,
and '?' matches any one char. Examples: 157.*.1, 157.*, 127.*, *224*.
Diagnostic Notes:
    Invalid MASK generates an error, that is when (DEST & MASK) != DEST.
    Example> route ADD MASK IF 1
             The route addition failed: The specified mask parameter is invalid. 
(Destination & Mask) != Destination.


    > route PRINT
    > route ADD MASK METRIC 3 IF 2
             destination^      ^mask      ^gateway     metric^    ^
      If IF is not given, it tries to find the best interface for a given 
    > route PRINT
    > route PRINT 157*          .... Only prints those matching 157*
    > route CHANGE MASK METRIC 2 IF 2
      CHANGE is used to modify gateway and/or metric only.
    > route PRINT
    > route DELETE
    > route PRINT

Important information, tips for the "route" command

There are a few important points to keep in mind when using the `route` command, particularly with regard to security and network configuration: ### Security and Authenticity: 1. Access Rights: Note that modifying the routing table requires administrative privileges. Therefore, run the command with elevated privileges by opening Command Prompt as administrator. 2. Persistent Routes: When adding or deleting persistent routes (`route -p`), make sure you clearly understand the impact on network connectivity. Incorrectly configured persistent routes can cause network problems, especially after a reboot. ### Network configuration: 3. Correct use of options: Use the correct options and parameters for your needs. Incorrect configurations can lead to connection problems. 4. Validity of Routes: Ensure that the routes added make sense and are valid. Incorrect routing entries can lead to network connectivity errors. ### Error handling and monitoring: 5. Logging: When adding or modifying routes, carefully review the log data to ensure that the routes are configured correctly and there are no errors. 6. Network Latency Monitoring: For larger networks or routing table changes, it is important to monitor network latency to ensure that the changes do not result in significant performance issues. ### Route deletion: 7. Caution when deleting: When deleting routes (`route delete`), you should ensure that you delete the correct route to avoid network problems. 8. Existing connections: Note that deleting routes may affect existing network connections. It is advisable to do this outside of production times. ### Network Security: 9. Firewall Impact: Changes to the routing table may impact the firewall configuration. Make sure the firewall is configured appropriately to accommodate the new routes. ### General Considerations: 10. Backup: Before making any major changes to the routing table, create a backup of the current configuration. This allows for quick recovery in the event of problems. 11. Documentation: Maintain accurate documentation of all changes to the routing table so that you can keep track of them and revert to the previous configuration if necessary. These points should help you use the `route` command safely and effectively. It is recommended that you make changes to the routing table carefully to avoid network problems.

日本語 (Nihongo)
한국어 (Hangugeo)
汉语 (Hànyǔ)


... Windows 10 FAQ
... Windows 10 How To

Windows 10 How To

... Windows 11 How To
... Windows 10 FAQ

The command route - Manipulates network routing tables.

HTTP: ... console/en/144.htm

Windows 10/11 OEM and full version, difference?

System Sounds adjust, customize or activate in Windows 11 / 10 / 8.1!

Chose when to Turn off the Windows 10 and 11 Display!

Calibrate joystick / game controller under Windows 11, 10, 8.1, ...!

Kostenloses Schreibprogramm für Windows 10 und 11!

Tools - Tray Features - Screenshot Tool Info!