lahell/PSDiscoveryProtocol

DCBX LLDP messages

jaromirk opened this issue · 30 comments

Hello,

it's more a feature request than a issue. I did capture LLDP packets and did not see DCBX LLDP messages. Would it be possible to capture it too?

This is output from my switch where I can see messages were transmitted.

image

Here is some info I found about it https://www.juniper.net/documentation/us/en/software/junos/traffic-mgmt-qfx/topics/concept/fibre-channel-dcbx-understanding.html

lahell commented

@jaromirk
Quote from README.md:

PSDiscoveryProtocol does not return all information available in CDP and LLDP packets. If you want to know what information is available use Export-Pcap and open the pcap file in Wireshark or another tool with a more complete implementation.

You can also use Invoke-DiscoveryProtocolCapture -Type LLDP | Get-DiscoveryProtocolData -Verbose. You will get a list of TLVs. DCBX TLVs will probably have OUI : 00-1B-21. The raw data is presented as hex and ascii, but I would have to find the DCBX specification in order to read it correctly.

What info do you need from DCBX?

I don't think I have any devices capable of sending DCBX. Would you mind sending a base64 encoded packet to me using the Contact Owners form at PowerShell Gallery? Get the base64 string using the following code.

$Packet = Invoke-DiscoveryProtocolCapture -Type LLDP
[Convert]::ToBase64String($Packet.Fragment)

looks like switch is not sending it. I want to check switch configuration - as I can check PFC/ETS configuration this way for RDMA Network adapters.

image

THis is how it should look like if you have ETS/PFC info in packet.
https://enterprise-support.nvidia.com/s/article/lldp-dcbx-packet-format-examples-ieee-and-cee--wireshark-x#jive_content_id_LLDP_DCBX__CEE_Mode

I'll try to figure out how to convince switch to send the info.

Just leaving DCBX specs here... https://www.ieee802.org/1/files/public/docs2008/az-wadekar-dcbx-capability-exchange-discovery-protocol-1108-v1.01.pdf ... I hope I will be able to capture something so we will be able to update your posh module :). It would be great improvement!

lahell commented

Thanks for the specs. Is this what you need? dcbx tlv-select

yeah, but it looks like it's enabled. I opened case with our engineering on what's going on. Either switch is not sending it, or we will need to add another multicast address (which is weird, because it should be LLDP)

Yes! it needs to be set manually to cee or ieee. Could you take a look into it? It would be great to have it in the output (PFC/ETS config for both iee and cee)

cee.pcap.txt
ieee.pcap.txt

lahell commented

Do you have an example of what you think the output should look like?

This is what it looks like inside OS when you configure NICs. Get-NetAdapterQoS
image

What I would love to see is if the configuration on switch is CEE or IEEE. And following information:

ETS: what priorities were configured and what bandwidth was configured:
image

And PFC configuration
image

Also PFC itself if it's enabled and if willing is enabled
image

lahell commented

I have created the new branch feature-dcbx. Would you mind playing around with different settings and values to make sure it works correctly?

lahell commented

Example for testing:

$Output = Invoke-DiscoveryProtocolCapture -Type LLDP | Get-DiscoveryProtocolData
$Output.DCBX.IEEE.ETS.BandwidthAssignmentTable
$Output | ConvertTo-Json -Depth 4
lahell commented

@jaromirk, did you get a chance to test the new branch?

I'll take a look! Thank you!

Looks awesome! Just tried IEEE. Will reconfigure switch on monday and try CEE. THank you!!!!
image

It's pretty awesome! May I also ask you for this info?
image

lahell commented

@jaromirk
It should be there. Pipe Get-DiscoveryProtocolData to ConvertTo-Json -Depth 4 to easily see what is available.

The following code works for me.

$PCAP = (Invoke-WebRequest https://github.com/lahell/PSDiscoveryProtocol/files/11004458/cee.pcap.txt -UseBasicParsing).Content
$Bytes = $PCAP.ToCharArray() -as [byte[]] | Select-Object -Skip 40
$LLDP = ConvertFrom-LLDPPacket -Packet $Bytes
$LLDP.DCBX.CEE.ETS.BandwidthAssignmentTable | Format-Table

$PCAP = (Invoke-WebRequest https://github.com/lahell/PSDiscoveryProtocol/files/11004459/ieee.pcap.txt -UseBasicParsing).Content
$Bytes = $PCAP.ToCharArray() -as [byte[]] | Select-Object -Skip 40
$LLDP = ConvertFrom-LLDPPacket -Packet $Bytes
$LLDP.DCBX.IEEE.ETS.BandwidthAssignmentTable | Format-Table
lahell commented

@jaromirk
Thanks for testing. Did you also test different settings and values on your switch config to make sure my module return the correct values?

I did test just ieee. Let me reconfigure it to cee

this is ieee
image

gosh, I'm not able to see any dcbx packets if I configure cee - but it's not your fault, switch does not send anything. I assume it's working :). Feel free to release!

ok, CEE is also fine
image