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.
Thanks
Probably easier is to use the -S switch, which lets you specify 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.
From Windows 7 (Version 6.1 Build 7601: Service Pack 1) ping /?
Microsoft TechNet Ping Documentation which states it can only be used for IPV6 (not correct) Applies to: Windows Server 2003, Windows Vista, Windows XP, Windows Server 2008, Windows 7, Windows Server 2003 R2, Windows Server 2008 R2, Windows Server 2000, Windows Server 2012, Windows 8
Microsoft TechNet - Using the Ping Command (Windows 7 and Server 2008 R2) (also missing -S srcaddr)
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.
You can set a static route:
For more info, check out Microsoft's documentation on
route