Community discussions

MikroTik App
 
Pentium100
just joined
Topic Author
Posts: 4
Joined: Mon Feb 29, 2016 2:19 pm

Getting the FDB table from CRS106-1C-5S using SNMP

Tue Mar 28, 2023 9:41 am

Hello,

I have encountered a problem getting the FDB table from a CRS106-1C-5S (RouterOS v7.8), it just returns port number 0 for most MAC addresses.
For example (I left only the relevant lines in the output):
/interface/bridge/host/print 
Flags: D - DYNAMIC; L - LOCAL; E - EXTERNAL
Columns: MAC-ADDRESS, ON-INTERFACE, BRIDGE
  #     MAC-ADDRESS        ON-INTERFACE  BRIDGE
  80 D E 1C:61:B4:5A:1D:DE  sfp5          bridge
  95 DL  48:A9:8A:87:7E:B8  sfp4          bridge
  96 DL  48:A9:8A:87:7E:B9  sfp5          bridge
 104 D E 60:E3:27:DA:3A:1F  sfp4          bridge
Using a different way, the "port" MAC addresses are assigned to switch1-cpu (I do not really care about them anyway).
/interface/ethernet/switch/unicast-fdb/print 
Flags: D - DYNAMIC; A - ACTIVE
Columns: MAC-ADDRESS, PORT, VLAN-ID, ACTION, MIRROR, SVL, AGE, ISOLATION-PROFILE, QOS-GROUP
  #    MAC-ADDRESS        PORT         VLAN-ID  ACTION   MIRROR  SVL  AGE  ISOLATION-PROFILE  QOS-GROUP
  8 DA 60:E3:27:DA:3A:1F sfp4                       12 forward                      no     no           2 promiscuous       none  
 26 DA 48:A9:8A:87:7E:B8 switch1-cpu             0 forward                      no     yes          3 promiscuous       none
 53 DA 48:A9:8A:87:7E:B9 switch1-cpu             0 forward                      no     yes          3 promiscuous       none   
 54 DA 1C:61:B4:5A:1D:DE sfp5                       12 forward                      no     no           2 promiscuous       none             
OK, now I try SNMP:
snmpwalk -v2c -cpublic 1.2.3.4 .1.3.6.1.2.1.17.4.3.1.1
SNMPv2-SMI::mib-2.17.4.3.1.1.28.97.180.90.29.222 = Hex-STRING: 1C 61 B4 5A 1D DE 
SNMPv2-SMI::mib-2.17.4.3.1.1.72.169.138.135.126.184 = Hex-STRING: 48 A9 8A 87 7E B8 
SNMPv2-SMI::mib-2.17.4.3.1.1.72.169.138.135.126.185 = Hex-STRING: 48 A9 8A 87 7E B9 
SNMPv2-SMI::mib-2.17.4.3.1.1.96.227.39.218.58.31 = Hex-STRING: 60 E3 27 DA 3A 1F 
So far, so good, however:
snmpwalk -v2c -cpublic 1.2.3.4 .1.3.6.1.2.1.17.4.3.1.2.28.97.180.90.29.222                          
SNMPv2-SMI::mib-2.17.4.3.1.2.28.97.180.90.29.222 = INTEGER: 0

snmpwalk -v2c -cpublic 1.2.3.4 .1.3.6.1.2.1.17.4.3.1.2.72.169.138.135.126.184
SNMPv2-SMI::mib-2.17.4.3.1.2.72.169.138.135.126.184 = INTEGER: 5

snmpwalk -v2c -cpublic 1.2.3.4 .1.3.6.1.2.1.17.4.3.1.2.72.169.138.135.126.185
SNMPv2-SMI::mib-2.17.4.3.1.2.72.169.138.135.126.185 = INTEGER: 6

snmpwalk -v2c -cpublic 1.2.3.4 .1.3.6.1.2.1.17.4.3.1.2.96.227.39.218.58.31   
SNMPv2-SMI::mib-2.17.4.3.1.2.96.227.39.218.58.31 = INTEGER: 0
The "real" MAC addresses show up on port "zero", which means undefined. It looks like only the MAC addresses in a VLAN, other than the default show up like this. Is there a way to get the correct information from this switch using SNMP?
There is no such problem with, say, CRS328-4C-20S-4S+RM. However, on that switch VLANs are configured diferently (/interface/bridge/vlan instead of /interface/ethernet/switch).

Who is online

Users browsing this forum: Ahrefs [Bot], cloud45, deadmaus911, dervomsee and 71 guests