Reset the Network Stack in a Windows Virtual Machine Using netsh

When you change network settings in a Windows virtual machine, you must reset the network stack of the virtual NIC to adopt the new settings. For a Windows guest operating system, you must disable and re-enable the network connection so it adopts a new MAC address. To perform this task with netsh, use the interface command.

Run the following commands in a DOS shell.

Procedure

  1. List the network interfaces.
    netsh interface show interface
  2. Choose the interface that represents the external network connection and disable it with a netsh command.
    netsh interface set interface name="Ethernet0" admin=DISABLED
  3. Re-enable the interface with a netsh command.
    netsh interface set interface name="Ethernet0" admin=ENABLED
  4. Repeat the previous two commands if you have more than one NIC that needs to be reset.