Type the command netsh ? and view the results. This help file shows the basic

114 | Lesson 5 2. Type the command netsh. This allows you to access the netsh shell. From here, if you press the ? key, you will see a list of first-level commands, essentially the same that were in the help file previously. These are shown in Figure 5-19. Figure 5-19 Netsh

3. Type the command interface. This will bring you to the netsh interface portion of the

netsh shell. From here, you can make modifications to network adapter configurations.

4. Type quit to exit out of the netsh shell.

5. Modify, add, and remove IPv4 addresses.

For the next several portions of this exercise, it is assumed that the name of the net- work adapter is “Local Area Connection.” If you are using a different name, please substitute that name in any of the applicable syntax. If it is easier for you, or if you encounter any problems, consider changing the name of the network adapter from “Local Area Connection” to “LAN” if you have not already done so. Be sure to use the new name “LAN” where necessary in the syntax.

a. Type the following syntax to modify the IPv4 address:

netsh interface ip set address name=”Local Area Connection” static 192.168.1.101 255.255.255.0 192.168.1.1 “Local Area Connection” is the name of your network adapter. If you have modi- fied the name to lan or something different, make sure that is what you type within the quotations. This syntax changes the IPv4 address and modifies the gateway address. Implementing TCPIP in the Command Line | 115 b. Type ipconfig to see the new address. c. Type the following syntax to add an IPv4 address: netsh interface ip add address name=”Local Area Connection” 192.168.1.102 255.255.255.0 192.168.1.1

d. Type ipconfig to see the secondary address. It should be labeled as tentative,

whereas the original IP address is preferred. The results should look similar to Figure 5-20. Figure 5-20 A secondary tentative IP address

e. Type the following syntax to remove the secondary IPv4 address:

netsh interface ip delete address name=”Local Area Connection” 192.168.1.102 255.255.255.0

f. Type the following syntax to change the primary IP address from static to

dynamically assigned: netsh interface ip set address name=”Local Area Connection” source=dhcp g. Check the new configuration with ipconfig.

h. Reset the preferred IP address back to the original using the syntax from step

5a, substituting the IP address and gateway address with your original correct addresses. Check your changes with ipconfig. You could type these commands one at a time: netsh interface ip and so on, but it would be more time consuming.

6. Add an IPv6 address with the following syntax:

netsh interface ipv6 add address interface=Local Area Connection address=2001:ab1:442e:1323::7

7. Type ipconfig to see the new address.

8. Remove an IPv6 with the following syntax:

netsh interface ipv6 delete address interface=Local Area Connection address=2001:ab1:442e:1323::7

9. Type ipconfig to verify that the address was removed.

If you wish, you can create batch files using various netsh syntax in an effort to save time in the future. Now, let’s discuss the route command. Route enables you to display and make changes to the local IP routing table of the computer, which displays IP connections to other networks as well as testing networks. Generally, a client computer does not have routes to other actual networks, mainly because a client computer is not normally intended for that role. Also, most client computers have only one network adapter. In order to create routes to other networks, a second network adapter is required. When a computer has two network adapters, it is known as a multi-homed machine.