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

Jerold Schulman

October 15, 2001

1 Min Read
ITPro Today logo in a gray background | ITPro Today

Persistent route are stored in the registry at HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParametersPersistentRoutes.

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

Example:

route -p add 131.107.3.0 mask 255.255.255.0 131.107.3.1

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

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



Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like