<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=2854636358152850&amp;ev=PageView&amp;noscript=1">
7 min read

What is the TCP/IP Stack

By Phil Zito on May 3, 2013 11:28:06 AM

Overview

The TCP/IP Stack is where the magic happens... Do you want to send an email? Do you want to send a file? If you do you are using the TCP/IP Stack!

During the post I will discuss the TCP/IP Stack. 

In this post, I will explain to the reader:

  • Key Terms
  • A detailed description of the TCP/IP Stack
  • How does the TCP/IP Stack work?
  • Why the TCP/IP Stack matters to Building Automation Systems?
  • How does the TCP/IP Stack align with the OSI Model?
  • Sources

Key Terms

  • Layers: Layers are essentially the segmentation of functionality in the OSI model.
  • HTTP: Hypertext Transfer Protocol- This is the framework of most internet based websites and is vital for transferring data between a web browser and a server. A secure version HTTPS typically has 128 bit encryption and is used for secure transactions.
  • Ports: These are essentially the roads that different protocols travel. Envision the network to being a giant city and the ports being the highways leading out of that city.
  • ISO: International Organization for Standardization

A detailed description of the TCP/IP Stack

TCP Stack

The TCP/IP Stack, or the internet protocol suite, is a set of communication protocols used by the internet or similar networks. Orginally resulting from research at DARPA (Defense Advanced Research Projects Agency). The TCP/IP stack has gradually grown to include a suite of protocols (see the image below).

 

 

As you can see from the image above, the TCP/IP stack comprises a series of Protocols.  Some you will be familar with (HTTP, FTP, SMTP) and some may be more foreign to you (ISDN, IGMP, ARP). In a later article on network systems and functionality, I will dwell deeper into the specific protocols of the TCP/IP stack.

As the reader in the meantime, for a high level view, should understand that data is taken through the layers, much like the OSI model, and is gradually reconciled to meet the needs of the layer the data is in. The important take away from this, is that most Building Automation System's rely heavily on the functionality of the TCP/IP stack. As control systems continue to converge with IT systems, users should expect to see an even greater reliance on IT systems and frameworks.

How does the TCP/IP Stack work

TCP Data Flow

 

The TCP/IP Stack works just like the OSI model by establishing a set of rules and standards for communication in and between the different layers. These rules ensure that different products can communicate between each other because they are developed around the same guidelines.

In the previous section, I posted a picture of the data flow between the different layers of the TCP/IP Stack. The first thing you notice is that the TCP/IP stack consists of only four layers (although some people try to divide the Link layer into two layers: the physical layer and the link layer).

These four layers communicate data through in a manner similar to the OSI model. The big difference you will notice is that rather then framing the data in terms of actual functionality, the TCP/IP stack frames the data in terms of protocol usage. As the data moves up and down the layers, it is received and/or broadcast by a series of protocols.

Thus data may come in at the application layer in the form of HTTP messaging (imagine as setpoint change) and leave the Stack at the Link layer in the form of an electronic signal from a BAS controller. An example of this is shown below.

 

Why the TCP/IP Stack matters to Building Automation Systems

Why does the TCP/IP model matter to building automation systems?

The Internet is quickly becoming the framework for many building automation systems. As the convergence between IT and BAS continues, the need for system integrators and system designers to be knowledgeable of IT related specifications and standards is fast approaching.

I am going to challenge the norm here and say that consulting engineers need to begin to research the IT capabilities of their clients in order to propose the best platform from a convergence centric perspective, rather then relying on guide specifications that simply state expectations of a BAS system.

The reason I make this statement is that as control systems evolve and the lines blur between IT and BAS, the customer must have a platform in place that can adjust to these standards. Long gone are the days when a simple field level protocol tied into a translation gateway would suffice. Now engineers must think of future capabilities:

  • How will the system handle IPV6?
  • Will it support 802.11ab?
  • Will my system support API's and webs services calls?

In order to help you understand these questions, you must first understand the fundamentals. Thus, understanding the TCP/IP Stack is vital to future engineers and integrators. Below I am going to briefly describe how each layer functions in a Building Automation System framework:

Link Layer:

This layer is the handles the physical messaging and media for data transfer. The basic media protocols and standards exist here. This is where you BACnet over MS/TP communications happen and begin to route up to your supervisory devices.

Internet Layer:

This layer includes the IP packet along with the IP addressing scheme. This is where the "addresses" of supervisory devices are established. This tells your building automation system which supervisory device to send the message to (e.g. BBMD)

Transport Layer:

This layer creates the TCP (reliable) connection and communicates data between sessions. (The transport layer creates the reliable connection you need when uploading or downloading BAS databases).

Application Layer:

This layer creates the connection between data and the application. Examples of this would be sending alarms out via SMTP (Simple Mail Transfer Protocol)

How does the TCP/IP Stack align with the OSI Model

TCP Protocols

In my early article on the OSI model, I hinted at the similarities between the OSI model and the TCP/IP Stack. Now that we have thoroughly discussed and analyzed the OSI and TCP/IP models, it is time for us to perform a side by side comparison in order to best understand the strengths and limitations of both models.

If you recall from my OSI model article, I mentioned that the OSI model provides a framework from which developers can create standardized computer applications. The TCP/IP stack, while aligned with the OSI model on some fronts, is clearly aligned  best with the host layers of the OSI model.

The reason for this is that the TCP/IP stack is built around supporting internet centric development. So from the perspective of a developer, the OSI Model will help standardize the development of the application throughout all steps of the communication process.  The TCP/IP stack will help ensure that the application being developed is aligned with the functionality of the internet.

This matters to the BAS user because the majority of newer control systems and third party integration are built around web based services. What this means is that when you go to pull data from another device on most modern systems, you are invoking web services calls against internet centric data.

Thus, it is important, if not VITAL, that the system integrator have a clear understanding of the capabilities and interoperabilities of the OSI and TCP/IP stack when designing his/her integration platform. I have been on job sites where systems were designed in such a way that they had no possibility of communicating (short of being replaced) because the system integrator did not understand the communication between the tiers of the OSI and TCP/IP models.

Conclusion

The TCP/IP Stack is critically important to communications and understanding how it works is one of the core skills any Building Automation professional should have.

What are the other core IT skills a BAS professional should have?

Share your thoughts in the comments below!



Phil Zito

Written by Phil Zito

Want to be a guest on the Podcast?

 

BE A GUEST