Posted on March 12, 2015 2:24 pm
 |  Asked by Andre Timmermann
 |  2618 views
RESOLVED
0
0
Print Friendly, PDF & Email

Hi,

I want to get the remote MAC connected to a switchport. The following article shows basically hot to do it:

https://eos.arista.com/qa/how-to-get-mac-and-arp-table-through-snmp/

But this is done using snmp v3 locally on the switch, how do I have to configure v2 to give me that information remotely? (And if v2 is not possible, how do I configure v3 for that purpose?)

What I have so far:

snmp-server contact email@domain.com
snmp-server location LOCATION
snmp-server community read ro
snmp-server community write rw

Greetz,

Andre

2
Posted by Andrei Dvornic
Answered on March 12, 2015 2:38 pm

Hi Andre,

This is covered in chapter 37 of Arista’s User Guide, which you can find here: http://www.arista.com/docs/Manuals/ConfigGuide.pdf.

For example:

snmp-server community public

should be enough to enable SNMPv2 support on the switch using the read-only community called ’public’.

This will enable you to walk the MIB tree, both locally or remotely. For doing this remotely for example, simply run:

snmpwalk <HOSTNAME/IP_ADDRESS of your switch> -v 2c -c public <OID> -OX

on a server/device which has IP connectivity to your switch.

Let me know if you have any further questions.

2
Posted by Andre Timmermann
Answered on March 13, 2015 6:39 am

Hi and thanks.

As was able to do snmpwalks already – what I was missing is the meaning of the -OX and that is trick (together with the mib)

For further reference:

  1. you MUST use the Q-BRIDGE-MIB
  2. you MUST use the parameter -OX
The combination enables the output which you are after:
snmpwalk -v 2c -c community arista-host 1.3.6.1.2.1.17.7.1.2 -m Q-BRIDGE-MIB -OX
Q-BRIDGE-MIB::dot1qFdbDynamicCount[4] = Counter32: 0
Q-BRIDGE-MIB::dot1qFdbDynamicCount[6] = Counter32: 3
Q-BRIDGE-MIB::dot1qFdbDynamicCount[7] = Counter32: 2
Q-BRIDGE-MIB::dot1qTpFdbPort[1][STRING: 0:1a:11:22:33:44] = INTEGER: 102
Q-BRIDGE-MIB::dot1qTpFdbPort[1][STRING: 0:1a:11:22:33:45] = INTEGER: 102

Greetz,

Andre

0
Posted by Andrei Dvornic
Answered on March 13, 2015 11:36 am

Check out snmpwalk –help for more details:

...
General options
...
  -O OUTOPTS Toggle various defaults controlling output display:
       ...
       X:  extended index format
...

Post your Answer

You must be logged in to post an answer.