“Take two aspirin and call me in the morning!” – That was the answer I was given when I told one of the smartest controls engineers I know that EtherNet/IP and Quality of Service were making my head hurt.
Unfortunately, if you are, like me, looking for solid, quick answers in this area, we’re both out of luck. The explanations for how QoS works and how it influences EtherNet/IP control system designs are not necessarily straightforward. Different devices from different manufacturers have different capabilities. Unlike other parts of EtherNet/IP, the actual behavior that you get on the factory floor really depends upon how you, the control engineer, configure the features your vendor has made available to you.
Let’s start with the biggest misconception first (I feel my headache coming back). Priority and Quality of Service are not the same things in the IT world, but in the manufacturing EtherNet/IP world, they are. That means if you are studying this topic, you have to realize that 99% of the information you’ll read is only somewhat pertinent to EtherNet/IP.
What’s even more confusing is that QoS is handled slightly differently at the IP Layer than at the Link Layer. Remember from earlier articles that at the IP Layer (Layer 3), packets are moved around a network by routers based on their IP Addresses. At the Link Layer (Layer 2), frames are moved in and out of a switch based on a MAC address.
Quality of Service at layer 3 (IP Layer) sets the priority of the packets on an Ethernet network. On the internet, a Layer 3 packet can take any one of multiple paths to a destination. If you are reading a study on koala bears from an Australian University, your packet has numerous ways and numerous subnetworks it can traverse to get from your computer to that destination over the big WAN (Wide Area Network) known as the internet. With QoS, your computer can “mark” your packets to indicate how fast you want that data, how much bandwidth you require, the rates you are willing to pay to get that service and more. You may not want to pay any premium for the koala study, but you might if you were doing an important VOIP call or a video training session. With Layer 3, your packets can have any one of 64 different QoS levels.
Quality of Service at Layer 2 (Link Layer) sets the priority of messages (EtherNet/IP, Modbus TCP, or other) as they move through a switch. Some switches have queues and a switch can be configured to put messages of certain priority levels in specific queues. The frames in the queues with the highest priority are sent first, followed by the next highest priority queue and so forth.
It’s probably understandable to you that you need priority of service when sending manufacturing messages across your corporate network or across the internet, but why are they needed in a manufacturing cell? You’d probably be correct if you said that there is so much bandwidth in our manufacturing cell that we’ll never need Quality of Service. Unfortunately, you don’t know what the future holds. As we add more and more IoT devices and manufacturing devices with huge amounts of data to share, there may come the day when you will need to prioritize messages.
Now you have the additional problem of making sure you have a switch that supports QoS (not all of them do) and has the number of queues you want. Hint: Trust me – two is enough: one for your EtherNet/IP implicit traffic and one for everything else.
If that’s not enough of a headache for you, join me in part three where we will look at the way that packets and frames are marked for QoS by switches and routers. Spoiler alert – they mostly don’t do it the same way.
Missed part one? Head over here to check it out!