Industrial vSwitch (IvS) supports Parallel Redundancy Protocol (PRP) for redundancy in Profinet industrial ethernet. IvS can have two connections for LAN A and LAN B, and it receives the same PRP packets from both LAN A and LAN B. PRP Dual Attached Node (DAN) and Redundancy Box (RedBox) duplicate packets and send them for both LAN A and LAN B. When IvS recieves the PRP packets, it selects the packets arrived faster and discards the second packets. This means in the case that LAN A gets a network failure IvS still can recieve the packets from LAN B and continue Profinet communication.
The question is how to confirm that the failover is happened and how to troubleshoot the network failover issue.
4.2.x
As a first step, you can check the prp stats command output. it has PRP recived pakcets counter called "prpRxPkts" for LAN A and LAN B seperatoly. if you run this command for multiple times periodically, you can check which LAN recieving packets.
- Get the MAC address of the NIC that is connected Profinet network
- Login to the ESXi Host via SSH
- Run the command and find the DvsPortset name for the MAC address
net-stats -l
- Run the command and find Switch ID (swID) for the DvsPortset
nsxcli -c get ens switch list
- Run the command and find the entry for the MAC address in the node table output
nsxcli -c get ens prp stats node <swID>
In the case of LAN A network failure, LAN A recieved packets counter doesn't increase, but LAN B Rx Coutners is increasing.
Next step is to identify the current vmnic for the LAN that is havinng network failure. (Example LAN A)
Current IvS solution assumes that IvS has two uplinks with teaming for each LAN A and LAN B.
- If you run the following command, you can find the current vmnic of the LAN A and LAN B.
nsxcli -c get ens prp vdan list <swID>
- Once you find the name for vmnic, you can run the following command to capture the packets
pktcap-uw --uplink <vmnic name> --capture UplinkRcvKernel -o - | tcpdump-uw -vvv -en -r -
From this pcap files, you can check if the IvS is recieving the packets correctly or not.