Comments (12)
If you can successfully capture LLDP or CDP using NetEventPacketCapture then I can probably get it to work in PSDiscoveryProtocol, but I don't have any way of testing.
from psdiscoveryprotocol.
Today I couldn't get it captured using NetEventpackageCapture
but I'll try again on monday, maybe a fresh start helps..
from psdiscoveryprotocol.
I am not sure if this was fixed or its just not an issue for me. We have hundreds of servers with Teaming enabled. This module is collecting CDP info correctly for me (mostly).
However, I also agree its also collecting CDP info for the Team adapters which doesn't make sense. Only the member adapters for a Team adapter are actually connected. The Team adapter has the actual IP settings, but it doesn't directly connect to any equipment.
I made a change that appropriately removes Team adapters. Within the "Invoke-DiscoveryProtocolCapture" function and I made the following changes:
In this section/area of code in the function, it was this:
$Adapters = Get-NetAdapter @CimSession | Where-Object { $_.Status -eq 'Up' -and $_.InterfaceType -eq 6 } | Select-Object Name, MacAddress, InterfaceDescription, InterfaceIndex
if ($Adapters) {
MACAddresses = $Adapters.MacAddress.ForEach({ [PhysicalAddress]::Parse($_).ToString() })
$SessionName = 'Capture-{0}' -f (Get-Date).ToString('s')
.###...etc....###
And I changed it to this:
$Adapters = Get-NetAdapter @CimSession | Where-Object { $_.Status -eq 'Up' -and $_.InterfaceType -eq 6 } | Select-Object Name, MacAddress, InterfaceDescription, InterfaceIndex
#Remove Team Adapters (they don't have CDP Info)
$teamAdapters = (Get-NetLbfoTeam @CimSession).Name
$cleanList = @()
foreach ($Adapter in $Adapters) {
if($Adapter.Name -notin $teamAdapters){$cleanList += $Adapter}
}
$Adapters = $cleanList
if ($Adapters) {
MACAddresses = $Adapters.MacAddress.ForEach({ [PhysicalAddress]::Parse($_).ToString() })
$SessionName = 'Capture-{0}' -f (Get-Date).ToString('s')
.###...etc....###
Essentially, I just get the name of the Team adapters using the "Get-NetLbfoTeam" function and remove them from the $Adapters array. Now it only returns valid adapters.
from psdiscoveryprotocol.
Hey @TrevorW7,
so you're saying you do get results for adapters that are part of a team? I've been trying again on monday but to no avail. It seems to be caused by the fact that NetEventPacketCapture is returning nothing for them.
from psdiscoveryprotocol.
Yes, I am collecting CDP info from the adapters that are members of teams without issue. Only minimum requirement I have found so far is PowerShell 5.1 or higher. We have servers that only have PS 4.0 and they won't work at all, which makes sense to me. Just need to updates PS.
from psdiscoveryprotocol.
Ok, then I'll try to reproduce the behavior I'm seeing on a non domain server - must be something in our environment then.
What I noticed netsh trace
didn't find the packets while pktmon
did.
from psdiscoveryprotocol.
@TrevorW7 I just tried to reproduce it on a non domain machine, same observation. However what I just noticed: It seems to work for Teams that are configured switch independent, while it does not work for LACP teams.
Are your teams all switch independent by chance?
from psdiscoveryprotocol.
Nearly all the Teaming we have is setup with multiple switches using LACP. Are you using Cisco switches or another brand that should support CDP? Are the switches older or newer (I.e. using CDP 1 or 2)? Our switches are relatively new Cisco switches using CDP 2. If we use Wireshark portable, filtering on "cdp" shows the CDP packets within 60 seconds every time.
from psdiscoveryprotocol.
What do you get when you type "show cdp" in the switch? Is is set to send every 60 seconds? Hold time is 180 seconds? Encapsulation is ARPA? CDPv2 is enabled? Using "show interface" shows the interface and the protocol is up? Correct?
from psdiscoveryprotocol.
Yes, cdp is set to send all 60 seconds. I can neither capture lldp nor cdp using this module (via NetEventPacketCapture). It does work via pktmon and wireshark through, I can see both CDP and LLDP there.
Might be the same as #29, however he is indicating that he can see them using net sh trace
which doesn't work for me either.
from psdiscoveryprotocol.
Not sure what to say. If you say NetEventPacketCapture isn't working, that isn't a problem with the author's code. If it were me, I'd open a case with Microsoft. It's working great for me and I'm loving that I don't have to install anything on the servers where I need to collect CDP info. Alternatives are tshark, tcpdump, or pktmon.
from psdiscoveryprotocol.
Yes, agreed. This is not an issue with this module. I'll close the case off, not sure if I go for a Microsoft case through, given the average time needed to get the case to someone that understands the issue.
from psdiscoveryprotocol.
Related Issues (20)
- Suggestion to avoid p-mode switch available only in some editions of 2012 R2+ HOT 2
- The WMI service or the WMI provi der returned an unknown error: HRESULT 0x800706be HOT 3
- LLDP - Add system description HOT 1
- Exception calling "ReadByte" with "0" argument(s)
- Don't require elevation when using WinRM HOT 1
- Ability to display NIC Port HOT 4
- Method 'where' not found HOT 2
- Different results when computer is plugged in through the phone HOT 6
- Limit of Single Device per LLDP Discovery HOT 3
- Set NIC for Invoke-DiscoveryProtocolCapture? No discovery protocol packets captured HOT 2
- Doesn't work with Teamed interfaces. HOT 4
- New-TemporaryFile not recognized as the name of a cmdlet, function,.... HOT 1
- DCBX LLDP messages HOT 30
- Unable to pull information over wireless networks. HOT 1
- No discover protocol packets captured even other tools work on this host. HOT 16
- IPAddress returns gateway IP, not actual IP HOT 1
- Please add Software (contains version) to ConvertFrom-CDPPacket. Its the software running on the connected Cisco device.
- Perhaps also collect Network IP Settings while collecting CDP Info?
- Some computers do not capture CDP Info when its there
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from psdiscoveryprotocol.