Skip navigation

JSI Tip 4220. How do add a static persistent route by using the command-line?

Persistent route are stored in the registry at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\PersistentRoutes.

You can use the P switch with the route command to add a static route to the registry. The syntax is:

route -p add DestinationIP mask IpMask GatewayIP


route -p add mask

NOTE: The above adds a data type REG_SZ entry with a data value of

NOTE: See tip 3908 ยป Static routes entered via the RRAS Administrator program are NOT active unless RRAS is started?

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.