How to Configure and Audit LLDP on Windows 11 Network Adapters Using PowerShell

In enterprise network environments, pinpointing which physical switch, chassis slot, and port an individual workstation or server is connected to can be challenging\u2014especially when cables run behind walls or through multi-tier patch panels. Rather than manually tracing physical patch leads or querying switch MAC address tables, modern network devices advertise their identity, capabilities, and port descriptions using the IEEE 802.1AB Link Layer Discovery Protocol (LLDP). In Windows 11, the native Data Center Bridging (DCB) subsystem provides an integrated LLDP agent that can be queried and managed directly via PowerShell.

Understanding LLDP Architecture in Windows

LLDP operates at Layer 2 directly above the Ethernet MAC layer without requiring IP addressing:

  • Type-Length-Value (TLV) Frames: Connected network switches and hosts periodically broadcast TLV advertisement frames to standard multicast MAC addresses (e.g., 01-80-C2-00-00-0E).
  • Neighbor Telemetry: LLDP advertises switch name (System Name), switch management IP address, port ID (e.g., GigabitEthernet 1/0/24), port description, and native VLAN IDs.
  • DCBX Protocol: In enterprise and storage environments, LLDP carries Data Center Bridging Exchange (DCBX) parameters to negotiate Priority Flow Control (PFC) and Enhanced Transmission Selection (ETS) configurations automatically.

Enabling the Data Center Bridging Feature in Windows 11

The native LLDP cmdlets in Windows depend on the Data Center Bridging (DCB) framework. Open PowerShell with administrative privileges and check if the feature is installed:

Get-WindowsOptionalFeature -Online -FeatureName DataCenterBridging

If the state is Disabled, install the feature without rebooting:

Enable-WindowsOptionalFeature -Online -FeatureName DataCenterBridging -NoRestart

Once enabled, the NetLldpAgent PowerShell cmdlets become available for configuration.

Inspecting and Enabling the LLDP Agent on Network Adapters

To view the current operational status of the LLDP agent across all installed network adapters:

Get-NetLldpAgent

The output reports the operational mode for each network interface card:

InterfaceAlias : Ethernet 1
InterfaceIndex : 8
Address        : 01-80-c2-00-00-0e
Mode           : Disabled

By default, LLDP is disabled on client editions of Windows. To enable LLDP transmission and reception on your physical network adapter (e.g., "Ethernet 1"):

Enable-NetLldpAgent -NetAdapterName "Ethernet 1"

To configure the agent to participate in bidirectional transmission and reception:

Set-NetLldpAgent -NetAdapterName "Ethernet 1" -Mode TxAndRx

The supported modes include:

  • TxAndRx: Transmits local host telemetry and receives switch neighbor frames.
  • RxOnly: Passively listens for switch advertisements without transmitting host details.
  • Disabled: Shuts down the LLDP agent on the designated adapter.

Auditing Connected Switch Port and Neighbor Telemetry

Once the LLDP agent is running and has captured advertisement frames from the connected upstream switch, audit neighbor telemetry using Get-NetLldpData or through the WMI CIM repository:

Get-CimInstance -Namespace root\StandardCimv2 -ClassName MSFT_NetLldpData

The command returns comprehensive switch port metrics:

ChassisId           : 00-2A-6A-45-B1-00
ChassisIdSubtype    : MacAddress
PortId              : Gi1/0/24
PortIdSubtype       : InterfaceName
PortDescription     : Access Port - Floor 3 Engineering
SystemName          : SW-CORE-FLOOR3.corp.local
SystemDescription   : Cisco Catalyst 3850 Series Switch
ManagementAddress   : 10.50.1.254

This output instantly confirms:

  • SystemName: The precise hostname of the connected upstream switch.
  • PortId: The exact physical switch interface (e.g., Gi1/0/24).
  • ManagementAddress: The in-band IP address of the switch for remote management.

Disabling the LLDP Agent

If you are connected to a public or untrusted network and wish to prevent your computer from advertising its host information over the local link, disable the agent:

Disable-NetLldpAgent -NetAdapterName "Ethernet 1"

To verify that the agent has returned to the disabled state:

Get-NetLldpAgent -NetAdapterName "Ethernet 1"

The network adapter stops emitting LLDP frames immediately, preserving network privacy without disrupting IP traffic.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.