1

I'm facing an issue with network connectivity to a Profinet PLC device and would appreciate some help. Here's the setup:

enter image description here

  • PC ↔ DLINK Switch ↔ Cisco C2960 ↔ SCALANCE X108 ↔ PLC Device
  • Only Managed switch is the Cisco Switch, All other switches are Unmanaged
  • SCALANCE X108 is an Industrial Unmanaged switch.
  • The PLC is assigned an IP address of 192.168.101.9 and is configured with Profinet.
  • Both the PC and the port connecting to the SCALANCE X108 are configured in VLAN 101. The Switch has several other VLANs for other IT infrastructure.

Issue:

  • I can successfully ping and scan the Profinet PLC in TIA Portal when it's connected directly to the DLINK Switch.
  • I can ping the two PLC devices (192.168.101.21, 192.168.101.22) that use Modbus over TCP/IP.
  • However, when the Profinet PLC connected through the SCALANCE X108, I can no longer ping it from the PC, I think the Cisco Switch is dropping VLAN 0 frames. Priority is assigned to Profinet real-time messages in accordance wit standard IEEE 802.1Q. The VLAN ID 0 with VLAN priority 6 is used for Profinet Real Time packets.

What I've Checked:

Since Profinet use VLAN 0, I configured Cisco Switch port to allow this VLAN 0 traffic, I've tried two workarounds , to make a non industrial Cisco Catalyst VLAN-Based Switch to work with Profinet Protocol. The first uses a voice VLAN that will pass vlan 0. The second approach uses a trunk port.

  1. Voice VLAN over access port :
Switch(config)# interface GigabitEthernet 0/16
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 101
Switch(config-if)# switchport voice vlan dot1p
  1. Trunk Port:
Switch(config)# default interface 0/16
Switch(config)# interface GigabitEthernet 0/16
Switch(config-if)# switchport trunk allowed vlan 101
Switch(config-if)# switchport native vlan 101

With these approaches I'm pretty sure that Profinet devices will work on non industrial Cisco switches when these devices are directly hooked to the same switch. I need to make it work with Profinet devices connected to an Industrial Siemens Switch which is connected to a Cisco switch.

I've also checked the Cisco switch MAC address table and ARP table on Port Gi 0/16 and the device is not showing up:

cisco# show mac address-table interface gigabitEthernet 0/16
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
 101    000e.8c87.5b71    DYNAMIC     Gi0/16
 101    000e.cf1b.1288    DYNAMIC     Gi0/16
Total Mac Addresses for this criterion: 2
cisco#

Im still not able to ping the PLC even allowing VLAN 0 through the voice VLAN and Trunking. I don't know where to check if the Cisco switch is actually dropping traffic. I've checked debug arp and so far see no issue

Has anyone encountered a similar issue or could provide guidance on what might be wrong? Any specific configurations or checks I should perform on the Cisco C2960 to ensure Profinet traffic is passing through correctly?

Thanks in advance for your help!

8
  • If it is attached to an access switch interface assigned to VLAN 101, it should drop any frames with a VLAN tag to prevent a VLAN hopping attack. Also, restricting a trunk to VLAN 101 will not allow any frames tagged with a different VLAN number. A voice VLAN uses CDP with a Cisco phone to negotiate a trunk, and you are not using a Cisco phone or anything with CDP.
    – Ron Maupin
    Commented Aug 17 at 12:54
  • Yes I'm not using a Cisco Phone. It is Profinet PLC device. Profinet devices use Vlan 0 for discovery and some other aspects of the protocol. dot1p—Configures the switch to accept voice and data IEEE 802.1p priority frames tagged with VLAN ID 0 (the native VLAN). By default, the switch drops all voice and data traffic tagged with VLAN 0. If configured for 802.1p the Cisco IP Phone forwards the traffic with an IEEE 802.1p priority of 5.
    – Khaalidi
    Commented Aug 17 at 16:33
  • Yes an access port for sure will drop tagged VLAN traffic to prevent VLAN hopping attacks, but an access port with voice VLAN will actually forward VLAN 0 traffic.
    – Khaalidi
    Commented Aug 17 at 16:45
  • @RonMaupin I know there is series of Cisco Industrial switches that natively support Profinet. In a typical Industrial network, they keep it isolated from the rest of the enterprise IT architecture because those enterprise class switches do not support Profinet natively. It is crazy you know when it works in the same Unmanaged Dlink switch where the PC is , the switch is connected to an an access port of VLAN 101.
    – Khaalidi
    Commented Aug 17 at 16:45
  • As i explained, a switch interface with a voice VLAN will only use that when a Cisco phone uses CDP to negotiate a trunk. It does nothing when a normal device is connected to the interface as it will only use the data VLAN at that point. The switch requires a CDP negotiation to use the voice VLAN configured on a switch interface.
    – Ron Maupin
    Commented Aug 17 at 17:35

2 Answers 2

1

Generally, you should not configure a VLAN trunk on a port connecting an unmanaged switch, or an end node, unless you know for sure that that end node handles tagged VLANs correctly. You should always use an access port instead.

Trying to pass tagged VLANs across an unmanaged switch is a dangerous setup. Some unmanaged switches filter tagged frames, interrupting VLAN connectivity. Others pass them transparently, creating the risk for any device on that switch to access any VLAN on the trunk. Another risk is that a hardware replacement later on breaks your VLAN setup.

Accordingly, you should only use access ports towards unmanaged switches. If an end node beyond that switch requires a tagged VLAN then use a managed switch with an appropriate setup.

And VLAN 0 isn't a thing. VLAN IDs 0 and 4095 cannot be used in a trunk, those values are reserved. If a Q tag carries 0x000 in the VID field, then that frame's VLAN isn't tagged (indicating the native VLAN) and just PCP and DEI are used. 0xFFF cannot be used on the wire at all, it's for a device's internal use only (sometimes indicating 'any VLAN').

3
  • VLAN 0 is used in VoIP and IP Phone as well in Profinet standard in Industrial Ethernet. And those Industrial Switches are actully capable to evalute it and forward the frame with another VLAN x , while maintaining the CoS priority as the frame travels across different switches .
    – Khaalidi
    Commented Aug 19 at 19:30
  • You should read IEEE 802.1Q 9.6: "The null VID. Indicates that the tag header contains only priority information; no VID is present in the frame."
    – Zac67
    Commented Aug 19 at 19:46
  • Yes , The VLAN ID 0 is used when a device needs to send priority-tagged frames but does not know in which particular VLAN it resides.
    – Khaalidi
    Commented Aug 20 at 4:58
-2

The issue you're facing likely relates to the Cisco switch not properly handling VLAN 0 traffic, crucial for Profinet real-time communication. Even though you've configured the switch to allow VLAN 0 using both voice VLAN and trunk port methods, it's possible the switch is still dropping these frames.

First, verify that the voice VLAN configuration is correctly applied, ensuring the switch isn't filtering out VLAN 0 traffic. For the trunk port, make sure it's set up to pass all necessary VLANs, particularly ensuring the native VLAN is configured correctly and that VLAN 0 priority traffic isn't being dropped.

Next, consider the SCALANCE X108 switch. Since it's unmanaged, confirm that it's not altering or dropping VLAN 0 traffic, which could affect connectivity when passing through to the Cisco switch.

Using Cisco's debugging tools like debug ip packet or debug ethernet might help identify if VLAN 0 frames are being dropped or mishandled. If the issue persists, you could set up a dedicated VLAN for Profinet traffic, ensuring all switches, including the SCALANCE, handle this VLAN consistently. If needed, consider using industrial-grade switches that natively support Profinet or contact Cisco support for further assistance.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.