Add or remove persistent (static) routes in Microsoft Windows


Adding a static route to your Windows routing table is pretty easy. Just use an elevated command prompt (Run as administrator-where needed) and type the following example:
route -p add 10.11.12.13 255.255.255.255 10.11.12.14 metric 3 if 2

The “-p” argument is important if you want your route to be here when you reboot (persistent). You should be familiar with arguments “metric” and “if” if you are using this commands. A good starting point is HELP for this command. Type “route add –help”.


To check your result type “route print” and it should be under “Persistent routes” section.



To remove or to delete an entry, type this: “route -p delete 10.11.12.13″


The “p” argument is also important as it concerns the Persistent Routes table, otherwise it would concern the first Active route table.

1 comment:

  1. I need a script that removes all persistent routes and only the persistent routes

    ReplyDelete