Comando ROUTE – cambiare il default gateway su windows da DOS
Posted on Gennaio 27, 2011 in the computer-hardware category
Il comando Route è un comando con il quale è possibile impostare una rotta statica a una determinata mask e un determinato ip
Descrivo alcune semplici operazioni possibili con il comando ROUTE
con i quali si può cambiare gateway predefinito su Windows
Syntax route [-f] [-p] [Command[Destination] [mask Network] [Gateway] [metric Metric]] [if Interface]]
Example:
To display the entire contents of the IP routing table, type:
route print
To display the routes in the IP routing table that begin with 10., type:
route print 10.*
To add a default route with the default gateway address of 192.168.12.1, type:
route add 0.0.0.0 mask 0.0.0.0 192.168.12.1
To add a route to the destination 10.41.0.0 with the subnet mask of 255.255.0.0 and the next hop address of 10.27.0.1 , type:
route add 10.41.0.0 mask 255.255.0.0 10.27.0.1
To add a persistent route to the destination 10.41.0.0 with the subnet mask of 255.255.0.0 and the next hop address of 10.27.0.1, type:
route -p add 10.41.0.0 mask 255.255.0.0 10.27.0.1
To add a route to the destination 10.41.0.0 with the subnet mask of 255.255.0.0, the next hop address of 10.27.0.1, and the cost metric of 7, type:
route add 10.41.0.0 mask 255.255.0.0 10.27.0.1 metric 7
To add a route to the destination 10.41.0.0 with the subnet mask of 255.255.0.0, the next hop address of 10.27.0.1, and using the interface index 0×3, type:
route add 10.41.0.0 mask 255.255.0.0 10.27.0.1 if 0×3
To delete the route to the destination 10.41.0.0 with the subnet mask of 255.255.0.0, type:
route delete 10.41.0.0 mask 255.255.0.0
To delete all routes in the IP routing table that begin with 10., type:
route delete 10.*
To change the next hop address of the route with the destination of 10.41.0.0 and the subnet mask of 255.255.0.0 from 10.27.0.1 to 10.27.0.25, type:
route change 10.41.0.0 mask 255.255.0.0 10.27.0.25
http://www.aoddy.com/2007/11/10/how-to-change-default-gateway-on-windows-by-command-line/
Comments
3 Responses to “Comando ROUTE – cambiare il default gateway su windows da DOS”
Leave a Comment
… [Trackback]
[…] Find More Informations here: strapower.com/blog/computer-hardware-windows-linux/comando-route-cambiare-il-default-gateway-su-windows-da-dos/ […]
… [Trackback]
[…] Here you can find 13649 more Information on that Topic: strapower.com/blog/computer-hardware-windows-linux/comando-route-cambiare-il-default-gateway-su-windows-da-dos/ […]
… [Trackback]
[…] There you will find 97446 more Information to that Topic: strapower.com/blog/computer-hardware-windows-linux/comando-route-cambiare-il-default-gateway-su-windows-da-dos/ […]