Menu

SNMP_Session-1.08/lib

Help
nolajc2000
2007-09-07
2012-09-14
  • nolajc2000

    nolajc2000 - 2007-09-07

    I am curious as to the function of this directory. I have some devices that cannot be accessed via the SwitchMap.pl (mainly because they are routers (MWAM modules to be exact). In this instance, if the device is a router (or module that functions as a router), how can I have switchmap create the HTML files for the device? Do I place MIB files or OID files into the /lib directory?

     
    • nolajc2000

      nolajc2000 - 2007-09-07

      In reference to the above question, here is the debud output I am referring to:

      [jcash@srvr-nms-b17 cgi-bin]$ ./SwitchMap.pl -d 5
      main::: SwitchMap version 10.17 starting...
      SwitchUtils::GetSnmpCommunities: called
      SwitchUtils::GetSnmpCommunities: returning 1 community strings
      main::: getting switch names and MAC/IP relationships...
      MacIpTables::GetMacIpTables: called, getting MAC/IP table from local file
      MacIpTables::GetMacTablesFromFiles: called
      MacIpTables::GetMacTablesFromFiles: Getting MAC/IP info from /var/www/cacti.metropcs.net/html/ipplan/switchmap-10.18/MacList ...
      MacIpTables::GetMacTablesFromFiles: returning, got 1485 MAC-IPs and 0 MAC-hostnames
      MacIpTables::GetMacIpTables: returning, got 2 switch names from static array
      main::: getting data from switches ...
      main::CreateSwitches: called
      main::CreateSwitches: getting data from PDSN-1
      Switch:🆕 called
      Switch:🆕 returning
      Switch::PopulateSwitch: called
      Switch::PopulateSwitch: populating switch object PDSN-1
      SwitchUtils::OpenSnmpSession: called to open a session to PDSN-1
      SwitchUtils::OpenSnmpSession: trying to open an SNMP session to PDSN-1
      SwitchUtils::OpenSnmpSession: SNMP session open, testing a GET of the sysObjectId
      SwitchUtils::GetOneOidValue: called to fetch 1.3.6.1.2.1.1.2.0
      SwitchUtils::GetOneOidValue: returning 1.3.6.1.4.1.9.1.621
      SwitchUtils::OpenSnmpSession: GET succeeded, valid SNMP session opened
      SwitchUtils::OpenSnmpSession: returning SUCCESS
      Switch::GetChassisModelFromSwitch: called
      Switch::GetChassisModelFromSwitch: getting switch type...
      SwitchUtils::GetOneOidValue: called to fetch 1.3.6.1.4.1.9.5.1.2.16.0
      SwitchUtils::GetOneOidValue: called to fetch .1.3.6.1.2.1.47.1.1.1.1.5.1
      SwitchUtils::GetOneOidValue: returning 9
      SwitchUtils::GetOneOidValue: called to fetch 1.3.6.1.2.1.1.2.0
      SwitchUtils::GetOneOidValue: returning 1.3.6.1.4.1.9.1.621
      Switch::GetChassisModelFromSwitch: PDSN-1 has an unrecognized sysObjectID: ".1.3.6.1.4.1.9.1.621", skipping
      Switch::PopulateSwitch: Couldn't get the switch type from PDSN-1, skipping

       
      • Lance V

        Lance V - 2007-09-07

        Nolajc2000,

        edit the Constants.pm

        look for %CiscoSwitchObjectOids

        Add the following somewhere in the list, except the last line.

        '1.3.6.1.4.1.9.1.621' => 'Model#', # <Special Description here>

        Let me know if that doesn't work.

         
    • Pete Siemsen

      Pete Siemsen - 2007-09-07

      SNMP_Session-1.08 contains a library of Perl code that SwitchMap uses to do SNMP I/O with switches. You shouldn't modify that directory in any way.

      SwitchMap supports devices based on the MIBs that the devices support. If a device supports the MIBs that SwitchMap requires, SwitchMap supports the device. Your MWAM modules may not support the MIBs that SwitchMap needs.

      Whether SwitchMap supports a device or not isn't based on whether the device is a switch or a router - it's based on what MIBs the device supports. At my site, we have switches running CATOS and switch/routers running IOS, and SwitchMap supports them all.

      I've received several requests to enhance SwitchMap to support more devices. Basically, this means adding code to SwitchMap so that it can use more MIBs. I sometimes try to do this because I want SwitchMap to work well, but it's hard to justify the work. SwitchMap works with all the switches and routers at my site.

      Does SwitchMap fail completely with your MWAM routers, or does it produce web pages with missing data?
      Please run it with "-d 4 -f" on the command line. That will create a log file named SwitchMap.log. If you email me the file, I'll be able to see what failed. The file might be large, so please email the file to me directly at siemsen@ucar.edu.

       
    • Pete Siemsen

      Pete Siemsen - 2007-09-07

      I responded to your first message before reading the second one containing the debug output.

      Try this: edit Constants.pm and add this line to the lines in %CiscoSwitchObjectOids

      '.1.3.6.1.4.1.9.1.621' =&gt; 'ciscoWsSvcMWAM1',
      

      Save the file, exit your editor and try running SwitchMap again.

       
    • nolajc2000

      nolajc2000 - 2007-09-07

      That allowed the HTML file to be created, but on this device, there are several IPs that are created dynamically ( in local pools)

      PDSN1#sh ip int b | e unass
      Interface IP-Address OK? Method Status Protocol
      GigabitEthernet0/0.10 10.222.9.62 YES NVRAM up up
      GigabitEthernet0/0.401 10.221.8.251 YES NVRAM up up
      GigabitEthernet0/0.403 10.221.10.10 YES NVRAM up up
      GigabitEthernet0/0.500 10.222.0.5 YES NVRAM up up
      Virtual-Template1 10.221.9.10 YES TFTP down down
      Virtual-Access2.1 10.221.9.10 YES TFTP up up
      Virtual-Access2.2 10.221.9.10 YES TFTP up up
      Virtual-Access2.3 10.221.9.10 YES TFTP up up
      Virtual-Access2.4 10.221.9.10 YES TFTP up up
      Virtual-Access2.5 10.221.9.10 YES TFTP up up
      Virtual-Access2.6 10.221.9.10 YES TFTP up up
      Virtual-Access2.7 10.221.9.10 YES TFTP up up

      In Upwards of 1500. I am wondering how to ge the local pool info to populate:

      PDSN1#sh ip local pool RESTRICTED_POOL
      Pool Begin End Free In use
      RESTRICTED_POOL 10.221.192.1 10.221.223.254 6841 1349
      Available addresses:
      10.221.213.162 Vi2.556 8172581208@mymetropcs.com
      10.221.198.202 Vi2.1245 7073841890@mymetropcs.com
      10.221.204.152 Vi2.409 4155710879@mymetropcs.com
      10.221.209.19 Vi2.283 7277684195@mymetropcs.com
      10.221.212.218 Vi2.473 2145837504@mymetropcs.com
      10.221.204.208 Vi2.1129 3214603041@mymetropcs.com
      10.221.198.196 Vi2.275 7865647995@mymetropcs.com
      10.221.199.77 Vi2.739 7868736030@mymetropcs.com
      10.221.204.129 Vi2.658 9545884316@mymetropcs.com
      10.221.203.238 Vi2.1092 8176156695@mymetropcs.com
      10.221.209.212 Vi2.497 7863184949@mymetropcs.com
      10.221.195.243 Vi2.734 3132932078@mymetropcs.com
      10.221.216.231 Vi2.899 5107760991@mymetropcs.com

      I know these are strange requests...but I am determined to get it working...

       
      • Pete Siemsen

        Pete Siemsen - 2007-09-07

        I'm not familiar with local pools. I suspect information about them is available in Cisco MIBs, so it is probably possible to get SwitchMap to support them. I don't think I have devices that support them, so I don't have a way to test/debug access to the MIBs.

        If you'd like to implement code to suppport them, I'd be happy to integrate it into SwitchMap.

         

Log in to post a comment.

MongoDB Logo MongoDB