How to set up application-specific routing table on Windows?



Routing tables in Windows are used to determine the path that a packet takes as it moves from the source to the destination. They are an essential part of networking and play a critical role in the operation of the network. As an IT admin, you may need to create application specific routing tables in order to ensure that certain applications or services get the best possible route to their destination.

The first step is to create the routing table. This can be done using the netsh command line tool. The syntax for the command is:

netsh routing ip add route

Where prefix is the address prefix, mask is the subnet mask, gateway is the IP address of the gateway and metric is the cost associated with the route. To create the routing table, you need to provide the prefix, mask and gateway of the route that you want to add. The metric value is optional and can be left blank.

Once the route is added, you can set up application specific routing rules. The syntax for this is:

netsh routing ip set route

Where prefix, mask and gateway are the same as before, metric is the cost associated with the route and app is the name of the application or service. This command will create a rule that applies only to the specified application or service.

Once the routing table is created and the application specific rules are added, you need to enable the forwarding of packets to the new routing table. This can be done by using the netsh routing ip set policy command:

netsh routing ip set policy

Where prefix, mask and gateway are the same as before, metric is the cost associated with the route and name is the name of the routing table. This command will enable the routing table and any packets that match the specified prefix and mask will be sent to the new routing table.

Finally, you need to set the default route for the new routing table. This can be done using the netsh routing ip set default command:

netsh routing ip set default


Where address is the IP address of the default gateway and gateway is the IP address of the gateway. This command will set the default route for the new routing table.

Once the new routing table is created and the default route is set, you should test the routing table to make sure that it is working properly. This can be done by pinging the IP address of the gateway to make sure that it is reachable. If it is, then the routing table is working properly.

Setting up application specific routing tables in Windows can be a complex task. However, with the right commands and a bit of knowledge, it is possible to set up a routing table specifically for an application or service. This can provide better performance and reliability for the application or service, as well as make it easier to troubleshoot any issues that may arise.

Inquire Now

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Find your next full or part-time role here

ScaleDesk can either help you find your next full time gig or a part time side gig where you can create extra income!

Onboard with us once
Skip HR screening and go to the final interview with with only your resume and a video interview you never have to redo
Get paid electronically every month for the hours you work
We will be your reference even if you work for us once

IT Teams: Use ScaleDesk to augment your team

Schedule Demo