Automation Glossary • LLDP PROFINET Topology

LLDP and PROFINET Topology Detection

Merobix Engineering • • 8 min read

PROFINET can draw a live map of exactly which device connects to which, port by port, and it does so with LLDP. That neighbor knowledge is what lets a tool show the physical topology, pinpoint which cable broke, and replace a failed device without a laptop. This page explains how LLDP feeds PROFINET topology detection and why it matters.

Back to Blog

LLDP PROFINET Topology in one line: LLDP (Link Layer Discovery Protocol) lets each PROFINET port announce its identity to its directly connected neighbor, so every device learns which device and port sits on the other end of each cable. PROFINET uses this neighbor information to display the physical topology, locate exactly where a cable fault occurred, and support automatic device replacement by identifying a new device from its position.

How Neighbor Detection Works

LLDP is a standard link-layer protocol in which each port periodically sends a small frame advertising its own identity - device name and port - to whatever is directly connected. Its neighbor stores that, and vice versa, so both ends of every cable know precisely who is on the other side and through which port. PROFINET adopts LLDP so this per-port neighbor map exists across the whole network, giving the engineering tool the raw material to draw the actual wiring rather than a guessed layout.

Because the information is port-specific, the topology it produces is not just a list of devices but a diagram of which port connects to which port. That is far more useful than a flat device list: it distinguishes a line, a ring, and a star, and it tells you the physical order of devices along a segment. This neighbor data complements the higher-level view of a chosen daisy-chain topology with ground-truth about what is actually cabled.

What Topology Detection Buys You

The first payoff is fault location. Because each device knows its expected neighbor, a break or a miswire shows up as a specific device reporting that the wrong neighbor, or no neighbor, is on a given port. Instead of a vague network fault, you get the exact port where reality stopped matching the plan, which turns cable troubleshooting from a hunt into a lookup. The engineering tool can highlight the offending link on the topology diagram.

The second payoff is automatic device replacement without a supervisor laptop. When a device fails and an unnamed replacement is plugged into the same physical position, the controller uses the LLDP neighbor relationships to recognize where the new device sits and assign it the correct station name over the network, so it rejoins with no manual DCP step. This is the designed cure for the device name mismatch after replacement, and it only works when topology has been configured so the controller knows what should be where.

What an LLDP Frame Carries

An LLDP advertisement is a short frame built from type-length-value fields. The mandatory ones identify the sender: a chassis identifier for the device, a port identifier for the specific port doing the talking, and a time-to-live that tells the neighbor how long to trust the information before it goes stale. PROFINET adds its own extension fields on top of the base IEEE 802.1AB standard, carrying the station-name and port details the engineering tool needs to match the physical map against the project configuration.

Two properties make LLDP well behaved on a control network. The frames are link-local - addressed so a compliant switch consumes them at the port rather than forwarding them onward - which is precisely what makes a neighbor relationship mean 'physically adjacent'. And the protocol is advertisement-only: devices announce and listen, but nothing about LLDP polls, retries, or competes with the cyclic PROFINET exchange. It runs quietly alongside the process data as bookkeeping.

Switches Make or Break the Map

The neighbor map is only as truthful as the infrastructure between devices. A managed, PROFINET-aware switch participates in LLDP itself: it appears in the topology as a device with its own ports, so the map stays accurate through it. An unmanaged switch does one of two kinds of damage depending on how it handles the frames. If it drops them, the devices on either side see no neighbor and that stretch of the map goes dark. If it floods them through - which simple switches commonly do - the devices on either side record each other as directly connected when they are not, and the switch itself is invisible.

That second case is the sneaky one, because the topology looks complete and plausible while being physically wrong, and position-based features quietly misbehave: a fault gets located on a link that does not exist, and replacement-by-position identifies the wrong spot. The practical rule is that everything in the PROFINET path should speak LLDP, and any switch that cannot should be treated as a hole in the map you have knowingly chosen to live with.

What Automatic Replacement Actually Requires

Replacement without a laptop is the headline feature, but it only works when several conditions hold at once:

  1. The topology was configured in the engineering project and matches the real cabling - this is the reference the controller compares against.
  2. The controller is configured for automatic name assignment.
  3. The replacement device is factory-fresh or reset, holding no station name of its own.
  4. It is plugged into exactly the planned port, since its position is its identity.
  5. The device type is compatible with what the project expects at that position.

When those hold, the controller recognizes the new device by where it sits and assigns its station name over the PROFINET discovery and configuration protocol (DCP), and the device rejoins on its own. When any of them does not hold - a spare that served elsewhere and still carries its old name being the classic - the replacement stalls and the fix is a manual naming step. It is worth writing the reset-the-spare step into the maintenance procedure for exactly that reason.

Reading a Mismatch Between Map and Plant

SymptomLikely cause
Wrong neighbor reported on one portCables swapped between two ports during maintenance
No neighbor on a port that should have oneBroken cable or dead port, or a switch in the path dropping LLDP
Neighbors that skip over a known switchUnmanaged switch flooding LLDP frames through
Mismatch appearing right after a repairReconnection in a different order than the planned topology

The general method: trust the LLDP data as a statement of what is cabled right now, and treat the engineering project as the statement of what should be. Diagnosis is the diff between the two, walked port by port - a workflow covered step by step in diagnosing PROFINET with LLDP neighbor data.

Frequently Asked Questions

What does LLDP do in a PROFINET network?

LLDP lets each port advertise its identity to its directly connected neighbor, so every device learns which device and port is on the other end of each cable. PROFINET uses this port-by-port neighbor map to display the true physical topology, locate cable faults precisely, and enable automatic replacement of a failed device by its position.

How does topology detection locate a cable fault?

Each device knows its expected neighbor on each port from LLDP. When a cable breaks or is miswired, a device reports the wrong neighbor or none on that port, so the fault appears as a specific device and port rather than a vague network error. The engineering tool highlights the exact link where reality stopped matching the plan.

How does LLDP enable automatic device replacement?

When a failed device is replaced with an unnamed unit in the same physical position, the controller uses the LLDP neighbor relationships to recognize where the new device sits and assigns it the correct station name over the network. The device rejoins with no manual naming step. This requires the topology to have been configured first.

Is LLDP specific to PROFINET?

No. LLDP is the IEEE 802.1AB link-layer discovery standard used across general networking; PROFINET adopts it and adds its own extension fields for the information its tools need, such as station names and port details. That heritage is useful in practice: managed switches and ordinary network tooling can read the same neighbor data through their own interfaces, giving you a second, independent view of the topology to cross-check against the engineering tool.

Why does the topology view show two devices as directly connected when a switch sits between them?

Almost certainly an unmanaged switch that floods LLDP frames through instead of consuming them. The devices on either side each receive the other's advertisement and record a direct adjacency, while the switch, speaking no LLDP, stays invisible. The map then looks complete but is physically wrong, which misleads fault location and replacement-by-position. Replacing that switch with a PROFINET-aware managed switch restores a truthful map.

More in Industrial Protocols
PROFINET LLDP Diagnosis  •  Set Up MQTT Last Will for Offline Detection  •  Diagnose PROFINET Jitter  •  PROFINET device name mismatch  •  PROFINET Security Class  •  All Industrial Protocols →
Free SCADA operator training
Merobix University - 70 video lessons & 261 quiz questions, from first login to compliance reporting. No demo call required.
Start free →