• Increase font size
  • Default font size
  • Decrease font size

How to add route in windows

 To add a static IP route

 
Open Command Prompt.
At the command prompt, type: 
Syntax:
 
route ADD xxx.xxx.xxx.xxx MASK xxx.xxx.xxx.xxx  xxx.xxx.xxx.xxx
where:
 
Static IP route entry Definition

destination

Specifies either an IP address or host name for the network or host.

subnetmask

Specifies a subnet mask to be associated with this route entry. If subnetmask is not specified, 255.255.255.255 is used.

gateway

Specifies either an IP address or host name for the gateway or router to use when forwarding.

costmetric

Assigns 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.

interface

Specifies the interface to be used for the route that uses the interface number. If an interface is not specified, the interface to be used for the route is determined from the gateway IP address.

 
 
 
Means:
 
route ADD “network” MASK “subnet mask”  “gateway ip”
 
For example, if you were on the 192.168.1.0 network, and you had a gateway on 192.168.1.12 configured to access the 10.10.10.0/24 network, you would use a route add statement like this:
 
route ADD 10.10.10.0 MASK 255.255.255.0 192.168.1.12
 
Your routing table should now reflect that change, and all traffic to the 10.10.10.x range will now be sent over to the gateway machine.
 
The route add change will only stick across reboots if you add it with the -p flag, as in the following:
 
route -p ADD 10.10.10.0 MASK 255.255.255.0 192.168.1.12
Tags:
 

Add comment


Security code
Refresh