SNMP Queuries

Post Reply
vickorpio

SNMP Queuries

Post 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
one6f

Re: SNMP Queuries

Post 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
vickorpio

Re: SNMP Queuries

Post 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.
one6f

Re: SNMP Queuries

Post 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.
vickorpio

Re: SNMP Queuries

Post 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?
one6f

Re: SNMP Queuries

Post 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.
Post Reply

Return to “OmniSwitch 6850 / 6850E”