<div dir="ltr"><div dir="ltr"><div>Hello,</div><div><br></div><div>The DB ID = 2 is mapping to 802.1q VLAN 3610 which is used in the Switch. this is what I used in the script as well.</div><div><br></div><div>Here are the results for the snmpwalk:</div><div><br></div><div>% snmpwalk -v 2c -c snmpcomm switchname .1.3.6.1.2.1.17.7.1.2.2.1.2</div><div>SNMPv2-SMI::mib-2.17.7.1.2.2.1.2 = No Such Object available on this agent at this OID</div><div><br></div><div><br></div><div>% snmpwalk -v 2c -c snmpcomm switchname .1.3.6.1.2.1.17.7.1.2.2.1.2.3610</div><div>SNMPv2-SMI::mib-2.17.7.1.2.2.1.2.3610 = No Such Object available on this agent at this OID</div><div><br></div><div>I believe the above results mean that the Huawei Switch S6720 does not support Q-BRIDGE-MIB.</div><div><br></div><div>Also the BRIDGE-MIB for some reason is not polling all MAC addresses from the Switch which causes only some MAC addresses to be discovered.</div><div><br></div><div>In this situation, what alternatives do you suggest that I can use to discover MAC addresses since I intend to implement Sflow ? Is there another way to add the MAC addresses directly to the database?</div><div> </div><div> </div></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jan 2, 2019 at 11:53 PM Nick Hilliard (INEX) <<a href="mailto:nick@inex.ie">nick@inex.ie</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Ahmed Al-Saruri wrote on 02/01/2019 09:46:<br>
> 1- When I specify vlan ID so only MAC addresses of that vlan are <br>
> discovered, it fails and goes for BRIDGE-MIB instead:<br>
<br>
are you sure this is the correct ID? If you go into the IXP Manager web <br>
interface and click on "VLANs" on the left hand side, the ID you need to <br>
use here is in the "DB ID" field. It's not necessarily the same as the <br>
802.1q VLAN tag.<br>
<br>
> /usr/local/bin/<a href="http://update-l2database.pl" rel="noreferrer" target="_blank">update-l2database.pl</a> <br>
> <<a href="http://update-l2database.pl/" rel="noreferrer" target="_blank">http://update-l2database.pl/</a>> --vlanid 2 --debug<br>
> <br>
> DEBUG: xxx: started query process<br>
> DEBUG: xxx: pre-emptively trying Juniper jnxExVlanTag to see if we're on <br>
> a J-EX box (.1.3.6.1.4.1.2636.3.40.1.5.1.5.1.5)<br>
> DEBUG: xxx: this isn't a Juniper EX<br>
> DEBUG: xxx: this isn't a Juniper running an ELS image<br>
> DEBUG: xxx: attempting to retrieve dot1qVlanFdbId mapping (.1.3.6.1.2.1.17.7.1.4.2.1.3)<br>
> DEBUG: xxx: got mapping index: 3610 maps to 3610<br>
<br>
In theory, that means that Q-BRIDGE-MIB is supported.<br>
<br>
> DEBUG: xxx: attempting Q-BRIDGE-MIB (.1.3.6.1.2.1.17.7.1.2.2.1.2.3610)<br>
> DEBUG: xxx: failed to retrieve Q-BRIDGE-MIB. falling back to BRIDGE-MIB<br>
<br>
This shouldn't happen. Can you attempt the following commands on your <br>
switch:<br>
<br>
% snmpwalk -v 2c -c snmpcomm switchname .1.3.6.1.2.1.17.7.1.2.2.1.2<br>
<br>
% snmpwalk -v 2c -c snmpcomm switchname .1.3.6.1.2.1.17.7.1.2.2.1.2.3610<br>
<br>
Obviously you need to replace "snmpcomm" and "switchname" with values <br>
for your device.<br>
<br>
If the first query returns "No Such Instance currently exists at this <br>
OID", then the switch doesn't support Q-BRIDGE-MIB. If it returns lots <br>
of values and the second command returns "No Such Instance", then the <br>
Huawei SNMP implementation is broken, and we'll need to write some code <br>
to work around it.<br>
<br>
> DEBUG: xxx: attempting BRIDGE-MIB (.1.3.6.1.2.1.17.4.3.1.2)<br>
> DEBUG: xxx: BRIDGE-MIB query successful<br>
> [...]<br>
> 2- When I run the script with no vlan id specified it detects around<br>
> 270 MAC addresses only while the switch has around 2000 MAC:<br>
<br>
That's probably because it's using BRIDGE-MIB instead of Q-BRIDGE-MIB.<br>
<br>
Nick<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><p dir="auto" style="margin:0px 0px 16px;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;font-size:14px;line-height:20px;padding:0px;border:0px;outline:0px;vertical-align:baseline;background-image:initial;background-position:initial;background-repeat:initial;color:rgb(85,85,85)">Warm Regards,<br>Ahmed Alsaruri</p></div></div></div></div>