Type the command nbtstat –a [local computername]; for example: nbtstat –a

110 | Lesson 5 11. Type the command nbtstat –a [remotename]. Use the name of a computer on your network that you can connect to with ping. The results of the nbtstat command will display the major services that are running on that machine. For example, 00 is the workstation service, used to allow connections to remote computers. 20 is the server service, used to allow other computers to connect to the local computer. If you see 03, this is the messenger service. Many organizations have policies stating that this should be turned off. This command works well to discern the services running on a local or remote machine and can help when troubleshooting why a computer cannot make particular network connections. You can also connect by IP address. 12. Type the command nbtstat –A [IPAddress]; for example, nbtstat –A 10.254.254.205. This produces the same information but allows you to connect via IP address. So, the lowercase “a” option is used for names and the uppercase “A” is used for IP addresses. Let’s attempt to stop a service and view the results with nbtstat:

a. Stop the workstation service on a remote computer. This can be done in the

Computer Management console window or by typing the command net stop workstation.

b. Next, run the nbtstat –A command to that remote computer’s IP address. You

should see that the 00 service is no longer listed.

c. Restart the service on the remote computer within Computer Management.

d. Run the nbtstat –A command again to verify that it is listed. A restart of the remote computer might be necessary.

13. Type the command nbtstat –r. This displays NetBIOS name resolution statistics.

14. Type the command nbtstat –R. This purges the contents of the NetBIOS name cache

table.

15. Type the command nbtstat –RR. This releases and refreshes NetBIOS names.

The previous two commands are used in conjunction with Lmhosts and WINS, respectively, and they are not commonly employed in today’s networks.

16. Type the command nbtstat –s. This displays NetBIOS sessions and attempts to con-

vert the remote IP addresses to names. You might have to make a network connection or two before this command will display any results.

17. Type the command nbtstat –S. This displays the same sessions as with the –s

parameter. The only difference is that remote computers will be listed by IP address. Generally, it is wise to use uppercase options such as –A and –S. These provide results by IP address, which is usually preferred by network administrators. ANALYZE NETWORK PATHS WITH TRACERT AND PATHPING GET READY. In this exercise, we analyze network paths with tracert and pathping. Both show paths to remote destinations, extending beyond one or more routers, but their syntax and results differ. Plus, pathping analyzes the trace after it makes it, further differentiating it from tracert. An Internet connection is required. 1. Type the command tracert and view the results. This or tracert ? will display the help file for the command. Review the details in the help file. The tracert command shows paths to a destination on another network. It does this by pinging each step along the way three times. The time to live TTL for the pings increases with each “hop” to another network. Implementing TCPIP in the Command Line | 111 2. Attempt a trace to google.com by typing tracert google.com. The results should be similar to Figure 5-15. Figure 5-15 Tracert Each step along the way to google.com is referred to as a hop. Each line in the results is a new network that has been hopped to. Notice the name of each router and its corresponding IP address. Usually, you can track geographically where the ICMP packets are going step by step, just by looking at the router name.

3. Type the command tracert –d google.com. This runs the same trace, but it does

so numerically as shown in Figure 5-16. This is a significant time saver. Notice how much faster the results are shown without any name resolution to get in the way. Figure 5-16 Tracert –d The idea behind this tracert command is that it allows you to find out whether a router has malfunctioned. By comparing the tracert results with your network docu- mentation, you should be able to alert the correct network person to the problem, or perhaps fix the problem yourself. Quite often a router simply needs to be rebooted or turned back on.

4. Type the command pathping google.com. Pathping is similar to tracert but it will

also compute the degree of packet loss, as shown in Figure 5-17. If there is packet loss, it would show up under the LostSent column and would display a percentage as well. If, for some reason, tracert doesn’t work on your computer or is not allowed on your network, you can use web-based reverse tracing tools such as the tools offered on the speedguide.net Web site. TAKE NOTE