In Windows, you can use the
route command in the Command Prompt to manage IP routing table entries. If you want to delete a static or persistent route, you can follow these steps:
- Open Command Prompt as Administrator:
- Search for “Command Prompt” or “cmd” in the Start menu.
- Right-click on “Command Prompt” from the results and select “Run as administrator”.
- List Existing Routes (Optional but useful to identify the route to delete):
This command will display the IP routing table. Check for the specific route you wish to delete.
- Delete the Route:
Use the following command format to delete a route:
route delete <destination_network>
<destination_network>with the destination network of the route you wish to delete.
For example, if you want to delete a route to the
192.168.1.0network, you would use:
route delete 192.168.1.0
If the route also has a specific gateway defined and just providing the destination doesn’t work, you might need to specify the gateway too:
route delete 192.168.1.0 mask 255.255.255.0 10.0.0.1
192.168.1.0is the destination network,
255.255.255.0is the subnet mask, and
10.0.0.1is the gateway.
- Close Command Prompt after you’ve made the necessary changes.
Please note that changes made using the
route command without the
-p option are non-persistent and will be lost after a system reboot. If you had added a persistent route earlier (with the
-p option), deleting it using the above method will remove it permanently.