getif revisited Microsoft Windows

182 Once you have unpacked everything, youll need to edit the mrtg script so that NT rather than Unix is the operating system. This amounts to commenting out the fourth line of the script and uncommenting the fifth: main::OS = UNIX; main::OS = NT; Also, make sure rateup is in the same directory as mrtg. Creating the configuration file and running the script is basically the same as with the Unix version. Youll want to run cfgmaker and indexmaker. And, as with the Unix version, youll need to edit the configuration file to set WorkDir :. You will need to invoke Perl explicitly and use explicit paths with these scripts. For example, here are the commands to run indexmaker and mrtg on my system: D:\mrtg\runperl d:\mrtg\run\indexmaker d:\mrtg\run\mrtg.cfg d:\apache\htdocs\mrtg D:\mrtg\runperl d:\mrtg\run\mrtg d:\mrtg\run\mrtg.cfg On my system, D:\mrtg\run is the directory where mrtg is installed and D:\apache\htdocs\mrtg is where the output is put so it can be accessed by the web server. Finally, youll need to make some provision to run mrtg periodically. As noted, you can use supplied code to add it to the scheduler. Alternately, you can edit the configuration file to have it run as a daemon. For example, you could add the following to your configuration file: RunAsDaemon: yes Interval: 5 Youll want to add mrtg to the startup group so that it will be run automatically each time the system is rebooted.

8.6.2 getif revisited

In Chapter 7 , we introduced getif but did not discuss the graph tab. Basically, the graph tab provides for two types of graphs—graphs of ping round-trip delays and graphs of SNMP objects. The latter allows us to use getif as a traffic-monitoring tool. Graphing SNMP objects is a three-step process. First, youll need to go back to the Parameters tab and identify the remote system and set its SNMP community strings. Next, youll need to visit the MBrowser tab and select the objects you want to graph. Locate the objects of interest by working your way down the MIB tree in the large pane on the upper left of the window. Visit the object by clicking the Walk button. The object and its value should be added to the large lower pane. Finally, select the item from the large pane and click on the Add to Graph button. Both of these tabs were described in Chapter 7 . You can now go to the Graph tab. Each of the selected variables should have been added to the legend to the right of the chart. You can begin collecting data by clicking on the Start button. Figure 8-11 shows one such graph. Figure 8-11. getif graph 183 The controls along the bottom of the page provide some control over the appearance of the chart and over the sampling rate. 184

Chapter 9. Testing Connectivity Protocols

This chapter and the next describe tools used to investigate protocol-specific behavior. In this chapter, I describe tools used to explore connectivity protocols, protocols that work at the network and transport levels to provide connectivity. Chapter 10 focuses on tools used in testing protocols at the application level. I begin with a description of packet generation tools. Custom packet generators, like hping and nemesis, will allow you to create custom packets to test protocols. Load generators, like MGEN, will let you flood your network with packets to see how your network responds to the additional traffic. We conclude with a brief discussion of network emulators and simulators. Many of the tools described in this chapter and the next are not tools that you will need often, if ever. But should the need arise, you will want to know about them. Some of these tools are described quite briefly. My goal is to familiarize you with the tools rather than to provide a detailed introduction. Unless you have a specific need for one of these tools, youll probably want to just skim these chapters initially. Should the need arise, youll know the appropriate tool exists and can turn to the references for more information.

9.1 Packet Injection Tools

This first group of tools generates and injects packets into your network. Basically, there are two different purposes for generating packets, each with its own general approach and its own set of tools. First, to test software configuration and protocols, it may be necessary to control the content of individual fields within packets. For example, customized packets can be essential to test whether a firewall is performing correctly. They can also be used to investigate problems with specific protocols or to collect information such as path MTU. They are wonderful learning tools, but using them can be a lot of work and will require a very detailed knowledge of the relevant protocols. The second reason for generating packets is to test performance. For this purpose, you typically generate a large number of packets to see how your network or devices on the network respond to the increased load. We have already done some of this. In Chapter 4 , we looked at tools that generated streams of packets to analyze link and path performance. Basically, any network benchmark will have a packet generator as a component. Typically, however, you wont have much control over this component. The tools described here give you much greater control over the number, size, and spacing of packets. Unlike custom packet generators, load generators typically wont provide much control over the contents of the packets. These two uses are best thought of as extremes on a continuum rather than mutually exclusive categories. Some programs lie somewhere between these two extremes, providing a moderate degree of control over packet contents and the functionality to generate multiple packets. There is no one ideal tool, so you may want to become familiar with several, depending on your needs.

9.1.1 Custom Packets Generators