Disabling a Connection

Using a graphical user interface

 

  1. From the Control Panel open the Network Connections applet.
  2. Right-click the network connection you want to disable and select Disable.


Using a command-line interface

You would think that it would be straightforward to disable a connection from the command line, but unfortunately that is not the case. In fact, the netsh command supports disabling connections, but only non-LAN interfaces, which is very disappointing.

But all is not lost! There is an alternative if you really must have a way to disable connections from the command line. The devcon.exe tool is the command-line alternative to the Device Manager interface and comes with the Driver Development Kit (DDK). You can download it separately by viewing MS KB 311272 (http://support.microsoft.com/default.aspx?scid=311272).

Once you have it downloaded, run this command to get a list of all network devices:

> devcon listclass net

This displays the list of devices in two columns. The left column contains the hardware ID for each device and the right column contains the description for the device.

After you’ve found the device you want to disable, run the following command:

> devcon disable =net <HardwareID>

For example:

> devcon disable =net PCI\VEN_14B9^&DEV_A504^&SUBSYS_500014B9^&REV_00

There are a couple of important things I need to point out. First, if the hardware ID contains any ampersands (&), you have to escape them using a caret (^). Otherwise, the CMD session will interpret everything after the first & as another command and devcon will attempt to match any hardware ID that matches the string up until the first &. This can be dangerous because it can cause you to disable devices you didn’t intend to.

Second, if the hardware ID contains two backslashes, remove the second backslash and everything following it. For example, if the listall command returned this for a device I wanted to disable:

PCI\VEN_14B9&DEV_A504&SUBSYS_500014B9&REV_00\4&39A85202&0&10F0: Cisco Systems PC I Wireless LAN Adapter

I would need to use this as the hardware ID (including the carets):

PCI\VEN_14B9^&DEV_A504^&SUBSYS_500014B9^&REV_00

Many servers these days come with two network adapters installed to avoid a single point of failure with the network connection. Generally, keep one connection active and use the other as a back up. There are a couple of ways to do this. One is to simply disable one of the connections and manually enable it if the primary fails. Since you probably won’t have network connectivity after the primary adapter fails, you’ll need another way to access the server, such as an out-of-band console connection of some type.

Another way to do this is to use a feature that many hardware vendors support called teaming. With teaming, both adapters are used to form a virtual adapter. If the primary adapter becomes unavailable, the backup takes over automatically. (See your hardware vendor for more details.) The problem with teaming is that, depending on the implementation, it can be unreliable and ultimately cause more configuration headaches than it is worth. I recommend testing teaming configurations thoroughly before implementing them in production.

Tags: , ,

Leave a Reply

You must be logged in to post a comment.

Adderall Tramadol viagra online