This project was quite a challenge! I was tasked with setting up a training lab featuring IoT and PLC devices, including Siemens PLCs that use the Profinet protocol. Profinet operates over Ethernet (Layer 2) and employs its own discovery and control protocol. Siemens utilizes the Totally Integrated Automation (TIA) Portal on Windows to program and manage its PLC devices.
The challenge: Cisco Catalyst switches will drop packets from Profinet devices that don’t conform to Ethernet standards, particularly regarding packet size. As a result, Siemens TIA cannot discover PLC devices with the default Cisco Catalyst switch port configurations.
The solution: I configured a dummy voice VLAN on the switch port configuration to resolve this issue:#sh run int g1/0/12
Building configuration...
Current configuration : 191 bytes
!
interface GigabitEthernet1/0/12
switchport access vlan 90
switchport mode access
switchport voice vlan 102
spanning-tree portfast edge
spanning-tree bpduguard enable
end
This configuration ensures that all packets passing through the port will have the correct Ethernet frame size, preventing protocol drops. Be sure to use a dummy voice vlan tag (not a production vlan or god forbid the actual voice vlan!). Setting the voice vlan on the port will adjust the ethernet frame size so that when profinet discovery and control packets pass the will be of the correct size. Below is a screenshot of a Wireshark capture showing the Profinet discovery process (search function in Siemens TIA Application):
And the end result is we can now discover and configure the PLC devices in the Siemens TIA Software:
I hope this helps somone in the future!
Comments