You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When translating NAS ports to ifIndex in Comware_v7's default NasPortToIfIndex routine (inherited from pf::Switch::H3C if I'm not wrong) the resulting value seems wrong for stacked switches. This makes PacketFence unable to restart switchport via SNMP.
Switch port description seems to have the correct values, for example: Port: 33575422 (slot=2;subslot=0;port=5;vlanid=510), in this case NAS port and Switch Port in the web interface have the same value, so it doesn't seem translated.
In the code there is a comment where the author found an offset. I have a theory, if you translate the NAS port to hexadecimal, you can "easily" see the Slot, Subslot, Port and VLAN "bytes".
For now I guessed (but I'm not sure):
VLAN ID are last 3 nibbles
Port is next 2 nibbles
Subslot is next 1 nibble
Slot is next 2 nibbles
Example: (02)(0)(05)(1FE)
Each Slot starts its indexes at 1, 66, 131 and 196, respectively for a 4 stack switch (every 65 ports)
I created a "translation script", here it is with the author's offset and two ports that I tested on our switches:
Describe the bug
When translating NAS ports to ifIndex in Comware_v7's default NasPortToIfIndex routine (inherited from pf::Switch::H3C if I'm not wrong) the resulting value seems wrong for stacked switches. This makes PacketFence unable to restart switchport via SNMP.
Switch port description seems to have the correct values, for example: Port: 33575422 (slot=2;subslot=0;port=5;vlanid=510), in this case NAS port and Switch Port in the web interface have the same value, so it doesn't seem translated.
In the code there is a comment where the author found an offset. I have a theory, if you translate the NAS port to hexadecimal, you can "easily" see the Slot, Subslot, Port and VLAN "bytes".
For now I guessed (but I'm not sure):
I created a "translation script", here it is with the author's offset and two ports that I tested on our switches:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
NAS port should be properly translated to ifIndex for SNMP to work.
Hardware: Switch HP 5130
The text was updated successfully, but these errors were encountered: