On Wed, 21 Dec 2022 15:47:15 +0000 Davide Miccone davide@wpweb.com wrote:
Inside NAV all ports are show as vlan 1 instead of vlan 2, as you can see below from a snippet of configuration.
Indeed, because NAV interprets the Q-BRIDGE-MIB PVID value as a port's access/native VLAN. This is what NAV got from Q-BRIDGE-MIB, according to your logs:
2022-11-07 17:35:41,306 [DEBUG plugins.juniperdot1q.juniperdot1q] [inventory f-s83.endurance-mnet.local] PVID mapping: {1: 1, 2: 1, 3: 1, 4: 1, 5: 1, 6: 1, 7: 1, 8: 1, 9: 1, 10: 1, 1000: 1, 1001: 1, 1002: 1, 1003: 1, 1004: 1, 1005: 1, 1006: 1, 1007: 1}
So you switch seems to report all ports as VLAN 1.
Q-BRIDGE-MIB::dot1qPvid is defined thus:
dot1qPvid OBJECT-TYPE -- FROM Q-BRIDGE-MIB -- TEXTUAL CONVENTION VlanIndex SYNTAX Unsigned32 DISPLAY-HINT "d" MAX-ACCESS read-write STATUS current DESCRIPTION "The PVID, the VLAN-ID assigned to untagged frames or Priority-Tagged frames received on this port.
The value of this object MUST be retained across reinitializations of the management system."
DEFVAL { 1 } ::= { iso(1) org(3) dod(6) internet(1) mgmt(2) mib-2(1) dot1dBridge(17) qBridgeMIB(7) qBridgeMIBObjects(1) dot1qVlan(4) dot1qPortVlanTable(5) dot1qPortVlanEntry(1) 1 }
It doesn't help that different vendors use different terms when it comes to 802.1Q-processing of packets (pvid/access/native/untagged sometimes refer to the same concept, but not always).
ipdevpoll also collects egress information for VLANs, but this is mainly to identify which ports are trunk ports, and which VLANs are tagged on those ports. From your logs:
2022-11-07 17:35:41,407 [DEBUG plugins.juniperdot1q.juniperdot1q] [inventory f-s83.endurance-mnet.local] vlan: 1 egress: {1000, 1001, 10, 1002, 1003, 1004, 1005, 1006, 1007} untagged: {1000, 1001, 10, 1002, 1003, 1004, 1005, 1006, 1007} 2022-11-07 17:35:41,408 [DEBUG plugins.juniperdot1q.juniperdot1q] [inventory f-s83.endurance-mnet.local] vlan: 2 egress: {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} untagged: {1, 2, 3, 4, 5, 6, 7, 8, 9}
This could potentially be used to identify which ports carry vlan 2 untagged - but I'm not sure how we would differentiate between that value and the PVID value (which has worked out well for every other switch model we have encountered)...
Suggestions are welcome...