• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1055
  • Last Modified:

DOS route command and metrics to make a network card the primary one

Hi, my computer has two network cards on two different networks, and I want to be able to switch between which card I access the internet through.  I can do it by adjusting the metric value on the network card(s) via Windows 7, but I rather do it by DOS and the 'route' command.  Can anybody help me?

Windows way: http://support.microsoft.com/kb/258487

DOS way: ?????? Please provide Solution.

Note:
>The LAN1 card adapter address is: 192.168.4.154; Metric is 20
>The other adapter card (LAN2) has a metric of 10
>The Network Destination & Netmask for both cards is: 0.0.0.0
> Both cards have gateways.

Again:
I would like to know how I can make LAN1 the primary card, and then back to the backup one via the DOS route command?
0
Hope4U
Asked:
Hope4U
1 Solution
 
Rob WilliamsCommented:
Metrics do not work as they should in Windows operating systems.  You can only have one default gateway.  If you try using 2 it will fail over the the higher metric, but it will never switch back.

Using a dos command, rather than changing routes you might be better to change the NIC setting since it will retain the default gateway. Assuming the other router/gateway is 10.0.0.254, t do so use the following command:

netsh interface ip set address name = "Local Area Connection" gateway = 10.0.0.254 gwmetric = 1
0
 
Hope4UAuthor Commented:
Thanks.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now