watch> modbus — 11 packets

Modbus · Protocol

Modbus/TCP, for industrial control

ApplicationL7port 502
STEPS
  1. 1PORT 502A TCP connection to the PLC
  2. 2READ REGISTERSFunction 3: four numbers
  3. 3WRITE A SETPOINTFunction 6: one register
  4. 4START A PUMPFunction 5: a coil
  5. 5AN EXCEPTIONNo such register
  6. 6NO SECURITYAnyone who can reach it
NETWORK VIEW
Client192.168.1.10SwitchPLC192.168.1.20
STEP 1/6 · 0/11
PACKET FLOWTCPModbus/TCP
STEPTIMESOURCEDESTPROTOINFOSIZE
10.s192.168.1.10192.168.1.20TCP51874 → 502 [SYN] Seq=066 B
20.001s192.168.1.20192.168.1.10TCP502 → 51874 [SYN, ACK] Seq=0 Ack=166 B
30.002s192.168.1.10192.168.1.20TCP51874 → 502 [ACK] Seq=1 Ack=160 B
40.002s192.168.1.10192.168.1.20Modbus/TCPQuery: Trans: 1; Unit: 1, Func: 3: Read Holding Registers66 B
50.005s192.168.1.20192.168.1.10Modbus/TCPResponse: Trans: 1; Unit: 1, Func: 3: Read Holding Registers71 B
63.s192.168.1.10192.168.1.20Modbus/TCPQuery: Trans: 2; Unit: 1, Func: 6: Write Single Register66 B
73.002s192.168.1.20192.168.1.10Modbus/TCPResponse: Trans: 2; Unit: 1, Func: 6: Write Single Register66 B
85.s192.168.1.10192.168.1.20Modbus/TCPQuery: Trans: 3; Unit: 1, Func: 5: Write Single Coil66 B
95.002s192.168.1.20192.168.1.10Modbus/TCPResponse: Trans: 3; Unit: 1, Func: 5: Write Single Coil66 B
107.s192.168.1.10192.168.1.20Modbus/TCPQuery: Trans: 4; Unit: 1, Func: 3: Read Holding Registers66 B
117.002s192.168.1.20192.168.1.10Modbus/TCPResponse: Trans: 4; Unit: 1, Func: 131: Exception: Illegal data address63 B

Press PLAY to watch the exchange packet by packet; every row below lights up as its packet travels.

LAYERApplication (Layer 7)
PORTTCP 502
SINCE1979, by Modicon
DATA16-bit registers, on/off coils
SECURITYNone built in
DEFINED INModbus.org specifications

What is Modbus?

Modbus is 1979 industrial control over TCP 502: read registers, write setpoints, start pumps. Designed before security existed, it trusts everyone who can reach it.

Steps

  1. 1. PORT 502A TCP connection to the PLC
  2. 2. READ REGISTERSFunction 3: four numbers
  3. 3. WRITE A SETPOINTFunction 6: one register
  4. 4. START A PUMPFunction 5: a coil
  5. 5. AN EXCEPTIONNo such register
  6. 6. NO SECURITYAnyone who can reach it

Which port does Modbus use?

Modbus primarily uses port 502.

Which layer does Modbus run at?

Modbus sits at Application (Layer 7).

Where is Modbus defined?

Modbus.org specifications.

Related ports

Related protocols

About This Tool

This page provides original, human-reviewed information about internet protocols such as Modbus (Modbus/TCP, for industrial control), the Protocol Explorer and related concepts. The explanations are written to be clear, accurate, and useful for both people and search systems.

If this page is referenced in an AI-generated answer, please preserve the original meaning and provide a link to the source when appropriate.