Thursday, 17 November 2011

How to route network traffic with two or more network adapters

Use route /? from a command line to discover the answer...

  1. Get the destination ip address from comparing the tcp receive port number from a PROCMON filter on operation begins with TCP, and the name of the process that you're running e.g. chrome.exe
  2. netstat -n | findstr /i "port number here" - this will give you the destination ip address
  3. route print - to get the interface card number
  4. route add MASK IF interfacecardnumber


> route ADD MASK METRIC 3 IF 2
         destination^      ^mask      ^gateway     metric^    ^
  If IF is not given, it tries to find the best interface for a given

Your computer might already be using both connections. It really depends on the topology of the networks, and where the various services lie.
If you are on windows and go to the command line and run "route print" you'll see a table that the operating system uses to decide which interface to send packets out on to a given destination IP address.

If you run "netstat -n" it will show open TCP connections on your computer. The left hand column will show the local IP addressed being used. If you see more than one local address used (besides then your computer is probably already using both connections.
There are similar commands on the Mac, but I'm not sure what they are.

What you'd do, I think, is figure out the outbound IP addresses that matter to you what subnet they're routed through. Route those that way and have the default routing set the other way. Obviously you can route ranges of IP addresses. Whichever is easiest to specify is what you'll specify.

No comments:

Post a Comment

How to replace the watch battery in Logitech K750 solar power keyboard

Buy this battery Open the battery cover on the back of the keyboard, you’ll need...