Search Wiki:
nvspbind is a tool for modifying network bindings from the command line. It is especially useful in Server Core environments with the Hyper-V role enabled.

It can be used to set the correct bindings for NICs used in Virtual Networks.

It can also enable or disable specific bindings on any NIC.

It utilizes the INetCfg APIs documented on MSDN (http://msdn.microsoft.com/en-us/library/ms805265.aspx).

To get help run “nvspbind.exe /?”

Hyper-V Network VSP Bind Application 6.1.7122.0
Copyright (c) Microsoft Corporation. All rights reserved.

Usage: nvspbind.exe [option] [NIC|*] [protocol|*]

Options:
-u unbind switch protocol from specified nic(s)
-b bind switch protocol to specified nic(s)
-d disable binding of specified protocol from specified nic(s)
-e enable binding of specified protocol to specified nic(s)
-r repair bindings on specified nic(s)
-f show full bind path
-g show owner guids

If no option is specified, it will display a list of NICs in the system and which protocols are enabled and disabled on the NIC:

{AA86AFE0-8F93-4C7D-85A9B33B83D9E909} <-- GUID which identifies the NIC
"vms_mp"
"Virtual Network": <-- Display name for the NIC
enabled: ms_netbios <-- protocols enabled/disabled on the NIC
enabled: ms_netbios
enabled: ms_server
enabled: ms_server
enabled: ms_server
enabled: ms_server
enabled: ms_server
enabled: ms_server
enabled: ms_pacer
disabled: ms_ndiscap
enabled: ms_wfplwf
enabled: ms_msclient
enabled: ms_msclient
enabled: ms_msclient
enabled: ms_msclient
enabled: ms_msclient
enabled: ms_msclient
enabled: ms_tcpip6
enabled: ms_netbt
enabled: ms_netbt
enabled: ms_smb
enabled: ms_smb
enabled: ms_tcpip
enabled: ms_lltdio
enabled: ms_rspndr
enabled: ms_pppoe
enabled: ms_ndisuio
disabled: vms_pp


You can specify the NIC either by GUID (“{AA86AFE0-8F93-4C7D-85A9B33B83D9E909}” in this example) or DisplayName (“Virtual Network” in this example).

You can specify the protocols by the names provided (for example “mstcpip6” is TCPIPv6 and "vmspp" is the switch protocol).


The –u option will unbind the switch protocol from the specified NIC and bind all other protocols. This is useful for NICs that are no longer being used in virtual networks.

The –b option will bind the switch protocol to the specific NIC and unbind all other protocols. This is useful for NICs that are being used in virtual networks.

The –d option will disable specific protocol binding(s) on the specified NIC(s). It can NOT be used to disable the switch protocol (use the –u option instead).

The –e option will enable specific protocol binding(s) on the specified NIC(s). It can NOT be used to enable the switch protocol (use the –b option instead).

The –r option will “repair” network bindings. “Repair” means either enable all protocols except the switch protocol or enable only the switch protocol. This is useful when bindings have gotten into a completely funky state.

Although I work for Microsoft as a developer on the Hyper-V team, I must point out that as the license tab indicates this tool and documentation are provided "as-is". You bear the risk of using it. No express warranties, guarantees or conditions are provided. It is not supported or endorsed by Microsoft Corporation and should be used at your own risk.
Last edited May 13 2009 at 12:53 AM  by keithmange, version 4
Comments
keithmange wrote  Jan 29 2010 at 7:43 PM  
It is finally posted on the downloads tab. I have also added NIC connection ordering.

richw2000 wrote  Feb 1 2010 at 11:20 AM  
I have actually written a similar utility to allow us to script NIC binding configuration.
I have a question I was hoping you might be able to answer.
There is functionality within the API to move a binding directly to the top in one call.
See the documentation for MoveBefore or MoveAfter here:
http://msdn.microsoft.com/en-us/library/ms805260.aspx

However, I haven't been able to make this work.
I notice that you also have left out this functionality.
Is this due to a bug in the API?

I'm guessing that this feature has been rarely tested as the NIC properties dialog does not expose this functionality.
I currently have a call open at the moment regarding this issue.

keithmange wrote  Feb 4 2010 at 2:20 PM  
I added the MoveBefore/MoveAfter last week. You can use the /+ /- options to change the order. ncpa.cpl uses those methods as well so they are well tested. What is not working for you -- are you getting an error from some API call or is it simply failing to change?

MSFT_tonyso wrote  Feb 12 2010 at 5:50 AM  
Watch Kieth give a 10 minute video demo of NVSPBIND at http://bit.ly/cTHlvS

dr_heathcliff wrote  Feb 13 2010 at 11:24 AM  
Hello Keith,

Really great tool - been looking for something like this for ages!

One minor niggle - could the errorcode returned be non-0 if the command fails to succeed? For example, I'm using it withe the /+ and /- options in a VBScript to order the bindings, and it would be great to return if (a) the command failed (b) the adapter was currently at the top or bottom respectively with an errorlevel!

Thanks
Dr_Heathcliff

keithmange wrote  Feb 26 2010 at 7:35 PM  
The errorcode is now non-0 on many (hopefully all) failures. I've also fixed up the GUIDs so they are properly formatted.

Ritesh_13 wrote  Mar 4 2010 at 9:05 PM  
this is great!!!...was looking for something like this for a long long time. however, the XP package fails to run on XP and 2003 machines!! has anyone been successful in running them on 2003 servers? works great on 2008..

Ritesh_13 wrote  Mar 5 2010 at 5:54 PM  
I think I may have found something that is not desired behavior.

If you make a NIC's name shorter, nvspbind.exe remembers the extra characters in the old NIC name when it is run again.

Example:
-change a nic's name to 99999999999999999999
-change the same nic's name to 88
-run nvspbind.exe /n
-nvspbind.exe now thinks the nic's name is 88999999999999999999

keithmange wrote  Mar 5 2010 at 6:56 PM  
xp version has been fixed.

richw2000 wrote  Mar 10 2010 at 10:24 AM  
Sorry for the late reply. I haven't been monitoring this thread.

I also managed to implement +/- functionality using MoveBefore/MoveAfter. However, these methods are supposed to support Move to top/bottom in one call by supplying NULL in the second parameter.
I can't seem to get this to work.
This particular functionality is not exposed in the ncpa.cpl.
Does that make sense?

cheers

Richard

keithmange wrote  Mar 11 2010 at 6:03 PM  
Added ++ and -- options which move it to the top (++) or bottom (--). It does so by supplying NULL in the second parameter. I cannot repro the name issue described by Ritesh_13 – which OS are you using?

richw2000 wrote  Mar 12 2010 at 3:35 PM  
Hi Keith,

Thanks for the updated version... I've now found what I was doing wrong.
Basically I was trying to re-order the bindings for the ms_msserver component instead of the ms_tcpip protocol.
It makes sense that you can't move the bindings around further down the binding hierarchy.
You need to affect the top level protocol.

many, many thanks.

cheers


Richard



Ritesh_13 wrote  Mar 22 2010 at 3:31 PM  
Sorry for the delayed response. MSDN login was down for a few days.



I verified it works fine on Server 2003 R2 SP2, Server 2003 x64 SP2, Server 2008 R2 and XP SP2 I am seeing the isse only on Server 2008 SP1 and Server 2008 SP2:



- after changing NIC name to 99999999999999999999



{D9914F95-90AE-447D-94FE-2FBFFD31DF58}

"b06bdrv\l2nd&pci_163a14e4"

"Broadcom BCM5709S NetXtreme II GigE (NDIS VBD Client)"

"99999999999999999999":



- after changing NIC name to 88



{D9914F95-90AE-447D-94FE-2FBFFD31DF58}

"b06bdrv\l2nd&pci_163a14e4"

"Broadcom BCM5709S NetXtreme II GigE (NDIS VBD Client)"

"88999999999999999999":

TimTharratt wrote  May 10 2010 at 4:15 PM  
Hi, this is a really useful program. However I’m experiencing the same problem mrpopgun described in the discussion, this being that when you nvspbind with no parameters you get both enabled and disabled entries against some protocols. It looks like these only appear against protocols that are enabled, but it is confusing any chance of a fix?

niarbrnd wrote  Jun 25 2010 at 6:26 AM  
Hi, the program incorrectly works if language Russia
{4F5DDD6C-0186-46FD-8D83-3BB198D5506E}
"pci\ven_14e4&dev_169a&subsys_101517aa"
"Broadcom NetLink (TM) Gigabit Ethernet"
"eth0":
enabled: ms_netbios ( disabled: ms_server ( disabled: ms_wl
bs ( enabled: nt_dsnpfd (Dsnpfd Driver)
enabled: ms_msclient ( enabled: ms_netbt ( enabled: ms_tc
pip ( enabled: ms_ndisuio (NDIS- enabled: ms_pppoe (
enabled: ms_rspndr ( enabled: ms_netmon (

And still, how to install ms_server for connection if it is not install
/e and /d is work

sorry my english

torbjmas wrote  Aug 26 2010 at 2:13 PM  
XP version: 6.1.7725.0
The command "nvspbind /o *" doesn't return any info about "ms_psched" when this is installed on a XP and are binded to one or more nic's.
Still it's possible to bind and unbind the ms_psched to one or all nics (*)

Could this be fixed or added to this binary?

benshaw wrote  Jan 13 2012 at 3:34 AM  
I am experiencing the same issue as Ritesh_13 on Server 2008 SP2 (x86). Shortening the interface name leaves the characters from the original name in there, like "Local Area Connection" becoming "PublicArea Connection", when it should show "Public". The XP version worked successfully on the same system.

KellAdmin wrote  Jul 12 2013 at 5:11 PM  
Is this a solution that is able to be used on Clients as well as Server Core?

angellcruz wrote  Nov 2 2013 at 3:35 PM  
So, if you are a user and not a programmer, here is the step by step.

I have a cluster with 3 nodes on Server 2008 R2 Core. Each with LOTS of NICs. When I configure the NIC's I REALLY need a specific NIC to be at TOP of ms_tcpip!

ipconfig /all > nvspbind-results.txt
nvspbind /n >> nvspbind-results.txt
nvspbind /o ms_tcpip >> nvspbind-results.txt
notepad nvspbind-results.txt

Search for IP of your NIC
Search for It's Name
Search for Name in NVSPBNID list at bottom

Then

nvspbind /++ "NIC-Name-Here" ms_tcpip

Updating...
Page view tracker