How To Add Routes in Windows OS.

When you have 2 or more network interfaces attached to your windows or linux machine you need to add routing for each destinations. Otherwise it will take default route of the system (destination any via default gateway). If you have only single network interface card, you dont need to think about this because only one gateway you have. See the below diagram and you need to reach from your windows machine. You have 3 different paths and we have mentioned which one is the default gateway. As per below information, is not in the default path. So, we need to add routes.

If you dont add routes for destination,your traffic will go through default gateway ( wen you try to reach It means that you are unable to reach So it menas you need to say please go through when you reach We call this adding routings. Lets see, how to see available routing in windows. Try with below command.

Search for CMD

Right Click & Run As Administrator

Now run command route print

Output will be shown available routes

Now you need to add new route using below command.

route ADD MASK

If add using below command route will be kept till a reboot and after a reboot route will be automatically removed from OS. So, we can add persistent routes using below command.

route -P ADD MASK

Lets say you add above route mistakenly & now you need to remove it. You can use below command to remove a route.


If you need add to add routes for complete block, you need edit command as below. Here you will define subnet mask.

route ADD MASK

If you still have any problem connect with us.