Announcement

Collapse
No announcement yet.

Catalyst 2950: SNMP Community String Indexing

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Catalyst 2950: SNMP Community String Indexing

    Hello,

    According to Document 40367 I'm trying to get the MAC address connected to a specified port.

    The first stage was:
    snmpwalk 192.168.0.254 -Os -c public -v 2c .1.3.6.1.2.1.17.4.3.1.1

    But the response was:
    mib-2.17.4.3.1.1 = No Such Instance currently exists at this OID

    The switch details are:

    Switch#show version
    Cisco Internetwork Operating System Software
    IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA4, RELEASE SOFTWARE (fc1)
    Copyright (c) 1986-2005 by cisco Systems, Inc.
    Compiled Wed 23-Mar-05 15:33 by yenanh
    Image text-base: 0x80010000, data-base: 0x80562000
    ROM: Bootstrap program is C2950 boot loader
    Switch uptime is 17 hours, 52 minutes
    System returned to ROM by power-on
    System image file is "flash:/c2950-i6q4l2-mz.121-22.EA4.bin
    "
    cisco WS-C2950G-24-EI (RC32300) processor (revision L0) with 21039K bytes of memory.
    Processor board ID FOC0931Z7VL
    Last reset from system-reset
    Running Enhanced Image
    24 FastEthernet/IEEE 802.3 interface(s)
    2
    Gigabit Ethernet/IEEE 802.3 interface(s)
    32
    K bytes of flash-simulated non-volatile configuration memory.
    Base ethernet MAC Address: 00:14:A9:E0:3C:80
    Motherboard assembly number: 73-7280-05
    Power supply part number: 34-0965-01
    Motherboard serial number: FOC09312RKC
    Power supply serial number: DAB0924BFK2
    Model revision number: L0
    Motherboard revision number: A0
    Model number: WS-C2950G-24-EI
    System serial number: FOC0931Z7VL
    Configuration register is 0xF

    SNMP is enabled in this switch:
    Switch#show snmp
    Chassis: FOC0931Z7VL
    25161 SNMP packets input
    0 Bad SNMP version errors
    0 Unknown community name
    0 Illegal operation for community name supplied
    0 Encoding errors
    25146 Number of requested variables
    0 Number of altered variables
    13 Get-request PDUs
    25139 Get-next PDUs
    0 Set-request PDUs
    25161 SNMP packets output
    0 Too big errors (Maximum packet size 1500)
    6
    No such name errors
    0 Bad values errors
    0 General errors
    25152 Response PDUs
    0 Trap PDUs
    SNMP global trap: disabled
    SNMP logging: disabled
    SNMP agent enabled

    What is the reason the OID is not responding ?

    Thanks,
    Zvika.

  • #2
    Re: Catalyst 2950: SNMP Community String Indexing

    Don't know why this is not working. Could be the IOS version or something with the switch configuration.

    FWIW: I have a 2950 in my lab with a later IOS release and I am able to query this OID

    Code:
    LABSW1#sh ver
    Cisco Internetwork Operating System Software 
    IOS (tm) C2950 Software (C2950-I6K2L2Q4-M), Version 12.1(22)EA14, RELEASE SOFTWARE (fc1)
    Technical Support: http://www.cisco.com/techsupport
    Copyright (c) 1986-2010 by cisco Systems, Inc.
     
    LABSW1#sh mac add dyn
              Mac Address Table
    -------------------------------------------
    Vlan    Mac Address       Type        Ports
    ----    -----------       --------    -----
       1    0013.c334.d0c8    DYNAMIC     Fa0/24
       2    0003.4ec0.0393    DYNAMIC     Fa0/23
       2    0011.4305.8a18    DYNAMIC     Fa0/3
       2    0013.c334.d0c8    DYNAMIC     Fa0/24
       2    0013.c44a.71a8    DYNAMIC     Fa0/6
       2    0013.c461.bcae    DYNAMIC     Fa0/7
       2    0015.6316.de22    DYNAMIC     Fa0/3
       3    0013.c334.d0c8    DYNAMIC     Fa0/24
       3    0013.c44a.71a8    DYNAMIC     Fa0/6
       3    0013.c461.bcae    DYNAMIC     Fa0/7
       3    0015.6316.de22    DYNAMIC     Fa0/3
    Total Mac Addresses for this criterion: 11
     
    LABSW1#sh run | inc snmp
    snmp-server community public RO 16
    snmp-server trap-source Vlan2
    snmp-server location The LAB
    snmp-server contact Network Admin [email protected]
     
    LABSW1#sh cdp neighbors f0/6
    Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                      S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
    Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID
    SEP0013C44A71A8  Fas 0/6            176          H P      IP Phone 7Port 1
     
     
    LABSW1#sh ip int brief
    Interface                  IP-Address      OK? Method Status                Protocol
    Vlan1                      unassigned      YES NVRAM  administratively down down    
    Vlan2                      10.100.120.2    YES NVRAM  up                    up
     
    LABSW1#sh vlan 
    VLAN Name                             Status    Ports
    ---- -------------------------------- --------- -------------------------------
    1    default                          active    
    2    Data                             active    Fa0/1, Fa0/2, Fa0/3, Fa0/4, Fa0/5, Fa0/6, Fa0/7
                                                    Fa0/8, Fa0/9, Fa0/10, Fa0/11, Fa0/12, Fa0/13, Fa0/14
                                                    Fa0/15, Fa0/16, Fa0/17, Fa0/18, Fa0/19, Fa0/20
                                                    Fa0/21, Fa0/22, Fa0/23
    3    Voice                            active    Fa0/1, Fa0/2, Fa0/3, Fa0/4, Fa0/5, Fa0/6, Fa0/7
                                                    Fa0/8, Fa0/9, Fa0/10, Fa0/11, Fa0/12, Fa0/13, Fa0/14
                                                    Fa0/15, Fa0/16, Fa0/17, Fa0/18, Fa0/19, Fa0/20
                                                    Fa0/21, Fa0/22, Fa0/23
     
    LABSW1#sh run int f0/6
    Building configuration...
    Current configuration : 142 bytes
    !
    interface FastEthernet0/6
     description Data and Voice Ports
     switchport access vlan 2
     switchport voice vlan 3
     spanning-tree portfast
    end
    Given the MAC address shown for port f0/6 on VLAN 3

    Code:
     
    [[email protected] tmp]$  snmpwalk -v2c -Os -c [email protected] 10.100.120.2 .1.3.6.1.2.1.17.4.3.1.1
    mib-2.17.4.3.1.1.0.19.195.52.208.200 = Hex-STRING: 00 13 C3 34 D0 C8 
    mib-2.17.4.3.1.1.0.19.196.74.113.168 = Hex-STRING: 00 13 C4 4A 71 A8 
    mib-2.17.4.3.1.1.0.19.196.97.188.174 = Hex-STRING: 00 13 C4 61 BC AE 
    mib-2.17.4.3.1.1.0.21.99.22.222.34 = Hex-STRING: 00 15 63 16 DE 22 
    [[email protected] tmp]$ 
    [[email protected] tmp]$  snmpwalk -v2c -Os -c [email protected] 10.100.120.2 .1.3.6.1.2.1.17.4.3.1.2
    mib-2.17.4.3.1.2.0.19.195.52.208.200 = INTEGER: 24
    mib-2.17.4.3.1.2.0.19.196.74.113.168 = INTEGER: 6
    mib-2.17.4.3.1.2.0.19.196.97.188.174 = INTEGER: 7
    mib-2.17.4.3.1.2.0.21.99.22.222.34 = INTEGER: 3
    [[email protected] tmp]$ 
    [[email protected] tmp]$  snmpwalk -v2c -Os -c [email protected] 10.100.120.2 .1.3.6.1.2.1.31.1.1.1.1
    ifName.1 = STRING: Fa0/1
    ifName.2 = STRING: Fa0/2
    ifName.3 = STRING: Fa0/3
    ifName.4 = STRING: Fa0/4
    ifName.5 = STRING: Fa0/5
    ifName.6 = STRING: Fa0/6

    Comment


    • #3
      Re: Catalyst 2950: SNMP Community String Indexing

      Hello,

      I upgraded the IOS release to Version 12.1(22)EA14.
      But the response to:

      snmpwalk 192.168.0.254 -Os -c public -v 2c .1.3.6.1.2.1.17.4.3.1.1

      is still:

      mib-2.17.4.3.1.1 = No Such Instance currently exists at this OID

      What in the switch configuration can cause such problem ?

      Thanks,
      Zvika.

      Comment


      • #4
        Re: Catalyst 2950: SNMP Community String Indexing

        Hello,

        I had a mistake in the snmpwalk query.

        My switch has a VLAN named 10.

        So I should run:
        Code:
        snmpwalk 192.168.0.254 -Os -c public@10 -v 2c .1.3.6.1.2.1.17.4.3.1.1
        Thanks,
        Zvika.

        Comment

        Working...
        X