[rtg] Targetmaker 'speed' on 10GE

Brandon Ewing nicotine at warningg.com
Mon May 18 10:42:51 EDT 2009


On Thu, May 14, 2009 at 10:15:02AM -0500, Brandon Ewing wrote:
> The targetmaker script in the latest CVS doesn't currently set interface
> speed on 10GE interfaces correctly, setting it to 4294967295 instead of
> 10000000000 in the interface table.  Since the field in the table is a
> bigint, it would appear the limitation is in SNMP. 
> 
> Would it be possible to use IF-MIB::ifHighSpeed to try to determine
> interface speed instead of IF-MIB::ifSpeed in the StandardIf.pl module?
> 
> -- 
> Brandon Ewing                                        (nicotine at warningg.com)

This is probably the wrong way to do this, but if you want a quick fix, see
attached patch.

-- 
Brandon Ewing                                        (nicotine at warningg.com)
-------------- next part --------------
diff -u targetmaker/etc/rtgmodules/ExtendedIf.pl targetmaker/etc/rtgmodules/ExtendedIf.pl
--- targetmaker/etc/rtgmodules/ExtendedIf.pl	2009-05-12 08:36:53.000000000 -0500
+++ targetmaker/etc/rtgmodules/ExtendedIf.pl	2009-05-15 16:03:47.000000000 -0500
@@ -193,6 +193,15 @@
             # will have a speed of 100bps, so we change any 100 to 100M
             $ifspeed = 100000000;
         }
+        if ($ifspeed == 4294967295) {
+            # Probably a 10GE interface.  Check IF-MIB::ifHighSpeed and multiply
+            # accordingly
+            $highspeedoid = ".1.3.6.1.2.1.31.1.1.1.15.".$index;
+            @result = rtg_snmpget( "$communities{$router}\@$router", "$highspeedoid" );
+            $ifspeedtemp = join ( ' ', @result );
+            $ifspeed = $ifspeedtemp * 1000000;
+
+        }
 
         if($system =~ /^Linux/ && $CPQ_LINUX_GIGABIT_BUG && $ifspeed == 10000000) {
             # for some reason netsnmp on compaq boxes with gigabit nics
diff -u targetmaker/etc/rtgmodules/StandardIf.pl targetmaker/etc/rtgmodules/StandardIf.pl
--- targetmaker/etc/rtgmodules/StandardIf.pl	2009-05-12 08:36:53.000000000 -0500
+++ targetmaker/etc/rtgmodules/StandardIf.pl	2009-05-15 16:03:31.000000000 -0500
@@ -213,6 +213,16 @@
             # will have a speed of 100bps, so we change any 100 to 100M
 	    $ifspeed = 100000000;
 	}
+        if ($ifspeed == 4294967295) {
+            # Probably a 10GE interface.  Check IF-MIB::ifHighSpeed and multiply
+            # accordingly
+            $highspeedoid = ".1.3.6.1.2.1.31.1.1.1.15.".$index;
+            @result = rtg_snmpget( "$communities{$router}\@$router", "$highspeedoid" );
+            $ifspeedtemp = join ( ' ', @result );
+            $ifspeed = $ifspeedtemp * 1000000;
+
+        }
+
 
         if($system =~ /^Linux/ && $CPQ_LINUX_GIGABIT_BUG && $ifspeed == 10000000) {
             # for some reason netsnmp on compaq boxes with gigabit nics
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.grdata.com/pipermail/rtg/attachments/20090518/896457ae/attachment.pgp>


More information about the RTG mailing list