[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Testbed-admins] need advice regarding "SNMP GET failed"



Thanks Keith,

When I check the "show running config", I can find the set community string,
as follows:
************************************
cisco2#show running-config 
Building configuration...
 
Current configuration : 3457 bytes
!
! Last configuration change at 10:50:49 CDT Sun Apr 12 2009
! NVRAM config last updated at 10:51:57 CDT Sun Apr 12 2009
!
version 12.2
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname cisco2
...
...
interface Vlan1
 no ip address
!         
interface Vlan2
 ip address 192.168.1.1 255.255.255.0
!
ip default-gateway 192.168.0.70
ip classless
ip http server
ip http secure-server
!
!
access-list 1 permit 192.168.0.70
access-list 2 permit 192.168.0.70
no cdp run
snmp-server community vlan2 RW 1
snmp-server community cisco2 RW 2
...
************************************

But I didn't see any error message like "C388 Unknown community name".
Meanwhile, as you mentioned, I can try snmpit -v 1 <other args> on both
switch. It looks fine on control switch, but still time out on the
experiment switch, with the same community string in the database. Here is
the out put:

*****************************************************
mysql> select * from switch_stack_types;
+------------+------------+------------------+---------------+--------------
--+----------+----------+--------+
| stack_id   | stack_type | supports_private | single_domain |
snmp_community | min_vlan | max_vlan | leader |
+------------+------------+------------------+---------------+--------------
--+----------+----------+--------+
| Experiment | generic    |                0 |             0 | vlan2
|        2 |     1000 | cisco2 | 
| Control    | generic    |                0 |             0 | vlan1
|        2 |     1000 | cisco1 | 
+------------+------------+------------------+---------------+--------------
--+----------+----------+--------+
2 rows in set (0.00 sec)
 
mysql> select * from switch_stacks;
+---------+------------+------------+
| node_id | stack_id   | is_primary |
+---------+------------+------------+
| cisco2  | Experiment |          1 | 
| cisco1  | Control    |          1 | 
+---------+------------+------------+
2 rows in set (0.00 sec)

%snmpit -i cisco1 -l -w -v 1
Debug level is 1
FILLING %Interfaces
FILLING %Ports
Operation is listvlans
Device names: cisco1
Ports: 
Stack Control has type generic
Making device object for cisco1
Options for cisco1:
max_vlan = 1000
supports_private = 0
min_vlan = 2
type = cisco3560-ios
snmp_community = vlan1
single_domain = 0
snmpit_cisco module initializing... debug level 1
snmpit_cisco picked class 3500
Opening SNMP session to cisco1... at /usr/testbed/lib/snmpit_cisco.pm line
209.
Switch cisco1 is running Cisco IOS Software, C3560 Software
(C3560-IPSERVICES-M), Version 12.2(25)SEB4, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2005 by Cisco Systems, Inc.
Compiled Tue 30-Aug-05 14:19 by yenanh
Getting VLAN info...
Got vtpVlanName 1 default
Got vtpVlanName 2 control
Got vtpVlanName 1002 fddi-default
Got vtpVlanName 1003 token-ring-default
Got vtpVlanName 1004 fddinet-default
Got vtpVlanName 1005 trnet-default
Vlan members walk returned 28 rows
Trunk members walk returned 28 rows
control,2,ARRAY(0x8d83128)
fddi-default,1002,ARRAY(0x8d833b0)
token-ring-default,1003,ARRAY(0x8d8311c)
fddinet-default,1004,ARRAY(0x8d833c8)
trnet-default,1005,ARRAY(0x8d8341c)
VLAN     Number Project/Experiment VName     Members
----------------------------------------------------------------------------
----
No such VLAN control in lans table
No such VLAN fddi-default in lans table
No such VLAN fddinet-default in lans table
No such VLAN token-ring-default in lans table
No such VLAN trnet-default in lans table

%snmpit -i cisco2 -l -w -v 1
Debug level is 1
FILLING %Interfaces
FILLING %Ports
Operation is listvlans
Device names: cisco2
Ports: 
Stack Experiment has type generic
Making device object for cisco2
Options for cisco2:
max_vlan = 1000
supports_private = 0
min_vlan = 2
type = cisco3560-ios
snmp_community = vlan2
single_domain = 0
snmpit_cisco module initializing... debug level 1
snmpit_cisco picked class 3500
Opening SNMP session to cisco2... at /usr/testbed/lib/snmpit_cisco.pm line
209.
*** ERROR: snmpit:
***   SNMP GET failed - In /usr/testbed/bin/snmpit
***   SNMPIT get failed for device cisco2 (try 30 of 30)
***   Variable was [sysDescr,0,(undefined),(undefined)]
***   Returned (undefined), ErrorNum was -24
***   Error string is: Timeout
%
*****************************************************

