Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hey, I've been troubleshooting network issues on servers with 2 NICs and laptops with wired and wireless cards. How can I force the PING and TELNET to be sent from a specific adapter? I know it's a trouble with windows. Turning off one of the adapters is not an option, I am always connected through one of the adapters. There must be some command line option to prefer one adapter over the other.


share|improve this question
up vote 2 down vote accepted

You can set a static route:

route add (destination subnet) MASK (destination subnet mask) (gateway) IF (interface)

For more info, check out Microsoft's documentation on route

share|improve this answer

Probably easier is to use the -S switch, which lets you specific the source IP address (see ping /? for more infos).

Another thing you can do is change the binding order, which meets your "option to prefer one adapter over the other". Although it varies from Windows OS to OS, it is in a similar location as this example: For Windows 7 you right click on Network, and click properties. Then you click on ""Change adapter settings". Then click on the menu Advanced>Advanced Settings and move the connection you want to have priority to the top.

share|improve this answer
dont provide wrong answers. the -s switch for winxp ping is to set timestamp for count hops. – user156008 Jan 25 '13 at 5:46
@user156008 ping -S srcaddr Source address to use. This is for windows Vista and later. ping -s with lower case is the timestamp for count hops. – user245956 Sep 30 '14 at 19:27

The adapter chosen is based on the routing tables. You can examine the routing tables by running 'route print' or 'netstat -r'. Each entry will have a metric which dictates the weighting of the route - lower numbers are preferred. You can manipulate the routing table with the 'route' command. route /? for details.

share|improve this answer

Your Answer


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.