Moxa KM-2430-T [27/52] Modbus tcp master and slave

Moxa KM-2430-T [27/52] Modbus tcp master and slave
ioPAC RTU Software RTU Communications
4-2
Internet Configuration
Modbus TCP Master and Slave
Modbus TCP is a very common communication protocol in industrial applications and the ioPAC RTU controller
has built-in Modbus TCP master and slave functions. For more detailed information, refer to the C/C++
Sample Code Programming Guide for ioPAC RTU Controllers.
DNS
The ioPAC RTU controllers can be set as a DNS client but not a DNS server. To set up the ioPAC as a DNS client,
edit three configuration files: /etc/hosts, /etc/resolv.conf, and /etc/nsswitch.conf.
/etc/hosts
This is the first file that the Linux system reads to resolve the host name and IP address.
/etc/resolv.conf
This is the most important file to edit when using DNS for the other programs. For example, before using
#ntpdate time.nist.goc to update the system time, add the DNS server address to the file. Ask your network
administrator which DNS server address you should use. The DNS server’s IP address is specified by the
nameserver command. For example, add the following line to /etc/resolv.conf if the DNS server’s IP
address is 168.95.1.1:
nameserver 168.95.1.1
root@Moxa:/etc# cat resolv.conf
#
# resolv.conf This file is the resolver configuration file
# See resolver(5).
#
#nameserver 192.168.1.16
nameserver 168.95.1.1
nameserver 140.115.1.31
nameserver 140.115.236.10
root@Moxa:/etc#
/etc/nsswitch.conf
This file defines the sequence to resolve the IP address by using /etc/hosts file or /etc/resolv.conf.
Telnet/FTP
In addition to supporting Telnet client-server and FTP client-server architectures, the ioPAC RTU controllers
also support SSH and SFTP client-server architectures. To enable or disable the Telnet/FTP server, first edit the
file /etc/inetd.conf.
Enabling the Telnet/FTP server
The following example shows the default content of the /etc/inetd.conf file. The Telnet/FTP server is enabled
by default:
discard dgram udp wait root /bin/discard
discard stream tcp nowait root /bin/discard
telnet stream tcp nowait root /bin/telnetd
ftp stream tcp nowait root /bin/ftpd -l
Disabling the Telnet/FTP server
Disable the daemon by typing # in front of the first character of the row to comment out the line.

Содержание

Скачать