Page 1 of 1

SNMP Queuries

Posted: 23 Jun 2011 09:22
by vickorpio
Hi,
I am new to network/switch programming. I need to find the the MAC addresses of all the devices attached with switch 6850.
But i dont know how to do it. i have seen a code in which the coder got all the MAC addresses from a CISCO switch using the OIDs.

How to do the same with 6850 switch? i am using C# language.

Thanks & Regards

Re: SNMP Queuries

Posted: 23 Jun 2011 16:38
by one6f
Hi,
my guess is, that is the same this cisco. Here is dot1dTpFdbAddress OID query:
snmpwalk -bla -bla 10.11.12.13 .1.3.6.1.2.1.17.4.3.1.1

Re: SNMP Queuries

Posted: 27 Jun 2011 09:37
by vickorpio
hi,
i tried as you said. It returned a timeout. IP of the switch is 192.168.0.2. I dont know the community string but i think by default its 'public'. Following is the result of SNMP walk

snmpwalk.exe" 192.168.0.2 public 10.11.12.13 .1.3.6.1.2.1.17.4.3.1.1
Timeout: No Response from 192.168.0.2

What could be the problem? how can i check the community string of the switch and also whether there are any VLANs configured?. I think MAC addresses are searched through available VLANs on switch.

Re: SNMP Queuries

Posted: 28 Jun 2011 01:44
by one6f
Hi,
if you are admin of the switch, you must know SNMP credentials of them (lastly, you have them configured).
You must also use the proper syntax, here for snmp v1, 2, 3 for linux.

Re: SNMP Queuries

Posted: 29 Jun 2011 04:45
by vickorpio
hi,
I am looking at the configurations of Switch. But the syntax you told runs on linux. I have to get the information from switch in a .NET application. So for me SNMP walk like tools are best. Can you please tell me how to run SNMP walk correctly on 6850 switch with a specific OID?

Re: SNMP Queuries

Posted: 01 Jul 2011 06:49
by one6f
Hi,
I don't know much about .NET programming.
I use Linux console (Debian,Ubuntu,RedHat...) to snmpwalk:
Example for SNMPv3:
snmpwalk -On -v3 -u SnmpUserName -l authPriv -a md5 -A AuthPass -x DES -X AuthPass 192.168.1.2 sysName
Example for SNMPv1/2c:
snmpwalk -v1 -c public 192.168.1.2 sysName

Bevor running SNMPWALK the red things must be configured and snmp access has to be activated on the switch.