Modicon Communication Bus (MODBUS)

MODBUS Overview

Modicon Communication Bus (MODBUS) is an application layer protocol for client-server communication between a switch (server) and a device in the network running MODBUS client software (client). You can use MODBUS over a serial line to connect a computer to a remote terminal unit (RTU) in supervisory control and data acquisition (SCADA) systems.

MODBUS also runs on Ethernet TCP/IP networks. Use MODBUS TCP over an Ethernet network when connecting the switch to devices such as intelligent electronic devices (IEDs), distributed controllers, substation routers, IP phones, Wireless Access Points, and other network devices such as redundant substation switches.

The client can be an IED or a human machine interface (HMI) application that remotely configures and manages devices running MODBUS TCP. The switch functions as the server.

The switch encapsulates a request or response message in a MODBUS TCP application data unit (ADU). A client sends a message to a TCP port on the switch.

Configuring MODBUS

The MODBUS TCP server listens for MODBUS client requests on TCP port 502 by default. Port 502 is enabled when MODBUS server is started unless you configure a different port for MODBUS communications. The MODBUS server is disabled by default.

To configure MODBUS:

Before you begin

If a firewall or other security services are enabled, the switch TCP port might be blocked, and the switch and the client cannot communicate. If a firewall and other security services are disabled, a denial-of-service attack might occur on the switch. To add security when using MODBUS TCP, configure an ACL to permit traffic from specific clients or configure QoS to rate-limit traffic.

Procedure


Step 1

Enter global configuration mode:

configure terminal

Step 2

Enable MODBUS TCP on the switch:

scada modbus tcp server

To disable MODBUS on the switch and return to the default settings, enter the no scada modbus tcp server global configuration command.

The system displays a message to warn you that starting the MODBUS TCP server is a security risk:

WARNING: Starting Modbus TCP server is a security risk. Please understand the security issues involved before proceeding further. Do you still want to start the server? [yes/no]:

Step 3

Enter yes to confirm that you understand the security issues and to proceed with starting the server.

Step 4

(Optional) Set the TCP port to which clients send messages:

scada modbus tcp server port tcp-port-number

The range for tcp-port-number is 1 to 65535. The default is 502.

Step 5

(Optional) Set the number of simultaneous connection requests sent to the switch:

scada modbus tcp server connection connection-requests

The range for connection-requests is 1 to 5. The default is 1.

Step 6

Return to privileged EXEC mode:

end


Example

Switch# configure terminal
Switch(config)# scada modbus tcp server
WARNING: Starting Modbus TCP server is a security risk. Please understand the security issues involved 
before proceeding further. Do you still want to start the server? [yes/no]: y
Switch(config)# end

Displaying MODBUS Information

Use the commands listed below to display information for MODBUS TCP.

Command

Purpose

show scada modbus tcp server

Displays the server information and statistics

show scada modbus tcp server connections

Shows information and statistics for each client connection

clear scada modbus tcp server statistics

Clears all the statistics for the Modbus server, including statistics for each client connection

Switch# show scada modbus tcp server
Summary: enabled, running, process id 142
Conn Stats: listening on port 801, 4 max simultaneous connections
    0 current client connections
    0 total accepted connections, 0 accept connection errors
    0 closed connections, 0 close connection errors
Send Stats: 0 tcp msgs sent, 0 tcp bytes sent, 0 tcp errors
    0 responses sent, 0 exceptions sent, 0 send errors
Recv Stats: 0 tcp msgs received, 0 tcp bytes received, 0 tcp errors
    0 requests received, 0 receive errors