Windows and Routes

To make a route on Windows semi-permanent (it will survive a reboot) simply append the -p command to the end of the route command:

route add 1.2.3.4 mask 255.255.255.0 2.3.4.5 -p To remove the same route simply use the -p again so it’s not persistent: route delete 1.2.3.4 -p Check to make sure they’re removed in the registry at: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\PersistentRoutes
Leave A Reply - 1 Reply
Replies
Anonymous 2002-01-15 11:16pm - No Email - Logged IP: unknown

This doesn't work in win9x. There you have to put it in the autoexec.bat file manually. Also, to check to see if the routes are removed, you can type the command route print. This will show all of the persistent routes. Also, 1.2.3.4 is the IP you're adding the rout to, and 2.3.4.5 is your IP. Just thought I'd comment as long as I was here.

All content licensed under the Creative Commons License