EtherNet/IP and the TCP/IP Software Stack

EtherNet/IP and TCP/IP Stack

I’m sure that there’s software that is more historic; the code that landed Neil Armstrong on the moon for example. I’m sure that there’s software that is more important; the code inside an ICBM missile for example. But I don’t know of any piece of software that is more ubiquitous than the TCP/IP stack. Every email, text message and browser session every single second of every day uses the TCP/IP stack. And so does every EtherNet/IP message. As a software geek, I am amazed by that.

The first version of modern TCP was written way back in 1973 and then formally documented in RFC 675, Specification of Internet Transmission Control Program, in December 1974.[1] Today, TCP/IP stacks are just another piece of the forgotten infrastructure of Ethernet. It’s no more of a consideration when buying a new Ethernet/IP device than the power windows or ABS braking system in your new car. It’s now just a part of your Linux, Windows, Raspberry PI, or another operating system that you don’t give a thought about.

So, what is the TCP/IP communications protocol?

A communications protocol is nothing more than a set of rules that describe the format, sequence and timing of messages exchanged between two computers. The TCP/IP stack is simply a collection of communications protocols that are needed for Ethernet and EtherNet/IP to operate. As we know, these communication protocols are deeply embedded in every Ethernet device on the planet. In the early days of Ethernet, when it was popular to build your own computers, you could buy TCP/IP software. There was a myriad of vendors that offered various kinds of TCP/IP software stacks, some that implemented more protocols than others. Some were smaller or faster than others.[2] Some were cheap and others were expensive.

EtherNet/IP is built on this common infrastructure and uses four layers of the OSI Network Model, the basis of TCP/IP, to structure communications between EtherNet/IP scanners and EtherNet/IP Adapters in control system applications. The four layers are:

Layer 1 (Physical Layer) – The Physical Layer refers to the physical signaling electronics and physical components (cables, connectors…etc.) that are used to transmit raw bits along a wire. The term “Layer 1” refers to all the elements required to serially transmit bits over a communication medium like wire or air (for wireless EtherNet/IP).

Layer 2 (Data Link Layer) – The Data Link Layer links two Ethernet devices together and accomplishes nothing more than moving an Ethernet frame from one device to another device. In EtherNet/IP and other plant floor automation systems, that link is normally going to be a dedicated link between an Ethernet device and a switch, a switch and a router, or two Ethernet devices on a linear networking segment. Protocols like Modbus RTU only have a Data Link Layer.

Layer 3 (Network layer) – The Network Layer manages moving messages called packets through an Ethernet network(s) based on the 32-bit, dotted-decimal address. The network layer manages error handling, network congestion and packet sequencing. At the Network Layer, industrial application layers like Modbus TCP and EtherNet/IP are indistinguishable from all other Ethernet communications. EtherNet/IP uses Network layer technology for multicasting of I/O data.

Layer 4 (Transport layer) – The Transport Layer manages the logical connection between EtherNet/IP devices (scanner and adapter). EtherNet/IP scanners use UDP for I/O messaging (implicit messaging) and TCP for non-Control messages (explicit messaging). The User Datagram Protocol (UDP) protocol is a basic Transport Layer providing a “fire and forget,” connectionless communication service with no acknowledgment of packet delivery. TCP (Transport Control Protocol) is a connection-oriented and reliable service used to open connections, close connections and read/write attributes in the Object Model.

EtherNet/IP scanners can use Transport Layer connections in slightly different ways. Some EtherNet/IP scanners maintain multiple TCP connections when configuring an EtherNet/IP adapter device. One connection might use a connection to configure the Explicit (TCP) and I/O (UDP) connections (two TCP and one UDP connections). Some will terminate both TCP connections when the I/O connection is activated while others will maintain the explicit connection. There are no specific EtherNet/IP rules regarding how long to keep an explicit connection alive.

The TCP/IP stack may not have put men on the moon, but it is still one of my important and useful inventions of the last several hundred years.

 

[1] Note: Internet standards are defined in documents called Requests For Comments (RFCs). These documents, and the process used to create them, is managed by the Internet Engineering Task Force (IETF).

[2] Remember that in those days, memory was extremely expensive and limited, and processors were extremely slow, so the size and speed of the TCP/IP stack was very important to buyers.

Attn: Our office is closed Monday, 5/27/24 in observance of Memorial Day. Orders placed after 2 pm CST 5/24/24 will be processed 5/28/24.