Multicast/IPv6 Looking glass patch for rancid

Janos Mohacsi janos at budapest.dante.org.uk
Wed Jun 26 20:59:04 UTC 2002


Dear All,
	I created some extra commands for the rancid looking glass:
	Multicast looking glass + IPv6 looking glass

	In order to be configurable more flexible I modified the looking
glass in several places:
	1. The lg.conf is holding the commands that is displayed on the
form display. You specify there what to display as command. If you comment
one command, it won't be displayed on the form. This way much easier to
disable certain functionality of looking glass.
	2. I put the queries into different categories: interface,
routing, debugging, multicast, ipv6. On the form display they are
separated by horizontal ruler from each other.
	3. I implemented several multicast looking glass commands. They
are available for Cisco and Juniper. If somebody knows Foundry equivalents
they can add it.
	4. I implemented some ipv6 looking glass commands. They are tested
only on Cisco, but some of them are available for Juniper also.
	5. I added LG_STYLE to the confiuration ( and also to lgform.cgi
and lg.cgi), to support style sheet for consistent web look.

	I attach the patches in three unified diff files.

	Any comment are welcome. Can you incorporate my patches into the
next version of rancid?
	By the way when will be next version?

	Best Regards,
		Janos Mohacsi

-------------- next part --------------
--- lg.cgi.orig	Wed Jun 26 21:10:53 2002
+++ lg.cgi	Wed Jun 26 21:29:03 2002
@@ -23,7 +23,7 @@
 $me =~ s/.*\/(\S+)$/$1/;
 }
 
-use CGI qw/:standard/;
+use CGI qw/:standard escapeHTML/;
 use POSIX qw(strftime);
 use Sys::Syslog;
 use LockFile::Simple qw(lock trylock unlock);
@@ -124,14 +124,14 @@
     local(*CMD);
 
     if ($mfg =~ /foundry/i) {
-	$cmd = $foundryCmd{$type};
 	open(CMD, "sh -c \"flogin -f $cloginrc -c \'$cmd $arg\' $rtr\" 2>&1 |");
+	$cmd = $foundryCmd{$type};
     } elsif ($mfg =~ /juniper/i) {
-	$cmd = $juniperCmd{$type};
 	open(CMD, "sh -c \"jlogin -f $cloginrc -c \'$cmd $arg\' $rtr\" 2>&1 |");
+	$cmd = $juniperCmd{$type};
     } else {
-	$cmd = $ciscoCmd{$type};
 	open(CMD, "sh -c \"clogin -noenable -f $cloginrc -c \'$cmd $arg\' $rtr\" 2>&1 |");
+	$cmd = $ciscoCmd{$type};
     }
     while (<CMD>) {
 	tr/\015//d;
@@ -173,6 +173,7 @@
 }
 # create the page and log the transaction...
 sub print_results {
+
     my($mfg) = @_;
     my($cmd);
 
@@ -180,8 +181,14 @@
     dolog(LOG_INFO, sprintf("%s %s %s %s\n",
 	$ENV{REMOTE_HOST}, $ENV{REMOTE_ADDR}, $ENV{REMOTE_USER},
 	"- - [$timestr] $type $router $arg"));
+    #
     print $query->header;
-    print $query->start_html("Looking Glass Results - $router");
+    if ($LG_STYLE) {
+        print $query->start_html(-title => "LookingGlass Results - $router",
+                                -style => {'src' => $LG_STYLE});
+    } else {
+        print $query->start_html(-title =>"LookingGlass Results - $router");
+    }
 
     $timestr = strftime("%a %b %e %H:%M:%S %Y %Z", gmtime);
 
@@ -195,7 +202,6 @@
     } else {
 	$cmd = $ciscoCmd{$type};
     }
-
     print <<HEAD ;
 	</b></font>
 	<font size=+3><b><h1>Looking Glass Results - $router
@@ -205,9 +211,11 @@
 	<center>
 	<b>Date:</b> $timestr
 	<p>
