nv-l
[Top] [All Lists]

Re: Interface Description

To: nv-l@lists.tivoli.com
Subject: Re: Interface Description
From: Connie Logg <cal@SLAC.STANFORD.EDU>
Date: Tue, 5 Jan 1999 11:31:57 -0800
Reply-to: Discussion of IBM NetView and POLYCENTER Manager on NetView <NV-L@UCSBVM.UCSB.EDU>
Sender: Discussion of IBM NetView and POLYCENTER Manager on NetView <NV-L@UCSBVM.UCSB.EDU>
Yes.. The following uses the tricklet routines (for Cisco routers), but you
can convert to the netview snmp routines.

  @descrdata = `echo "ifDescr[]" | $trickbin/snmp-tbl $router public`;


  @subdata = `echo "locIfDescr[]" | $trickbin/snmp-tbl $router public`;

Here is a piece of perl code that reads most of the info out of a Cisco
Router (again with the tricklet routines). You need to ad code to check
interface readout order, and be aware that the readouts may be null in some
cases (It doesn't hurt what I use this for, so I don't check).

  @netmaskdata = `echo "ipAdEntNetMask[]" | $trickbin/snmp-tbl $router public`;

  @macdata = `echo "ifPhysAddress[]" | $trickbin/snmp-tbl $router public`;
  #print @macdata;
   chop(@macdata);
   for ($i=0;$i<=$#macdata;$i++)
    { $macdata[$i] =~ /ifPhysAddress\[(\d*)\]\=/;
      ($sub,$mac[$1]) = split("=",$macdata[$i]);
    }

  @mtudata = `echo "ifMtu[]" | $trickbin/snmp-tbl $router public`;
  #print @mtudata;
   chop(@mtudata);
   for ($i=0;$i<=$#mtudata;$i++)
    { $mtudata[$i] =~ /ifMtu\[(\d*)\]\=/;
      ($sub,$mtu[$1]) = split("=",$mtudata[$i]);
    }

  @speeddata = `echo "ifSpeed[]" | $trickbin/snmp-tbl $router public`;
  #print @macdata;
   chop(@speeddata);
   for ($i=0;$i<=$#speeddata;$i++)
    { $speeddata[$i] =~ /ifSpeed\[(\d*)\]\=/;
      ($sub,$speed[$1]) = split("=",$speeddata[$i]);
    }

  @descrdata = `echo "ifDescr[]" | $trickbin/snmp-tbl $router public`;
  # print @descrdata;
   chop @descrdata;
   for ($i=0;$i<=$#descrdata;$i++)
    { $descrdata[$i] =~ /ifDescr\[(\d*)\]\=/;
      ($sub,$descr[$1]) = split("=",$descrdata[$i]);
    }


  @admindata = `echo "ifAdminStatus[]" | $trickbin/snmp-tbl $router public`;
  chop @admindata;
   for ($i=0;$i<=$#admindata;$i++)
    { $admindata[$i] =~ /ifAdminStatus\[(\d*)\]\=/;
      ($sub,$admin[$1]) = split("=",$admindata[$i]);
    }


  @operdata = `echo "ifOperStatus[]" | $trickbin/snmp-tbl $router public`;
  chop @operdata;
   for ($i=0;$i<=$#operdata;$i++)
    { $operdata[$i] =~ /ifOperStatus\[(\d*)\]\=/;
      ($sub,$oper[$1]) = split("=",$operdata[$i]);
    }




At 12:37 PM 1/5/99 +1000, you wrote:
>Hello all,
>
>Does anyone know if the interface description on cisco routers can be
>viewed via mib.
>
>Thanks in Advance.
>Darren.
>
*********************************************************************
" Of course the opinions expressed here are my own. "

Connie Logg    CAL@SLAC.Stanford.Edu  ph: 650-926-2879
Network Management and Performance Analyst
SLAC (MS 97), P.O. Box 4349, Stanford, CA 94309

"Happiness is found along the way, not at the end of the road."

<Prev in Thread] Current Thread [Next in Thread>

Archive operated by Skills 1st Ltd

See also: The NetView Web