Copyright © 2001, 2002 Fault Correction and Maintenance, Cablecom GmbH
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Table of Contents
These are the tools developed for various network management tasks in a carrier evnironment. They are designed to work with various Cisco IOS devices, including ATM switches (LS1010, MSR8540), MPLS and legacy routers.
In short, the functionality of the tools includes: device inventory listings; ATM: PNNI topology reports, complete VCC reference, VCC status report, VCC tracking tool; MPLS: TDP/LDP/IS-IS topology reports, VRF inventory reports; Cisco72XX bandwidth points analysis.
Unix-like operating system or operating environment (tools were developed and tested under Cygwin, the set of libraries and utilities representing UNIX environment on a Windows machine).
Perl standard installation. The package was tested with Version 5.6.1. If not /usr/bin/perl, the Perl binary location must be specified in Makefile.
Perl modules from CPAN:
XSLT Processor. Some tools produce XML output, and there are few XSL templates for translating this output into HTML or CSV (Comma-separated Values) format.
By the moment, the tools were tested with the XSLT processor developed in GNOME project. The source distribution can be downloaded from ftp://ftp.gnome.org/pub/GNOME/stable/latest/sources/. Required packages are:
libxml2: generic libraries for XML processing (tested with Version 2.4.11) |
libxslt: XSLT processor, by default is installed as /usr/local/bin/xsltproc (tested with Version 1.0.8) |
DocBook XML DTD. This documentation is written in DocBook XML format. The complete reference of this format can be found at http://docbook.org/tdg/en/html/docbook.html. The DTD files are used for XML translation. Version 4.1.2 is available at the DocBook home site: http://www.docbook.org/xml/4.1.2/docbkx412.zip We assume that the templates are installed in /usr/local/lib/docbook-xml-dtd. You need this only if you are going to make changes to the documentation.
DocBook XSL templates. The templates are used for translation of the DocBook files into HTML. The distribution of the templates is available at http://docbook.sourceforge.net/projects/xsl/. We assume that the templates are installed in /usr/local/lib/docbook-xsl. You need this also only if you are going to make changes to the documentation.
Unpack the archive in your directory
Run make install. If needed, the following makefile variables can be overriden:
INSTALL_DIR=/usr/local/nmstools |
DATA_DIR=/var/nmstools |
HTML_DIR=/var/nmstools/htdocs |
PERL=/usr/bin/perl |
Futher in this manual, $NMSTOOLS_HOME means the directory path specified as INSTALL_DIR. Also $NMSTOOLS_DATA means the path specified as DATA_DIR. These and other variables are defined and exported in $NMSTOOLS_HOME/bin/envvars.sh.
Edit $NMSTOOLS_HOME/etc/devlogin.conf. Configuration options are:
On the next run of make install, the contents of $NMSTOOLS_HOME/etc/ are not overwritten, thus all local settings are preserved.
Template | Replaced with | Default value | Description |
---|---|---|---|
%%NMSTOOLS_HOME%% | $(INSTALL_DIR) | /usr/local/nmstools | Installation Directory for NMS Tools |
%%NMSTOOLS_DATA%% | $(DATA_DIR) | /var/nmstools | Data produced by the tools |
%%NMSTOOLS_HTML%% | $(DATA_DIR)/htdocs | /var/nmstools/htdocs | HTML and other web-accessed files generated |
%%PERL%% | $(PERL) | /usr/bin/perl | Perl executable location |
The file $NMSTOOLS_HOME/lib/httpd.conf needs to be included into HTTPD confoguration, as follows:
# Include NMSTOOLS definitions Include /usr/local/nmstools/lib/httpd.conf
The contents of $NMSTOOLS_HOME/lib/httpd.conf define the aliases and the ability to see the contents of the directories, as follows:
Alias /nmstools "%%NMSTOOLS_HTML%%" ScriptAlias /cgi-bin/nmstools "%%NMSTOOLS_HOME%%/cgi-bin" <Directory "%%NMSTOOLS_HTML%%"> Options Indexes AllowOverride None </Directory>
This very documentation is written in accordance to DocBook XML standard. Docbook sources are located in doc/docbook directory.
DocBook XSL Stylesheets are used for transforming the DocBook sources into HTML. The Makefile in doc/ directory creates HTML files in doc/html/, in two forms: a single file called nmstools-singlefile.html, and a set of chunked HTML files, one per section, starting with index.html. At the moment of writing, two versions of XSL stylesheets are tested: 1.47-exp and 1.45.
In the main distribution directory, make install puts all HTML documentation files into $NMSTOOLS_HTML/doc directory.The directories on a Cablecom server are set to these values:
INSTALL_DIR=/usr/local/nmstools |
DATA_DIR=/usr/local/nmstools/var |
HTML_DIR=/usr/local/nmstools/htdocs |
PERL=/usr/local/bin/perl |
The script called install-cablecom.sh executes make install with the parameters above.
Every morning at 6:00 AM Cron executes the Shell script /usr/local/nmstools/bin/cronjob-daily.sh. It collects and processes all the data needed from Cablecom devices.
In Cablecom internal network, the network management server is called hsrvpnsc1.cablecom.net [62.2.22.188]. The access is allowed over HTTPS only, with local user authentication. User management script is accessed by the URL https://hsrvpnsc1.cablecom.net/cgi-bin/user_manage.
NMSTOOLS data is visible by the following URLs:
Table of Contents
atm_collectrunning.pl — retrieve running status from all devices
$NMSTOOLS_HOME/bin/atm_collectrunning.pl
$NMSTOOLS_DATA/atm/nodelist |
The program logs into each device listed in $NMSTOOLS_DATA/atm/nodelist, and saves the output of various show commands into the corresponding directories.
atm_getpnnitopo.pl — retrieve and process ATM PNNI topology information
$NMSTOOLS_HOME/bin/atm_getpnnitopo.pl
The program logs into the device specified in PNNISEEDNODE, and processes the output of show atm pnni topology command.
atm_nniifdescr.pl — Configure interface descriptions on NNI neighbours
$NMSTOOLS_HOME/bin/atm_nniifdescr.pl [--nodelist nodelistfile]
$NMSTOOLS_DATA/atm/nodelist |
The program logs into each device specified in the list file, and configures interface descriptions on all NNI interfaces, as Link to Node Interface.
atm_track.pl — track one or many ATM VC/VP connections, with short XML report
$NMSTOOLS_HOME/bin/atm_track.pl {device name}
[--out outfile] [--vc interface_vpi_vci] [--vc interface_vpi]
[--vp interface_vpi] [--vp interface]
[--all]
The program tracks the specified connections hop-by-hop, with minimal report output. If --all option is not specified, tracks soft connections only.
atm_trackvc.pl, atm_trackvp.pl, trackbatch.pl — track single ATM VC/VP, with detailed report
$NMSTOOLS_HOME/bin/atm_trackvc.pl {device name} {interface} {vpi} {vci} {outfile}
$NMSTOOLS_HOME/bin/atm_trackvp.pl {device name} {interface} {vpi} {outfile}
$NMSTOOLS_HOME/bin/trackbatch.pl {command file}
atmvc {device name} {interface} {vpi} {vci} |
atmvp {device name} {interface} {vpi} |
The programs track the specified connection hop-by-hop, with detailed report HTML output.
atm_vcref.pl — build complete VC reference for ATM network
$NMSTOOLS_HOME/bin/atm_vcref.pl
$NMSTOOLS_DATA/atm/configs/* |
$NMSTOOLS_DATA/atm/atmaddr/* |
The program processes files created by atm_collectrunning.pl, and presents the data in XML files ready for further processing.
atm_vcstatus.pl — Check the running status of all VCs
$NMSTOOLS_HOME/bin/atm_vcstatus.pl
$NMSTOOLS_DATA/atm/nodes.xml |
$NMSTOOLS_DATA/atm/connections.xml |
The program performs telnet connection to all ATM switches and checks the status of every VC listed in connections.xml. The VC is considered IDLE if there's no traffic in or out since last running of atm_vcstatus.pl.
c7200-bwpt.pl — Analyze the Cisco 7200 chassis for bandwidth points compliance
$NMSTOOLS_HOME/bin/c7200-bwpt.pl {--base dirname | --telnet} {--nodelist filename | --node hostname} [--out outfile] [--verbose]
The program analyses "show diag" output of specified Cisco 7200 routers and calculates the bandwidth poits according to Cisco recomendations.
Depending on the options given, the program either performs telnet connections, or reads the "show diag" reports from the specified directory tree (specify either --telnet or --base option). The program analyses either one (specified with --node), or several devices (hostnames read from the file given with --nodelist option).
ios_devlist.pl — Generate simple list of all devices
$NMSTOOLS_HOME/bin/ios_devlist.pl {--base dirname} | {--nodes filename --chassis dirname --configs dirname --out outfile} [--noconfigs]
The program analyses the output of "show ver" and "show running" and builds the list of devices, including the device name, chassis platform, IOS version, and Loopback0 IP address.
ios_showtech.pl — Generate "show tech" report for a number of devices
$NMSTOOLS_HOME/bin/ios_showtech.pl {nodelist} [--dir outdir]
The program performs telnet connection to the given list of devices, and saves the logs in the specified directory or in the current directory.
lib_nmstools — Library for NMSTOOLS common functions
require '%%NMSTOOLS_HOME%%/lib/lib_nmstools.pl'; nms_readconfig( "devlogin" ); my $nodelist = $nms_config{'env'}{'DATA'} . '/atm/nodelist'; $hostname .= '.' . $nms_config{'devlogin'}{'DEVDOMAINNAME'}; nms_enumnodes( $nodelistfile, \&callback ); my $telnet = nms_opentelnet( $hostname ); if( $telnet ) { print $telnet "show version\r"; print $telnet "exit\r"; $telnet->close(); } else { print STDERR "Cannot connect to $hostname"; } my $namestring = nms_interfaceref( $hostname, $interface );
These library routines are used for establishing the telnet connections to the network devices.
Configuration options initialized by nms_readconfig(). It's a two-dimensional hash array, with the first hash pointing to the configuration filename, and the second hash referencing the configuration options. Also the NMSTOOLS environment variables are initialized into the array as follows:
$nms_config{'env'}{'HOME'} |
$nms_config{'env'}{'DATA'} |
$nms_config{'env'}{'HTML'} |
mpls_collectrunning.pl — retrieve running status from all devices
$NMSTOOLS_HOME/bin/mpls_collectrunning.pl
$NMSTOOLS_DATA/mpls/nodelist |
The program logs into each device listed in $NMSTOOLS_DATA/mpls/nodelist, and saves the output of various show commands into the corresponding directories.
mpls_getisistopo.pl — retrieve and process MPLS ISIS topology information
$NMSTOOLS_HOME/bin/mpls_getisistopo.pl
The program logs into the device specified in ISISSEEDNODE, and processes the output of show isis topology command.
mpls_vrfinventory.pl — build complete vrf reference for MPLS network
$NMSTOOLS_HOME/bin/mpls_vrfinventory.pl
$NMSTOOLS_DATA/mpls/configs/* |
$NMSTOOLS_DATA/mpls/vrfs/* |
$NMSTOOLS_DATA/mpls/vrfprot/* |
The program processes files created by mpls_collectrunning.pl, and presents the data in XML files ready for further processing.
mpls_tdptopo.pl — Process MPLS TDP topology information
$NMSTOOLS_HOME/bin/mpls_tdptopo.pl
The program processes the output of show running-config and show tag-switching tdp neighbor commands, and generates the detailed topology report in XML format. This XML file can be processed by tdptopo-html.xsl XSL template
mpls_track.pl — track MPLS label switching path, with HTMl report
$NMSTOOLS_HOME/bin/mpls_track.pl {device name} [--out outfile] {--vrf vrfname} {--route A.B.C.D}
The program tracks the label swithcing path of the specified VRF route hop by hop, including equal-length paths.
runiosbatch.pl — Run Cisco IOS commands from a batch file
$NMSTOOLS_HOME/bin/runiosbatch.pl {cmdfile}
The program executes the given IOS commands on given devices, step by step. Afer each command, it expects for "#" prompt.
Warning: If a confirmation quiestion appears (i.e. "[confirm]"), runiosbatch.pl sends carriage return to the device!
runioscmd.pl — Run Cisco IOS commands
$NMSTOOLS_HOME/bin/runioscmd.pl {nodelistfile} {cmdfile}
The program executes the given IOS commands on each device, step by step. Afer each command, it expects for "#" prompt.
Warning: If a confirmation quiestion appears (i.e. "[confirm]"), runioscmd.pl sends carriage return to the device!
XSL Templates — templates for XML conversion
xsltproc [--output outfile] {xsl_template} {xml_input}
$NMSTOOLS_HOME/bin/atm_procxml.sh
$NMSTOOLS_HOME/bin/mpls_procxml.sh
XSL Template: | $NMSTOOLS_HOME/lib/atmtrack-endpoints.xsl |
Description: | Processes ATM track results and lists the endpoints |
Input File: | trackresults.xml (atm_track.pl) |
Output Format: | Plain Text |
XSL Template: | $NMSTOOLS_HOME/lib/atmtrack-html.xsl |
Description: | Produces ATM track results detailed report |
Input File: | trackresults.xml (atm_track.pl) |
Output Format: | HTML |
XSL Template: | $NMSTOOLS_HOME/lib/nsapref-csv.xsl |
Description: | Per-interface NSAP address reference |
Input File: | $NMSTOOLS_DATA/atm/nodes.xml (atm_vcref.pl) |
Output File: | $NMSTOOLS_HTML/atm/nsapref.csv |
Output Format: | CSV |
XSL Template: | $NMSTOOLS_HOME/lib/pnnitopo-html.xsl |
Description: | ATM PNNI Topology Report |
Input File: | $NMSTOOLS_DATA/atm/pnnitopo.xml (atm_getpnnitopo.pl) |
Output File: | $NMSTOOLS_HTML/atm/pnnitopo.html |
Output Format: | HTML |
XSL Template: | $NMSTOOLS_HOME/lib/tdptopo-html.xsl |
Description: | MPLS TDP Topology Report. Accepts optional parameter: --param verbose "'yes'" for more detailed output. |
Input File: | $NMSTOOLS_DATA/mpls/tdptopo.xml' (mpls_tdptopo.pl) |
Output Files: | $NMSTOOLS_HTML/mpls/tdptopo.html |
$NMSTOOLS_HTML/mpls/tdptopo-verbose.html | |
Output Format: | HTML |
XSL Template: | $NMSTOOLS_HOME/lib/vcref-csv.xsl |
Description: | Complete VC reference |
Input File: | $NMSTOOLS_DATA/atm/connections.xml (atm_vcref.pl) |
Also Uses: | $NMSTOOLS_DATA/atm/nodes.xml (atm_vcref.pl) |
Output File: | $NMSTOOLS_HTML/atm/vcref.csv |
Output Format: | CSV |
These XSL templates are designed for transformation of XML data produced by various scripts, into a human-readable format, CSV (Comma-Separated Values) or HTML.