Difference between revisions of "Configure a Persistent Static Route on Windows Server 2003"
From Peter Pap's Technowiki
(2 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
route print | route print | ||
− | 3. Add your route using '''route -p ''target_network'' | + | 3. Add your route using '''route -p ''target_network'' mask ''netmask'' ''gateway_ip'' metric ''costmetric'''''. Eg. |
route -p add 192.168.80.0 mask 255.255.255.0 192.168.50.1 metric 1 | route -p add 192.168.80.0 mask 255.255.255.0 192.168.50.1 metric 1 | ||
− | The -p makes it persistent. The metric is an integer cost metric (ranging from 1 through 9,999) to be used in calculating the fastest, most reliable, and/or least expensive routes. If costmetric is not specified, 1 is used. | + | The -p makes it persistent, so if you just want to test, you can omit this and the route will disappear after a reboot. The metric is an integer cost metric (ranging from 1 through 9,999) to be used in calculating the fastest, most reliable, and/or least expensive routes. If costmetric is not specified, 1 is used. |
− | For more detail, click [ | + | For more detail, click [http://technet.microsoft.com/en-us/library/cc757323%28v=ws.10%29.aspx here] |
Latest revision as of 02:50, 20 November 2012
Surprisingly, this is much like creating a static route on a Unix box.
1. Bring up a command window
2. Use the route command to view the current routing table
route print
3. Add your route using route -p target_network mask netmask gateway_ip metric costmetric. Eg.
route -p add 192.168.80.0 mask 255.255.255.0 192.168.50.1 metric 1
The -p makes it persistent, so if you just want to test, you can omit this and the route will disappear after a reboot. The metric is an integer cost metric (ranging from 1 through 9,999) to be used in calculating the fastest, most reliable, and/or least expensive routes. If costmetric is not specified, 1 is used.
For more detail, click here