The command netstat -r gives the computer's routing table:C:\>arp -a Interface: 205.153.63.30 on Interface 2 Internet Address Physical Address Type 205.153.63.1 00-00-a2-c6-28-44 dynamic 205.153.63.239 00-60-97-06-22-22 dynamic
As you can see, the format is a little different, but it supplies the same basic information. (You can also use the command route print to list the routing table.) You can use netstat -a to get the active connections and services. There really isn't an option that is analogous to -i in Unix's netstat (the option to display attached interfaces). For a listing of the basic syntax and available commands, try netstat /?. While Windows does not provide ps, both Windows NT and Windows 2000 provide the Task Manager (taskmgr.exe), a utility that can be used to see or control what is running. If you have the Windows Resource Kit, three additional utilities, process viewer (pviewer.exe), process explode (pview.exe), and process monitor (pmon.exe), are worth looking at. All four can be started by entering their names at Start Run. The Task Manager can also be started by pressing Ctrl-Alt-Delete and selecting Task Manager from the menu or by right-clicking on a vacant area on the task bar at the bottom of the screen and selecting Task Manger from the menu. You won't need NT's administrator privileges to use the DOS-based commands just described. If you want to reconfigure the system or if you need additional details, you will need to turn to the utilities provided by Windows. For NT, this will require administrator privileges. (You'll also need administrative privileges to make changes with arp or route.) This is available from Start Settings Control Panel Network or by following a similar path from My Computer. Select the appropriate tab and fields as needed. If you are interested in port scanners, a number are available. I have already mentioned that the Chesapeake Port Scanner will run under Windows. Scan the Internet for others. Finally, for the really brave of heart, you can go into the registry. But that's a subject for another book. (See Paul Robichaux's Managing the Windows 2000 Registry or Steven Thomas's Windows NT 4.0 Registry.)C:\>netstat -r Route Table =========================================================================== Interface List 0x1 ........................... MS TCP Loopback interface 0x2 ...00 10 5a a1 e9 08 ...... 3Com 3C90x Ethernet Adapter 0x3 ...00 00 00 00 00 00 ...... NdisWan Adapter =========================================================================== =========================================================================== Active Routes: Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 205.153.63.1 205.153.63.30 1 127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1 205.153.63.0 255.255.255.0 205.153.63.30 205.153.63.30 1 205.153.63.30 255.255.255.255 127.0.0.1 127.0.0.1 1 205.153.63.255 255.255.255.255 205.153.63.30 205.153.63.30 1 224.0.0.0 224.0.0.0 205.153.63.30 205.153.63.30 1 255.255.255.255 255.255.255.255 205.153.63.30 205.153.63.30 1 =========================================================================== Active Connections Proto Local Address Foreign Address State TCP jsloan:1025 localhost:1028 ESTABLISHED TCP jsloan:1028 localhost:1025 ESTABLISHED TCP jsloan:1184 205.153.60.247:telnet ESTABLISHED TCP jsloan:1264 mail.lander.edu:pop3 TIME_WAIT
2.2. System Configuration Files | 3. Connectivity Testing |
Copyright © 2002 O'Reilly & Associates. All rights reserved.