Repository navigation
feat: add Get-SnmpBridgeNeighbors for L2 edge discovery via forwarding tables (#39) - #56
Merged
Merged
Conversation
…GE-MIB Walk dot1dTpFdbTable (address/port/status columns) on each eligible node to discover MAC addresses the switch has learned. Resolves MACs to IPs via the local ARP table and emits edges with Confidence='L2-FDB' when the IP matches a topology node. Fills in layer-2 edges that CDP/LLDP miss. Changes: - New function Get-SnmpBridgeNeighbors in Public/ - Reuses Invoke-SnmpWalk for SNMP walks (redaction + injection guards) - Status filtering: only status=3 (learned) entries produce edges - MAC-to-IP resolution via local ARP table (queried once) - No ARP match produces Write-Verbose, not Write-Warning - Updated Merge-Edges confidence ranking: L2-SNMP > L2-FDB > L2-SNMP-Heuristic > L3-Inferred - Added Get-SnmpBridgeNeighbors to FunctionsToExport in psd1 - Pester tests: - Get-SnmpBridgeNeighbors: edge count, status filtering, unresolvable MAC - Merge-Edges: three-way confidence ranking in both input orders
cursor
Bot
force-pushed
the
feature/bridge-neighbors-39
branch
from
September 9, 2026 13:09
7ef5fc7 to
1b28c98
Compare
The SNMP mock returned the same FDB table for every eligible node, so host walks created an extra L2-FDB edge. Empty topology.Edges unwraps to $null and Merge-Edges then returned @($null); return a real empty array when nothing survives the merge. Co-authored-by: Jacobrakai <jacobyoby@users.noreply.github.com>
This was referenced Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds BRIDGE-MIB forwarding table walks to discover L2 edges where CDP/LLDP are silent.
New function: Get-SnmpBridgeNeighbors
Merge-Edges confidence ranking updated:
Tests: 6 new Pester tests covering edge count, status filtering, unresolvable MAC, and three-way confidence ranking in both input orders.
Export: Added to FunctionsToExport in module manifest.
Note: pwsh not available locally so Pester tests not executed, but follow existing test patterns exactly.
Closes #39.
Generated with Qwen Code