Open Source Network Administration

Book description

In Open Source Network Administration, MIT netadmin James M. Kretchmar introduces an extraordinary collection of open source tools for streamlining and improving network management, monitoring, alerting, optimization, troubleshooting, and much more. Kretchmar provides detailed explanations, plus easy instructions for retrieval, installation from source, configuration, and usage. He covers SNMP, MRTG, Neo, Flow-Tools, Oak, Sysmon, Nagios, Tcpdump, and much more-even building your own tools with Perl. An indispensable resource for every network administrator.

Table of contents

  1. Copyright
    1. Dedication
  2. Prentice Hall PTR Series in Computer Networking and Distributed Systems
  3. About Prentice Hall Professional Technical Reference
  4. Foreword
  5. Acknowledgments
  6. 1. Introduction
    1. 1.1. Network Administration
    2. 1.2. Why Open Source?
      1. 1.2.1. The Price Is Right
      2. 1.2.2. Eggs in Your Basket
      3. 1.2.3. You Might Find You Get What You Need
      4. 1.2.4. The Question of Quality
      5. 1.2.5. Is It Secure?
      6. 1.2.6. Support
    3. 1.3. Tools in This Book
    4. 1.4. Environment
    5. 1.5. Background
    6. 1.6. Terminology and Conventions
  7. 2. SNMP
    1. 2.1. Overview of SNMP
      1. 2.1.1. SNMP
      2. 2.1.2. Variables and the MIB
      3. 2.1.3. Object Identifiers and Variable Hierarchy
      4. 2.1.4. Variable Instances for Simple Variables
      5. 2.1.5. Introduction to Tables
      6. 2.1.6. Lexicographic Ordering and Get-Next-Request
      7. 2.1.7. Traps
    2. 2.2. What SNMP Can Help You Do
      1. 2.2.1. The System Group
      2. 2.2.2. The Interfaces Group
      3. 2.2.3. ip.ipNetToMediaTable
      4. 2.2.4. The Bridge MIB
    3. 2.3. Installing SNMP Tools
      1. 2.3.1. Building from Source
      2. 2.3.2. Build and Install
    4. 2.4. Using SNMP Tools
      1. 2.4.1. Snmpget
      2. 2.4.2. Snmpset
      3. 2.4.3. Snmpwalk
      4. 2.4.4. Snmptrapd
      5. 2.4.5. Other Tools
      6. 2.4.6. Dealing with MIBs
      7. 2.4.7. Scripting with SNMP Tools
    5. 2.5. Maintaining SNMP Tools
    6. 2.6. References and Further Study
  8. 3. MRTG
    1. 3.1. Overview of MRTG
    2. 3.2. What MRTG Can Help You Do
    3. 3.3. Installing MRTG
      1. 3.3.1. Building the PNG Library
      2. 3.3.2. Building the GD Library
      3. 3.3.3. Building MRTG
    4. 3.4. Configuring MRTG
      1. 3.4.1. Generating the Configuration File
      2. 3.4.2. Other Configuration Options
      3. 3.4.3. Generating Initial Data
      4. 3.4.4. Generating Index Pages
      5. 3.4.5. Setting Up Regular Data Gathering
    5. 3.5. Using MRTG
      1. 3.5.1. Faulty Data
      2. 3.5.2. Missing Data
    6. 3.6. Maintaining MRTG
    7. 3.7. References and Further Study
  9. 4. Neo
    1. 4.1. Overview of Neo
    2. 4.2. What Neo Can Help You Do
      1. Locating Hosts and the Forwarding Table
      2. Translating an IP Address to a Hardware Address
      3. Obtaining Traffic Statistics
      4. Disabling or Enabling a Port
      5. Power, Environmental, and General Device Information
      6. Other Functionality
    3. 4.3. Installing Neo
    4. 4.4. Using Neo
      1. 4.4.1. The Command Prompt
      2. 4.4.2. The Location Syntax
        1. The Device Designator
        2. The Port Syntax
      3. 4.4.3. Variables
      4. 4.4.4. The Arpfind Command
      5. 4.4.5. The Locate Command
      6. 4.4.6. The Port Command
      7. 4.4.7. The Device Summary Command
      8. 4.4.8. The Device Info Command
      9. 4.4.9. The Stats Command
      10. 4.4.10. Online Help
      11. 4.4.11. Command Line Arguments
      12. 4.4.12. Other Commands
      13. 4.4.13. Using Neo in Degraded Network Conditions
    5. 4.5. Examples of Use
      1. Finding and Disabling a Host
      2. Locating a Problem and Disabling It
      3. Using Neo in a Script
    6. 4.6. Maintaining Neo
    7. 4.7. References and Further Study
  10. 5. NetFlow
    1. 5.1. Overview of NetFlow and Flow-Tools
    2. 5.2. What NetFlow Can Help You Do
    3. 5.3. How NetFlow Works
      1. 5.3.1. Flows
      2. 5.3.2. NetFlow and Switching Paths
      3. 5.3.3. Exporting NetFlow Data
      4. 5.3.4. NetFlow Versions
    4. 5.4. Installing Flow-Tools
    5. 5.5. Configuring NetFlow on the Router
    6. 5.6. Using Flow-Tools
      1. 5.6.1. Capturing Flows
        1. Bounding the Data Size
        2. Changing Directory Nesting
        3. Changing the File Rotation Rate
        4. Changing the Process ID File
        5. Using Compression
        6. Killing Flow-Capture
        7. Allowing Remote Clients
      2. 5.6.2. Viewing Flow Data
        1. Flow-Print
        2. Flow-Report
        3. Flow-Stat
        4. Flow-Dscan
      3. 5.6.3. Manipulating Flow Data
        1. Flow-Cat and Flow-Merge
        2. Flow-Split
        3. Flow-Expire
        4. Flow-Header
        5. Flow-Fanout
        6. Other Flow-Tools Programs
    7. 5.7. References and Further Study
  11. 6. Oak
    1. 6.1. Overview of Oak
    2. 6.2. What Oak Can Help You Do
    3. 6.3. Installing Oak
    4. 6.4. Using Oak
      1. 6.4.1. Configuring Syslog on Unix Workstations
      2. 6.4.2. Configuring Syslog on Network Devices
      3. 6.4.3. An Introduction to Regular Expressions
        1. The . Character
        2. The + and * Modifiers
        3. The [ ] Operator
        4. The ^ and $ and Anchors
        5. Quoting with \
        6. Substitution with ( )
      4. 6.4.4. Configuring Oak
        1. Global Options
        2. Defining Queues
        3. Defining Regular Expressions
        4. Running Oak
        5. A Small Sample Configuration
    5. 6.5. Maintaining Oak
    6. 6.6. References and Further Study
  12. 7. Service Monitoring
    1. 7.1. Overview of Service Monitoring
    2. 7.2. What Service Monitoring Can Help You Do
    3. 7.3. Installing Sysmon
      1. 7.3.1. Where to Place the Server
      2. 7.3.2. How to Install Sysmon
    4. 7.4. Using Sysmon
      1. Starting the Sysmon Daemon
      2. Stopping the Sysmon Daemon
      3. Pausing Sysmon
      4. Reloading the Configuration
      5. Connecting with a Remote Client
      6. Other Runtime Options
    5. 7.5. Configuring Sysmon
      1. 7.5.1. The Root Node
      2. 7.5.2. Objects and Dependencies
        1. The Object Name
        2. Setting the IP Address
        3. Setting the Test Type
        4. Setting the Object Description
        5. Specifying Dependencies
        6. Setting the Contact
        7. Using the Spawn Option
        8. Other Object Options
      3. 7.5.3. Global Options
        1. The Status File
        2. Viewing Both Up and Down Services
        3. Mail Header Options
        4. Test Queuing Options
        5. DNS Options
        6. Message Formatting Options
        7. Using Variables
        8. Using Includes
        9. Other Global Options
    6. 7.6. Maintaining Sysmon
    7. 7.7. Nagios
    8. 7.8. References and Further Study
  13. 8. Tcpdump
    1. 8.1. Overview of Tcpdump
    2. 8.2. What Tcpdump Can Help You Do
      1. 8.2.1. Limitations of Tcpdump
    3. 8.3. Installing Tcpdump
      1. 8.3.1. You May Already Be a Winner
      2. 8.3.2. Which Version to Build
      3. 8.3.3. The Pcap Library
      4. 8.3.4. Tcpdump
    4. 8.4. Using Tcpdump
      1. 8.4.1. Running as Root
      2. 8.4.2. Command Line Options
        1. -n
        2. -s snaplen
        3. -x
        4. -v and -vv
        5. -q
        6. -i interface
        7. -e
        8. -l
        9. -w file and -r
      3. 8.4.3. Filters
      4. 8.4.4. Command Line Examples
      5. 8.4.5. Understanding the Output
        1. UDP Output Format
        2. TCP Output Format
      6. 8.4.6. Viewing Packet Data
      7. 8.4.7. Seeing It All
        1. Monitoring on Cisco CatOS Devices
        2. Monitoring on Cisco IOS Devices
    5. 8.5. Examples of Debugging with Tcpdump
      1. 8.5.1. Packet Flooding
      2. 8.5.2. A More Complicated Example
    6. 8.6. Maintaining Tcpdump
    7. 8.7. Other Packet Analyzers
    8. 8.8. References and Further Study
  14. 9. Basic Tools
    1. 9.1. Ping
      1. 9.1.1. How Ping Works
        1. Options for Ping
        2. Pinging from Network Devices
        3. Running an Effective Ping Test
    2. 9.2. Telnet
    3. 9.3. Netcat
      1. 9.3.1. Installing Netcat
      2. 9.3.2. Using Netcat
    4. 9.4. Traceroute
      1. 9.4.1. How Traceroute Works
      2. 9.4.2. Installing Traceroute
      3. 9.4.3. Using Traceroute
    5. 9.5. MTR
      1. 9.5.1. Installing MTR
      2. 9.5.2. Using MTR
    6. 9.6. Netstat
  15. 10. Custom Tools
    1. 10.1. Basics of Scripting
      1. 10.1.1. Running a Script
      2. 10.1.2. Naming Conventions
      3. 10.1.3. Local and Environment Variables
    2. 10.2. The Bourne Shell
      1. 10.2.1. Basics of the Bourne Shell
      2. 10.2.2. Using Variables
      3. 10.2.3. Local and Environment Variables
      4. 10.2.4. Exit Status
      5. 10.2.5. Conditionals
      6. 10.2.6. Arguments
      7. 10.2.7. Loops
      8. 10.2.8. Using Command Output
      9. 10.2.9. Working with Input and Output
      10. 10.2.10. Functions
      11. 10.2.11. Other Miscellaneous Items
        1. Interpreting Another File
        2. Exiting
        3. Traps
        4. The Process ID
        5. Comments
    3. 10.3. Perl
      1. 10.3.1. Basics of Perl
      2. 10.3.2. Using Variables
      3. 10.3.3. Local and Environment Variables
      4. 10.3.4. Conditionals
      5. 10.3.5. Text Manipulation
      6. 10.3.6. Lists
      7. 10.3.7. Hashes
      8. 10.3.8. Reading from a File
      9. 10.3.9. Writing to a File
      10. 10.3.10. Arguments
      11. 10.3.11. Loops
      12. 10.3.12. Using Command Output
      13. 10.3.13. Subroutines
      14. 10.3.14. Exiting
      15. 10.3.15. Perl for Network Monitoring Scripts
    4. 10.4. Programming Monitors
      1. 10.4.1. Loop Timing
      2. 10.4.2. State Machines
      3. 10.4.3. Keeping It Running
      4. 10.4.4. Sending Nicer Mail with Sendmail
    5. 10.5. Running Programs from Cron
    6. 10.6. References and Further Study

Product information

  • Title: Open Source Network Administration
  • Author(s): James Kretchmar
  • Release date: September 2003
  • Publisher(s): Pearson
  • ISBN: 9780130462107