http://www.perlmonks.org?node_id=638272

ribasushi has asked for the wisdom of the Perl Monks concerning the following question:

Greetings Monks, I am trying to read the current mac address table of a cisco switch as in this example:
dominus@Arzamas:~$ snmpwalk -v 2c -c $SNMP_CO 192.168.58.254 1.3.6.1.2.1.17.4.3.1.1
SNMPv2-SMI::mib-2.17.4.3.1.1.0.1.230.83.2.208 = Hex-STRING: 00 01 E6 53 02 D0 
SNMPv2-SMI::mib-2.17.4.3.1.1.0.4.35.176.177.68 = Hex-STRING: 00 04 23 B0 B1 44 
SNMPv2-SMI::mib-2.17.4.3.1.1.0.7.233.149.143.23 = Hex-STRING: 00 07 E9 95 8F 17 
SNMPv2-SMI::mib-2.17.4.3.1.1.0.10.230.233.145.114 = Hex-STRING: 00 0A E6 E9 91 72 
SNMPv2-SMI::mib-2.17.4.3.1.1.0.10.230.234.38.175 = Hex-STRING: 00 0A E6 EA 26 AF 
SNMPv2-SMI::mib-2.17.4.3.1.1.0.16.220.252.120.239 = Hex-STRING: 00 10 DC FC 78 EF 
SNMPv2-SMI::mib-2.17.4.3.1.1.0.19.211.101.23.117 = Hex-STRING: 00 13 D3 65 17 75 
SNMPv2-SMI::mib-2.17.4.3.1.1.0.24.139.118.113.223 = Hex-STRING: 00 18 8B 76 71 DF 
SNMPv2-SMI::mib-2.17.4.3.1.1.0.24.139.118.117.77 = Hex-STRING: 00 18 8B 76 75 4D 
SNMPv2-SMI::mib-2.17.4.3.1.1.0.24.139.118.117.109 = Hex-STRING: 00 18 8B 76 75 6D 
SNMPv2-SMI::mib-2.17.4.3.1.1.0.24.139.118.117.124 = Hex-STRING: 00 18 8B 76 75 7C 
SNMPv2-SMI::mib-2.17.4.3.1.1.0.24.139.118.117.138 = Hex-STRING: 00 18 8B 76 75 8A 
SNMPv2-SMI::mib-2.17.4.3.1.1.0.24.139.124.36.250 = Hex-STRING: 00 18 8B 7C 24 FA 
SNMPv2-SMI::mib-2.17.4.3.1.1.0.24.139.127.68.159 = Hex-STRING: 00 18 8B 7F 44 9F 
SNMPv2-SMI::mib-2.17.4.3.1.1.0.32.237.139.16.188 = Hex-STRING: 00 20 ED 8B 10 BC 
SNMPv2-SMI::mib-2.17.4.3.1.1.0.192.240.105.142.190 = Hex-STRING: 00 C0 F0 69 8E BE 
SNMPv2-SMI::mib-2.17.4.3.1.1.0.224.76.136.97.150 = Hex-STRING: 00 E0 4C 88 61 96 
SNMPv2-SMI::mib-2.17.4.3.1.1.0.224.76.186.184.231 = Hex-STRING: 00 E0 4C BA B8 E7 
dominus@Arzamas:~$ 
Here is the code I have so far
my $snmp = SNMP::Session->new ( DestHost => $switchaddr, Community => $community, Version => '2c', RemotePort => $port, ) or die "Unable to connect to $switchaddr:$port\n"; print Dumper ($snmp->gettable ('.1.3.6.1.2.1.17.4.3.1.1'));
and it bombs like this:
STORE(SNMP::MIB=HASH(0x84c5050) mib-2.17.4.3.1.1 HASH(0x8435700)) : write access to the MIB not implemented
Modification of non-creatable array value attempted, subscript -1 at /usr/lib/perl5/SNMP.pm line 695.
If however I use a less obscure OID (e.g. ifTable) - everything works as expected. Can someone help me with this?

Thank you! UPDATE: append missing leading dot to the OID