Note Figures Showing Netsh Commands

I have decided not to include figures showing the output of netsh commands in this section. Command prompt captures do not come out very well in a book and are difficult to read. However, the main reason is that I hope you will try out the commands yourself and view the real output.

With netsh, you configure your computer's IP address and other TCP/IP-related settings. For example, the following command configures the interface named Local Area Connection with the static 172.16.1.100 IP address, the 255.255.255.0 subnet mask, and a 172 .16. 1.1 default gateway:

netsh interface ipv4 set address name="Local Area Connection" static 172.16.1.100 2 55.255.255.0 172.16.1.1

You can also configure an interface to receive its settings automatically, for example:

netsh interface ipv4 set address name="Local Area Connection" dhcp

If you do not have a DHCP server on your network (you configure this in Lesson 2) and your network is isolated from the Internet, your interface will be configured through APIPA. Test this with the netsh interface ipv4 show config command.

If the Local Area Connection interface is the one you set up with a 10 . 0 . 0. 11 IPv4 address based on the instructions in the "Before You Begin" section, it is a very good idea to restore your settings by using this command:

netsh interface ipv4 set address name="Local Area Connection" static 10.0.0.11 255.255.255.0

Because you have not specified a default gateway, this setting will be blank. Again, you can test your settings with netsh interface ipv4 show config.

You can also configure DNS and (if relevant) WINS settings though the command line, for example:

netsh interface ip set dns "Local Area Connection" static 10.0.0.11

and:

netsh interface ip set wins "Local Area Connection" static 10.0.0.11

If you want the address of your DNS server to be configured through DHCP, you can enter this command:

netsh interface ip set dns "Local Area Connection" dhcp

Similarly, to specify automatic WINS settings, you can use this command:

netsh interface ip set wins "Local Area Connection" dhcp

You can use the same technique to configure IPv6 settings, for example:

netsh interface ipv6 set address "Local Area Connection" fec0:0:0:fffe::11

Other IPv6 netsh commands were given earlier in this lesson in the section, "Using IPv6 Tools "

If you are experimenting with IP settings, you can export your current settings to a text file and import them later In this example, the file is saved on the root of the C drive In practice, you would create a subfolder to store your configurations The following command exports your current IP settings to a text file:

netsh -c interface dump > c:\configuration1.txt

You can import your saved configuration from the text file you created with the following command:

netsh -f c:\configuration1.txt

These commands export and import all IP settings, not merely IP addresses, and you might get more output than you expect from the import command You can create and export a number of configurations that you want to use in different locations or for different purposes and import them as required.

MORE INFO NETSH COMMANDS FOR INTERFACE (IPV4 AND IPV6)

It is possible to describe only a small selection of the available netsh commands in this section. For more commands and more information, see http://technet2.microsoft .com/windowsserver2008/en/library/29933987-90dc-471c-98aa-04e5fa245bbll033 . mspx?mfr=true.

Configuring Ipv6 Connectivity

In this practice session, you configure a site-local IPv6 address on your domain controller and client computer interfaces that connect to your private subnet (the IPv4 10 . 0. 0.0/24 subnet). You test IPv6 connectivity between your client and domain controller.

Was this article helpful?

0 0
The Ultimate Computer Repair Guide

The Ultimate Computer Repair Guide

Read how to maintain and repair any desktop and laptop computer. This Ebook has articles with photos and videos that show detailed step by step pc repair and maintenance procedures. There are many links to online videos that explain how you can build, maintain, speed up, clean, and repair your computer yourself. Put the money that you were going to pay the PC Tech in your own pocket.

Get My Free Ebook


Responses

  • myrtle smallburrow
    What is the netsh command to set ipv4 before ipv6?
    7 years ago

Post a comment