Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In a Java application, I'd like to use the computer's main connection for database connections and the VPN for all other tasks.

I was told I need to use routing table within the OS. I'm using Windows server 2008 and totally new to routing tables.

Is this a complicated task to do? I searched on the web but didn't find a lot of info about it. How can I achieve this?

share|improve this question
    
First please describe the network topology you have as otherwise it is very difficult to give a useful advice –  Serge Oct 15 '12 at 18:41

1 Answer 1

Routing tables are not specific to Windows and are more often manipulated by network engineers on other systems, so you may get more information if you just google "static routing tables".

The basic idea is quite simple: when a packet appears, the system checks the table to know which network connection to use to send/foward the packet. Each table entry have 3 key parameters: the prefix (or network address + network mask), the next hop/interface and the metric. The packet's destination address is matched against the prefixes in the table and the longest prefix that matches wins (longest prefix matching) and the packet is send to the corresponding next hop (router ip address) or interface. Metrics are used to resolve ties.

Windows provides two flavours of routing table manipulation commands route and netsh. The latter is more powerful, but maybe to difficult to beginners. route /? will give you some simple help on the former.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.