Type the following syntax to modify the IPv4 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. 116 | Lesson 5 If it has two and only two network adapters, it is specifically known as a dual-homed machine.

10. Type the command route print. This should display results similar to Figure 5-21. This

command gives the same result as netstat –r, but it is more commonly used. Figure 5-21 Route print This command shows a list of network adapters or interfaces on the local computer, including the MAC address and name of each. Then the IPv4 Route Table is displayed. You will notice several networking connections. The Network Destination column tells you where the computer is trying to connect. The Netmask is the subnet mask for that particular Network Destination. The Gateway is the IP address of the host that is used to gain access to the remote network. The Interface is the IP address of the net- work adapter that is making the connection to the other network. The Metric column specifies an integer between 1 and 9999; this metric is associated with the speed of the connection, the amount of hops across networks, and so on. Normally, the lowest metric is selected for connections to other networks. This is not an issue if the com- puter often a router only has two or three connections. You will notice a 0.0.0.0 network destination. This is the local network when no IP address is associated with the computer for example, when we executed the com- mand ipconfigrelease. Then you will see the local network that the computer is a part of; in the figure, it is 10.254.254.0, with a subnet mask of 255.255.255.0. This is the network number for this computer, which has an IP address of 10.254.254.112. Single IP addresses also get a route line item, as you can see in the third line. The local loopback network 127.0.0.0 and the actual local loopback IP address 127.0.0.1 also get route line items, and so on.