Skip to content

1.1 The OSI Model

Before the OSI model, every vendor built proprietary networking stacks. An IBM mainframe had no way to communicate with a DEC minicomputer. A Siemens PLC had no way to share a cable with a Honeywell controller. Each vendor owned the full stack from the physical wire to the application.

The International Organization for Standardization (ISO) published the Open Systems Interconnection model (OSI model) in 1984 as ISO/IEC 7498-1. The model divides network communication into 7 layers. Each layer has 1 responsibility. Each layer communicates only with the layers directly above and below. Any vendor implementing a layer correctly interoperates with another vendor’s implementation of the adjacent layers.

No real protocol implements OSI exactly. TCP/IP collapses layers 5, 6, and 7 into 1. PROFINET RT skips layers 3 and 4 entirely. The model’s value lies in providing a shared language for describing and troubleshooting network behavior. To use that language, learn what each layer does.

LayerNamePDUKey ProtocolsDevice
7ApplicationDataHTTP, SNMP, Modbus TCP, OPC UA
6PresentationDataTLS, encoding
5SessionDataRPC, NetBIOS
4TransportSegment / DatagramTCP, UDP
3NetworkPacketIPv4, IPv6, ICMPRouter
2Data LinkFrameEthernet, 802.1QSwitch
1PhysicalBitNIC, cable, SFP

Key terms:

  • PDU (Protocol Data Unit) — the name for the unit of data at each layer: bit (L1), frame (L2), packet (L3), segment or datagram (L4), data (L5 to L7)
  • Encapsulation — each layer wraps the data from the layer above with a header before passing the data down
  • Decapsulation — each layer strips the header when receiving data from the layer below

Knowing the layers is only half the picture. The other half involves understanding how data moves through the layers.

Data flows down the stack on the sender and up the stack on the receiver. Each layer adds a header when sending and strips the header when receiving.

The encapsulation model explains a key design decision in industrial protocols: why some protocols bypass the upper layers entirely.

Why Industrial Protocols Bypass the Upper Layers

Section titled “Why Industrial Protocols Bypass the Upper Layers”

PROFINET RT, MRP, and IEC 61850 GOOSE operate at Layer 2. These protocols use EtherType values directly and skip IP and TCP entirely.

The reason is latency. TCP retransmission introduces variable and unbounded delay. A retransmitted segment arrives up to 200 ms late. For a PLC with a 4 ms cycle time, that delay is catastrophic. By staying at Layer 2, these protocols eliminate the retransmission mechanism and deliver frames with deterministic, sub-millisecond latency.

The trade-off: Layer 2 frames have no routing capability. PROFINET RT traffic stays within a single VLAN or Ethernet segment. This constraint shapes every industrial network design decision covered in the rest of this book.

The OSI model serves best as a diagnostic tool, rather than a design guide.

When a device is unreachable, start at Layer 1 and work up. Each layer depends on the layer below. A Layer 3 routing issue is impossible when the Layer 1 link is down.

The flowchart above shows the mental model. The script below automates the process. Run the script against any OT device to get a Layer 1 to 4 status report in seconds, without logging into each switch manually.

import subprocess, socket
def check_ping(host: str) -> tuple[bool, str]:
r = subprocess.run(["ping", "-c", "2", "-W", "1", host],
capture_output=True, text=True)
if r.returncode == 0:
for line in r.stdout.splitlines():
if "rtt" in line or "round-trip" in line:
return True, line.strip()
return False, "no response"
def check_port(host: str, port: int) -> tuple[bool, str]:
try:
with socket.create_connection((host, port), timeout=2):
return True, f"port {port} open"
except OSError as e:
return False, str(e)
devices = [
("192.168.10.1", [22, 80]),
("192.168.10.11", [502]),
("192.168.10.12", [502, 44818]),
]
for host, ports in devices:
ping_ok, ping_detail = check_ping(host)
print(f"{host:20s} {'L3 OK' if ping_ok else 'L3 FAIL'} {ping_detail}")
for port in ports:
ok, detail = check_port(host, port)
print(f" {'L4 OK' if ok else 'L4 FAIL'} {detail}")

A device that has an unsuccessful L3 check but a working link has an IP configuration or routing issue. A device that passes L3 but has an unsuccessful L4 check on port 502 has a Modbus service that is inactive or a firewall blocking the port.

OSI is a troubleshooting language

Use the model to communicate precisely. “The issue is at Layer 2” means the link is up but frames are not forwarding correctly. Start at Layer 1 and work up.

PROFINET RT and MRP live at Layer 2

These protocols bypass IP for determinism. These protocols have no routing capability. Keep all devices in the same VLAN.

The OSI model gives you the vocabulary. The next section covers Ethernet — the Layer 1 and 2 technology that every industrial network runs on. Understanding the Ethernet frame format and MAC addressing is the foundation for VLANs, MRP, and PROFINET.

  • ISO/IEC 7498-1:1994 — Information technology — Open Systems Interconnection — Basic Reference Model
  • Tanenbaum, A. S., and Wetherall, D. J. (2011). Computer Networks (5th ed.). Pearson.
  • RFC 1122 — Requirements for Internet Hosts — Communication Layers (IETF, 1989)