-	<b>Query:</b> $cmd
-	<br>
+	<b>Query:</b> 
 HEAD
+    print escapeHTML($cmdDisp{$type});
+    print "<b>Real Query:</b> $cmd"; 
+    print "<br>";
 
     if ($arg) { print "<b>Argument(s):</b> $arg\n"; }
     print "</center>\n";
@@ -226,9 +234,9 @@
     print <<END ; 
 	</pre>
 	<!--- end page content --->
-	</body>
 END
 
+    print $LG_INFO;
     print $query->end_html;
     exit;
 
@@ -270,22 +278,36 @@
 
 $query = new CGI;
 
+# TODO check HTTP_REFERER?
+
+
+
 # get form data and validate
 $type = ($query->param('query'))[0];
 $router_param = ($query->param('router'))[0];
 $remote_user = $ENV{REMOTE_USER};
 $arg = ($query->param('args'))[0];
+$arg =~ s/["'`]//g;                     # these are BS in any arg for any query
 # handle multiple args
-$arg =~ s/["'`]//g;			# these are BS in any arg for any query
 @arg = split(' ', $arg);
 
 # verify commands, arguments, etc.
 ($router, $mfg) = split(':', $router_param);
-if (!defined($type) || !defined($router)) {
+if (!defined($type) || !defined($router)  || $router eq '' || !defined($mfg)) {
     $results[0] = "You must at least choose a Query and a router.  Try buying a clue.\n";
     &print_results($mfg);
 }
 
+if ($arg !~ /^[-A-Za-z0-9|_\/ \.^\$]*$/) {
+    $results[0] = "Funny characters in argument; ignoring.\n";
+    &print_results($mfg);
+}
+if (length($arg) >= 50) {
+   $results[0] = "Too long argument string; ignoring. \n";
+    &print_results($mfg);
+}
+	
+
 # conversion of command "type" passed from lgform.cgi to the vendor's syntax.
 %ciscoCmd = (	
 		#acl => "show access-list",
@@ -294,7 +316,7 @@
 		damp => "show ip bgp dampened-paths",
 		framerelay => "show frame-relay pvc",
 		interface => "show interface",
-		intbrief => "show ip interface",	# switch in {interface}
+		intbrief => "show ip interface",
 		log => "show logging",
 		mbgp => "show ip mbgp",
 		mbgpsum => "show ip mbgp summary",
@@ -307,7 +329,18 @@
 		prefix => "show ip bgp",
 		prefixlist => "show ip prefix-list",
 		summary => "show ip bgp summary",
-		trace => "traceroute"
+		trace => "traceroute",
+		pim_neighbor => "show ip pim neighbor",
+		pim_interface => "show ip pim interface",
+		pim_rp => "show ip pim rp mapping",
+		mforw => "show ip mroute",
+		msdp => "show ip msdp summary",
+		msdpsa => "show ip msdp sa-cache",
+		msess => "show ip sdr",
+		mrpf => "show ip rpf",
+		v6_interface => "show ipv6 interface",
+		v6_summary => "show bgp ipv6 summary",
+		v6_bgp => "show bgp ipv6",
 	);
 %foundryCmd = (	
 		#acl => "show access-list",
@@ -335,7 +368,7 @@
 		#aspath => "show ip as-path-access-list",
 		#communitylist => "show ip community-list",
 		damp => "show route damping suppressed terse table inet.0",
-		framerelay => "show frame-relay pvc",
+		#framerelay => "show frame-relay pvc",
 		interface => "show interface",
 		log => "show log messages",
 		mbgp => "show route table inet.2 terse",
@@ -349,7 +382,19 @@
 		prefix => "show route table inet.0",
 		prefixlist => "show policy",
 		summary => "show bgp summary",
-		trace => "traceroute"
+		trace => "traceroute",
+		pim_neighbor => "show pim neighbors",
+		pim_interface => "show pim interface",
+		pim_rp => "show pim rps",
+		pim_join => "show pim join",
+		mforw => "show multicast route extensive",
+		msdp => "show msdp",
+		msdpsa => "show msdp source-active",
+		msess => "show multicast sessions",
+		mrpf => "show multicast rpf",
+		v6_interface => "show interface",
+		v6_summary => "show bgp summary",
+		v6_route => "show route table inet6.0",
 	);
 %cmdDisp = (	
 		#acl => "show access-list",
@@ -373,7 +418,37 @@
 		trace => "traceroute"
 	);
 
-# not all cmds/queries are implemented for junipers
+#construct Display command from configuration
+#empty out Command to Display
+%cmdDisp=();
+
+#fill separately with command types
+#interface
+while (($ckey,$cvalue)=each %i_qrtype) {
+	$cmdDisp{$ckey}=$cvalue;
+}
+#routing
+while (($ckey,$cvalue)=each %r_qrtype) {
+	$cmdDisp{$ckey}=$cvalue;
+}
+#debug
+while (($ckey,$cvalue)=each %d_qrtype) {
+	$cmdDisp{$ckey}=$cvalue;
+}
+#multicast
+while (($ckey,$cvalue)=each %m_qrtype) {
+	$cmdDisp{$ckey}=$cvalue;
+}
+
+#ipv6
+while (($ckey,$cvalue)=each %v6_qrtype) {
+	$cmdDisp{$ckey}=$cvalue;
+}
+
+	
+
+
+# not all cmds/queries are implemented for junipers/foundrys/ciscos
 if ($mfg =~ /juniper/) {
     if (! defined($juniperCmd{$type})) {
 	$results[0] = "$cmdDisp{$type} not implemented for junipers.  sorry.\n";
@@ -387,21 +462,31 @@
     }
     $cmd = $foundryCmd{$type};
 } else {
+    if(! defined($ciscoCmd{$type})) {
+	$results[0] = "$cmdDisp{$type} not implemented for cisco.  sorry.\n";
+	&print_results($mfg);
+    }
     $cmd = $ciscoCmd{$type};
 }
 
 
-if ($type eq "prefix" || $type eq "mbgp" || $type eq "route" ) {
+if ($type eq "prefix" || $type eq "mbgp" || $type eq "route") {
     if ($arg[0] !~ /^\d+\.\d+\.\d+\.\d+$/) {
 	$results[0] = "The IP address \"$arg[0]\" is not valid and lacking an address would over-burden our router.\n";
 	&print_results($mfg);
     } elsif (defined($arg[1]) && $arg[1] !~ /^\d+\.\d+\.\d+\.\d+$/) {
 	$results[0] = "The IP netmask \"$arg[1]\" is not valid.\n";
 	&print_results($mfg);
-    }
+    } 
     if ($mfg =~ /juniper/i && defined($arg[1])) {
 	$arg = $arg[0] . "/" . mask2len($arg[1]);
     }
+} elsif ($type eq "v6_route" ){
+    if ($arg[0] !~ /[0-9a-fA-F:]+$/) {
+	$results[0] ="The IPv6 address \"$arg[0]\" is not valid.\n";
+	&print_results($mfg);
+    }
+
 } elsif ($type eq "framerelay") {
     if ($mfg =~ /juniper/) {
 	$results[0] = "Juniper does not have a show frame-relay pvc command.  ".
@@ -413,33 +498,33 @@
     } else {
 	undef($arg);
     }
-} elsif ($type eq "interface") {
-    if ($mfg =~ /(cisco|foundry)/) {
-	if ($arg[0] !~ /^b[^ ]+[0-9]/i && $arg[0] =~ /^b/i) {
+} elsif ($type eq "interface" || $type eq "v6_interface") {
+    if ($arg[1] =~ /[-\/0-9:.]+/) {
+	$arg = $arg[0] . " " . $arg[1];
+    } else {
+	if ($arg[0] !~ /^b[^ ]+[0-9]/i && $arg[0] =~ /^b/i && $mfg =~ /(cisco|foundry)/i) {
 	    $type = "intbrief";
 	    $arg = "brief";
 	} else {
 	    $arg = $arg[0];
 	}
-    } elsif ($mfg =~ /juniper/) {
-	my($optind) = 0;
-	# arg 0 may be an intf name or a display option, but there can
-	# only be 2 args
-	$arg = "";
-	while ($optind <= $#arg && $optind < 2) {
-	    $arg[$optind] =~ s/brief/terse/;
-	    if ($arg[$optind] =~ /^([a-z0-9]{2}\-\d+\/\d+\/\d+(:\d+)?)/i) {
-		$arg .= " $1";
-	    } elsif ($arg[$optind] =~ /^det/i) {
-		$arg .= " detail";
-	    } elsif ($arg[$optind] =~ /^ter/i) {
-		$arg .= " terse";
-	    } elsif ($arg[$optind] =~ /^ext/i) {
-		$arg .= " extensive";
-	    }
-	    $optind += 1;
+    }
+} elsif ($type eq "pim_interface") {
+if ($mfg =~ /cisco/i) {
+    if ($arg[1] =~ /[-\/0-9:.]+/) {
+	$arg = $arg[0] . " " . $arg[1];
+    } else {
+	if ($arg[0] !~ /^b[^ ]+[0-9]/i && $arg[0] =~ /^b/i ) {
+	    $type = "intbrief";
+	    $arg = "brief";
+	} else {
+	    $arg = $arg[0];
 	}
     }
+} else {
+	$arg=undef;
+}
+} elsif ($type eq "log") {
 } elsif ($type eq "log") {
     if ($arg[0] =~ /^\s*\|?$/) {
 	shift(@arg);
@@ -458,7 +543,7 @@
     }
 } elsif ($type eq "ping" || $type eq "trace") {
     if ($arg[0] !~ /^\d+\.\d+\.\d+\.\d+$/) {
-	if ($arg[0] !~ /^[A-Za-z0-9._-]+$/) {
+	if ($arg[0] !~ /([A-Za-z0-9-]*.)*[A-Za-z0-9-]*.[A-Za-z0-9-]*/) {
 	    $results[0] = "That argument ($arg[0]) is not valid.\n";
 	    &print_results($mfg);
 	}
@@ -510,13 +595,17 @@
 	} else {
 	    $arg =~ s/[\$^]/ /g;
 	}
-	$arg = "\"$arg\"";
+	$arg = "\\\"$arg\\\"";
     }
     # escape any ()s
     $arg =~ s/([\(\)])/\\$1/g;
+    #dolog(LOG_INFO, sprintf("TEST: %s\n",
+    #	"- - [$timestr] $type $router $arg"));
+    #
+    
 } elsif ($type eq "neighbor") {
     if ($arg[0] !~ /^\d+\.\d+\.\d+\.\d+$/) {
-	if ($arg[0] !~ /([A-Za-z0-9-]*.)*[A-Za-z0-9-]*.(com|edu|net|org)/) {
+	if ($arg[0] !~ /([A-Za-z0-9-]*.)*[A-Za-z0-9-]*.[A-Za-z0-9-]*/) {
 	    $results[0] = "That argument ($arg[0]) is not valid.\n";
 	    &print_results($mfg);
 	}
@@ -553,7 +642,7 @@
     }
 } elsif ($type eq "mneighbor") {
     if ($arg[0] !~ /^\d+\.\d+\.\d+\.\d+$/) {
-	if ($arg[0] !~ /([A-Za-z0-9-]*.)*[A-Za-z0-9-]*.(com|edu|net|org)/) {
+	if ($arg[0] !~ /([A-Za-z0-9-]*.)*[A-Za-z0-9-]*.[A-Za-z0-9-]*/) {
 	    $results[0] = "That argument ($arg[0]) is not valid.\n";
 	    &print_results($mfg);
 	}
@@ -582,12 +671,56 @@
 	    }
 	}
     }
-} elsif ($type eq "damp" || $type eq "summary" || $type eq "mbgpsum") {
+} elsif ($type eq "pim_neighbor") {
+    if ( ($arg[0]  eq 'detail') && ($mfg =~ /juniper/)) {
+    	$arg = $arg[0];
+    } else {
+	undef ($arg);
+    }
+
+} elsif ($type eq "pim_rp") {
+    if ( ($arg[0]  eq 'detail') && ($mfg =~ /juniper/)) {
+    	$arg = $arg[0];
+    } else {
+	undef ($arg);
+    }
+
+} elsif ($type eq "mforw") {
+    if ($arg[0] eq 'active') {
+	$arg= $arg[0];
+    } else{
+	undef ($arg);
+    }
+	
+} elsif ($type eq "pim_join") {
+    if ($arg[0] !~ /^\d+\.\d+\.\d+\.\d+$/) {
+	$results[0] = "The Group address \"$arg[0]\" is not valid and lacking an address would over-burden our router.\n";
+	&print_results($mfg);
+    } else {
+	$arg= $arg[0];
+    }
+
+} elsif ($type eq "msess") {
+    if ( $arg[0]  eq 'detail' ) {
+    	$arg = $arg[0];
+    } else {
+	undef ($arg);
+    }
+
+} elsif ($type eq "mrpf") {
+    if ($arg[0] !~ /^\d+\.\d+\.\d+\.\d+$/) {
+	$results[0] = "The IP address \"$arg[0]\" is not valid. You have the specify IP address to Reverse Path Forwarding Test.\n";
+	&print_results($mfg);
+    } else {
+	$arg= $arg[0];
+    }
+
+} elsif ($type eq "damp" || $type eq "summary" || $type eq "mbgpsum" || $type eq "msdp" || $type eq "msdpsa" || $type eq "v6_summary") {
     undef($arg);
 }
 
 # cache the following
-if ($type eq "summary" || $type eq "mbgpsu" || $type eq "damp" || $type eq "log") {
+if ($type eq "summary" || $type eq "mbgpsu" || $type eq "damp" || $type eq "log" || $type eq "msdpsa" || $type eq "msess" || $type eq "mforw" || $type eq "v6_summary" ) {
     if (!$arg) {
 	# cache requests with no addr/argument
 	local(*CACHE);
-------------- next part --------------
--- lgform.cgi.orig	Wed Jun 26 21:11:14 2002
+++ lgform.cgi	Wed Jun 26 21:31:05 2002
@@ -126,9 +126,13 @@
 $query = new CGI;
 
 print $query->header;
-print $query->start_html("LookingGlass form");
 
-print "<BODY>";
+if ($LG_STYLE) {
+	print $query->start_html(-title =>"LookingGlass form",
+				-style => {'src' => $LG_STYLE});
+} else {
+	print $query->start_html(-title =>"LookingGlass from");
+}
 
 # add the company image, LG_IMAGE
 print $LG_IMAGE;
@@ -141,46 +145,57 @@
 HEAD
 
 # start table, etc here
+print $query->startform( -action => '/cgi-bin/lg/lg.cgi', - method => 'POST');
+
 print <<DOTABLE ;
-<form action=lg.cgi method=GET>
 <center>
-<table border cellspacing=0 width=575 align=center>
+<table border cellspacing=0 align=center>
 
 DOTABLE
 
 # available query types here
-print <<QTYPES ;
-<tr valign=top>
-        <TD><B>Query:</B>
-<dd><input type=radio name="query" value="framerelay">show frame-relay pvc [DLCI]</DD>
-<dd><input type=radio name="query" value="interface">show interface &lt;interface&gt;</DD>
-<dd><input type=radio name="query" value="prefix">show ip bgp &lt;prefix&gt; [netmask]</DD>
-<dd><input type=radio name="query" value="neighbor">show ip bgp neighbor &lt;IP_addr&gt;</DD>
-<dd><input type=radio name="query" value="regex">show ip bgp regex &lt;reg_exp&gt;</DD>
-<dd><input type=radio name="query" value="summary">show ip bgp summary</DD>
-<dd><input type=radio name="query" value="damp">show ip bgp dampened-paths</DD>
-<dd><input type=radio name="query" value="prefixlist">show ip prefix-list &lt;list_name&gt;</DD>
-<dd><input type=radio name="query" value="route">show ip route &lt;prefix&gt; [netmask]</DD>
-<dd><input type=radio name="query" value="routemap">show route-map &lt;map_name&gt;</DD>
-<dd><input type=radio name="query" value="mbgp">show ip mbgp &lt;prefix&gt; [netmask]</dd>
-<dd><input type=radio name="query" value="mbgpsum">show ip mbgp summary</dd>
-<dd><input type=radio name="query" value="log">show logging [ | &lt;match_string&gt;]</DD>
-<dd><input type=radio name="query" value="ping">ping &lt;IP_addr | FQDN&gt;</dd>
-<dd><input type=radio name="query" value="trace">traceroute &lt;IP_addr | FQDN&gt;</DD>
+print <<TABLEHEAD;
+<tr>
+<th align=left>Query:</th>
+<th align=left>Router:</th>
+</tr>
+<tr><td>
+
+TABLEHEAD
+
+print $query->radio_group (-name => 'query', -values => \%i_qrtype,
+				-default => '-', -linebreak => 'true');
+
+print $query->hr;
+			
+print $query->radio_group (-name => 'query', -values => \%r_qrtype,
+				-default => '-', -linebreak => 'true');
+
+print $query->hr;
+			
+print $query->radio_group (-name => 'query', -values => \%d_qrtype,
+				-default => '-', -linebreak => 'true');
+
+print $query->hr;
+			
+
+print $query->radio_group (-name => 'query', -values => \%m_qrtype,
+				-default => '-', -linebreak => 'true');
+
+print $query->hr;
+			
+print $query->radio_group (-name => 'query', -values => \%v6_qrtype,
+				-default => '-', -linebreak => 'true');
 
-<P><B>Argument(s):</B> <INPUT name="args" size=30></P>
+print $query->hr;
+			
+print <<QTYPES ;
+<P>Argument(s):<INPUT name="args" size=30></P>
         </TD>
         <td ALIGH=left VALIGN=top>
-        <b>Router:</B>
 
-<dd>
 QTYPES
 
-# <dd><input type=radio name="query" value="aspath">sh ip as-path-access-list &lt;list_number&gt;</DD>
-# <dd><input type="radio" name="query" value="acl">sh access-list &lt;list_number&gt;</dd>
-# <dd><input type=radio name="query" value="communitylist">sh ip community-list &lt;list_number&gt;<DD>
-# <dd><input type=radio name="query" value="routemap">sh ip route-map &lt;map_name&gt;</DD>
-
 # read routers table and create the scrolling list
 readrouters();
 print $query->scrolling_list(-name => 'router',
@@ -188,22 +203,27 @@
 			-size => 20,
 			-labels => \%rtrlabels);
 
+
+
 # end
 print <<TAIL ;
-</dd>
 </td>
 </TABLE>
-<p><input type=submit value=Submit> <INPUT type=reset value=Reset></FORM>
+
+TAIL
+
+print $query->submit(-name => 'submit', -value =>'Submit');
+print $query->reset;
+print $query->endform;
+
+print <<TAIL2 ;
 </center>
 <br>
 <a href=lgnotes.html>Looking Glass notes</a>
-TAIL
 
-print <<TAIL ;
-<p>
-$LG_INFO
-</body>
-TAIL
+TAIL2
+
+print $LG_INFO;
 
 print $query->end_html;
 
-------------- next part --------------
--- lg.conf.orig	Wed Jun 26 13:21:56 2002
+++ lg.conf	Wed Jun 26 21:09:53 2002
@@ -41,6 +41,10 @@
 #
 #$LG_INFO="For support, contact <a href=\"mailto:webmaster\@localhost\">webmaster</a>";
 #
+# LG_STYLE	define style sheet to be used for format HTML
+#
+#$LG_STYLE="http://www.your.site/style/style.css";
+#
 #
 # LG_LOG	is either a FQPN (fully qualified path name) or the syslog
 #		facility to use for logging.  if not defined, the LG
@@ -103,3 +107,51 @@
 #
 $LG_STRIP=1;
 #
+######
+#looking glass commands
+#interfaces queries
+#$i_qrtype{'framerelay'}="Show Frame-Relay PVC [DLCI]";
+$i_qrtype{'interface'}="Show Interface Parameters [interface]";
+#routing queries
+$r_qrtype{'prefix'}="Show BGP Prefix <prefix> [netmask]";
+$r_qrtype{'neighbor'}="Show BGP Neighbor <IP_Addr>";
+$r_qrtype{'regex'}="Show BGP AS-PATH/Regex <AS_regex>";
+$r_qrtype{'summary'}="Show BGP Peering Status";
+$r_qrtype{'damp'}="Show BGP Dampened Paths";
+#$r_qrtype{'prefixlist'}="Show Routing Policy Terms <policy_name/number>";
+$r_qrtype{'route'}="Show IP Route <prefix> [netmask]";
+#$r_qrtype{'routemap'}="Show Routing Policy Actions <policy_name/number>";
+#debug queries
+#$d_qrtype{'log'}="Show Logs [ | <match_string>]";
+$d_qrtype{'ping'}="Ping <IP_Addr | FQDN>";
+$d_qrtype{'trace'}="Traceroute <IP_Addr | FQDN>";
+#multicast queries
+$m_qrtype{'mbgp'}="Show Multicast Route (MBGP) <prefix> [netmask]";
+$m_qrtype{'mbgpsum'}="Show MBGP Peering Status";
+#show ip pim neighbor/show pim neighbors
+$m_qrtype{'pim_neighbor'}="Show PIM Neighbors [detail]";
+#show ip pim interface/show pim interface
+$m_qrtype{'pim_interface'}="Show PIM Interfaces";
+#show ip pim rp mapping/show pim rps
+$m_qrtype{'pim_rp'}="Show PIM Rendez-vous Points [detail]";
+#???/show pim join (extensive)
+$m_qrtype{'pim_join'}="Show PIM Join [group_address]";
+#show ip mroute/show multicast route [active]
+$m_qrtype{'mforw'}="Show Multicast Forwarding Table [active]";
+#show ip msdp summary/show msdp
+$m_qrtype{'msdp'}="Show MSDP Peering Status";
+#show ip msdp sa cache/show msdp source-active
+$m_qrtype{'msdpsa'}="Show MSDP Source Active Table";
+#show ip sdr|show multicast sessions
+$m_qrtype{'msess'}="Show Multicast SDR sessions [detail]";
+#show ip rpf [address] /show multicast rpf [address]
+$m_qrtype{'mrpf'}="Test Multicast RPF <address>";
+#IPv6 commands
+#show ipv6 interface / show interface
+$v6_qrtype{'v6_interface'}="Show IPv6 interface parameters [interface]";
+#show bgp ipv6 summary / show bgp summary
+$v6_qrtype{'v6_summary'}="Show IPv6 BGP Summary";
+#show ipv6 route / show route table inet6.0
+$v6_qrtype{'v6_route'}="Show IPv6 Routes <prefix>";
+#show bgp ipv6 / ???
+#$v6_qrtype{'v6_bgp'}="Show IPv6 BGP table";


More information about the Rancid-discuss mailing list