Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

other way to read Mac information ?

I Have made a program that reads the MAC table of more than 300 switches.

Now i use community indexing to read de MAC table but it takes more than 1 min. to read the MAC table of 1 switch... (thus too long)

Is it possible to read the MAC table on a diverant way.

I thinking of

- Event driven, But i think that the switch do not support this.

- reading MAC info per port base (because i only need the MAC info on the port and not per Vlan)

2 REPLIES
Bronze

Re: other way to read Mac information ?

There are three steps involved.

1) get ifIndex of the port

snmpwalk -c public ifName | grep 4/1

IF-MIB::ifName.101 = STRING: 4/1

2) get portIndex based on ifIndex

snmpwalk -c public dot1dBasePortIfIndex | grep 101

BRIDGE-MIB::dot1dBasePortIfIndex.385 = INTEGER: 101

3) get the MAC based on portIndex

snmpwalk -c public 14.32.6.12 dot1dTpFdbPort | grep 385

BRIDGE-MIB::dot1dTpFdbPort.0.2.185.144.76.102 = INTEGER: 385

BRIDGE-MIB::dot1dTpFdbPort.0.16.13.56.16.0 = INTEGER: 385

BRIDGE-MIB::dot1dTpFdbPort.0.96.84.144.248.0 = INTEGER: 385

BRIDGE-MIB::dot1dTpFdbPort.0.144.43.69.138.255 = INTEGER: 385

New Member

Re: other way to read Mac information ?

I needed to do the same, and I started several threads to scan switches in parallel process. Works for 2-3 mins. scanning 300 switches.
382
Views
0
Helpful
2
Replies
CreatePlease to create content