Any idea about this? Thanks a lot.

Best Regards,

Cheng Cui
578-5445 . 231 Johnston Hall . Baton Rouge, LA 70803

-----Original Message-----
From: Keith Sklower [mailto:sklower@vangogh.CS.Berkeley.EDU] 
Sent: Sunday, April 12, 2009 4:32 PM
To: ccui1@tigers.lsu.edu; lahey@isi.edu
Cc: azad@cct.lsu.edu; testbed-admins@flux.utah.edu
Subject: Re: [Testbed-admins] need advice regarding "SNMP GET failed"

The evidence you supplied makes it seem highly likely that whoever
upgraded the switch changed the read-write community name:

Either that or there is misconfiguartion so that the by the time
snmpit talks to the switch, it is supplying the wrong community
name.  Do you see the errors below on the experiment switch 
C388 Unknown community name" ?

When we do a "show running config" on our cisco switch it doesn't
tell us what the snmp community strings are, but if we save the
config via tftp to our server it is in the saved config file.

The community string supplied should be that in the snmp_community
strings column in the switch_stack_types table.  It should be 
a read-write string.

They could, in principal be different for the Experiment and Control
stack-id's.

Good Luck,

Keith Sklower


    From: "Cheng Cui" <ccui1@tigers.lsu.edu>
    Date: Sun, 12 Apr 2009 11:02:01 -0500

    Thanks Kevin. 

    It seems the our experiment switch does not work fine with snmp. I tried
the
    snmpget on both Control and Experiment switch. Only control switch can
give
    me some feedback of system information. The experiment switch is always
time
[snip]
    Furthermore, I found the experiment switch was upgraded by someone
    because it's IOS was not the same as the control switch. Such as:

    Experiment switch:
    Cisco IOS Software, C3560 Software (C3560-ADVIPSERVICESK9-M), Version
    12.2(37)SE1

    Control switch:
    Cisco IOS Software, C3560 Software (C3560-IPSERVICES-M), Version
    12.2(25)SEB4


    However, I checked the snmp configuration on both switches. Both of them
    looks fine. Some information is as follows:

    Experiment switch:
    cisco2#show snmp 
    Chassis: FOC1023Y0MP
    643 SNMP packets input
	0 Bad SNMP version errors
	388 Unknown community name
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[snip]
	0 Illegal operation for community name supplied
    SNMP global trap: disabled
     
    SNMP logging: disabled
    SNMP agent enabled
    ***********************************
    Control switch:
    cisco1#show snmp 
    Chassis: FOC1023Y0N1
    2 SNMP packets input
	0 Bad SNMP version errors
	0 Unknown community name
[snip]


Here's some output from our setup.

You'll notice that if you run snmpit -v 1 <other args>
it will *tell* you what community string it is trying.

%mysql tbdb
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 242546 to server version: 5.0.20-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> select * from switch_stack_types;
+------------+------------+------------------+---------------+--------------
--+----------+----------+----------+
| stack_id   | stack_type | supports_private | single_domain |
snmp_community | min_vlan | max_vlan | leader   |
+------------+------------+------------------+---------------+--------------
--+----------+----------+----------+
| Experiment | generic    | 0                | 0             | private
| 1040     | 1999     | Bnortele |
| Control    | generic    | 0                | 0             | private
| 1040     | 1999     | Bnortelc |
+------------+------------+------------------+---------------+--------------
--+----------+----------+----------+
2 rows in set (0.01 sec)

mysql> select * from switch_stacks;
+-----------+------------+------------+
| node_id   | stack_id   | is_primary |
+-----------+------------+------------+
[snip]
| Bnortelc  | Control    | 1          |
| Bnortele  | Experiment | 1          |
[snip]
mysql> 
Suspended
%
%snmpit -i Bnortelc -l -w -v 1
Debug level is 1
FILLING %Interfaces
FILLING %Ports
Operation is listvlans
Device names: Bnortelc
Ports: 
Stack Control has type generic
Making device object for Bnortelc
snapping Bnortelc 
Options for Bnortelc:
max_vlan = 1999
leader = Bnortelc
supports_private = 0
stack_type = generic
min_vlan = 1040
snmp_community = private
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
stack_id = Control
type = nortel5510
single_domain = 0
snmpit_nortel initializing B