Windows Server Core IP Configuration, Part 3

I've showed you some common commands for IPv4 networking in Part 1 and Part 2 of this series. Now that you know the commands to change your network settings I feel it's time to perform some tweaks to make your commands just a tiny bit shorter. As an added bonus you might be able to distinguish your Network Interfaces better, which might protect you from changing settings on the wrong interface…

In this part of the series I'll show you how to

 

Background

Please consider the following cases:

  1. The largest part of the commands that I've shown you were the name of the Interface, which you had to type every time.
  2. For servers with lots of physical Network Interfaces it might be hard to find out which Network Connection in Windows Server corresponds with which physical Network Interface.

In both cases you might want to rename Network Connections.

 

Renaming Network Connections

Renaming Network Connections in Server Core installations of Windows Server 2008 is not very hard. It consists of three logical steps:

  1. First identify your network connections,
  2. Change the name of the connection you want to change
  3. Afterwards check if the command succeeded successfully.

The last and first steps can be completed using the same command.

Find Interface names

To find the names of the Network Interface Connections on your Server Core Box type the following command:

netsh interface show interface

This will output a table with columns, named Admin State, State, Type and Interface Name. To determine which Network Interface corresponds with which physical Network Interface you can simply pull a cable from an interface and reissue the command. The Network Interface Card and corresponding Network Interface Connection you pulled the cable from will no longer have a Connected State. (2nd column)

Rename an Interface

Now that you identified your Network Connections you're ready to give them meaningful names that everyone can understand. The command to rename a Network Connection in Server Core is:

netsh interface set interface name=OldName newname=NewName

Where:

  • OldName is the current name of the Interface as discovered using the Find Interface names method described above. When your Server Core box has only one physical interface, this would be "Local Area Connection".
  • NewName would be the new meaningful name you want to give the interface. When you want to use spaces in the name, you need to use quotation marks.

Example:

netsh interface set interface name="Local Area Connection" newname=Internet

Now you can issue the command again to display the Network Interface Connections names, since the command will not output anything when successful. (It will output errors)

 

Disabling Network Connections

You might also want to disable Network Connections in Windows Server 2008. You may have numerous reasons to do so, but one of the reasons is to prevent erroneous configuration.

In this case the steps to follow are identical to renaming a connection. First identify the connection to disable, then disable it and afterwards check if everything went well. The first and last command are the same and I guess I've covered the command enough already. (see above)

Disable an interface

To disable a Networking interface in Server Core installations of Windows Server 2008, issue the following command:

netsh interface set interface name=IdX disabled

Where:

  • IdX is the name of the Interface you want to disable, as discovered using the Find Interface names method described above. When your Server Core box has only one physical interface, this would be "Local Area Connection".

Example:

netsh interface set interface name="Local Area Connection" disabled

Now you can issue the command again to display the Network Interface Connections names, since the command will not output anything when successful. (It will output errors)

(Re-)enable an interface

To enable a Network Interface that is disabled, you can use the following command:

netsh interface set interface name=IdX enabled

 

Don't forget to check whether your changes actually made it through.

 

Concluding

Using some minor tweaks might prevent erroneous configuration of your Server Core Networking information. Renaming a network connection using meaningful names and disabling unused network connections makes your life on the command line somewhat easier. Let's face it: life on the command line is hard enough already…

Further reading

Windows Server Core IP Configuration, Part 1
Windows Server Core IP Configuration, Part 2

Disclaimer Beta Software

The information on this webpage applies to software from Microsoft that was in testing phase but utilizable by experienced users by the time the webpage was written. This software has not been released for sale, distribution or usage for the general public. The information on this webpage and the beta software are provided "as is" without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose.

Series Navigation

<< Windows Server Core IP Configuration, Part 2

leave your comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.