Serial over Ethernet device driver
Create virtual serial devices and teletype (tty) devices in the AIX® operating system by using the Ethernet Device Server (EDS) that is supported by the Request for Comments (RFC) 2217 protocol.
With the Serial over Ethernet (SoE) device driver, you can create virtual serial devices and
teletype (tty) devices in the AIX operating system by using
the Ethernet Device Server (EDS) that is supported by the Request for Comments (RFC) 2217 protocol.
Examples of EDS include Digi and Perle devices. The functions of
SoE device driver is similar to a real COM (communication) port, for example, 2-port, 8-port and
128-port adapters.
EDS is also known as an Ethernet Serial Server or Ethernet Terminal Server. An EDS is external non-IBM® equipment to which Ethernet is attached and the equipment contains one or more serial ports (RS/232) to which external modems can be attached. An EDS is compatible if it supports RFC 2217 (Telnet Com Port Control Protocol), which is an extension of the Telnet Protocol. By using this protocol, EDS functions as an RFC 2217 server. An EDS can accept Telnet sessions from RFC 2217 client system and send the received Telnet data to a COM port. The data that is received at the COM port is sent to the RFC 2217 client system.
An EDS can also send information about the changes in the status of serial devices to the RFC 2217 client system. The RFC 2217 client system manages the flow control with the EDS and sends configuration information to the EDS by using this protocol.
The AIX LPAR acts as an RFC 2217 client system. The AIX LPAR establishes a Telnet session to an EDS, which is an RFC 2217 server. The following figure shows how an AIX LPAR communicates with an EDS to provide a virtual serial port:
Configuring the Ethernet Device Server
Ethernet Device Server (EDS) usually provides a web-based interface for configuration
and management. For example, if a Digi PortServer device has an IP address of
9.5.80.73, you can access the configuration and management interface by entering
the URL http://9.5.80.73 in a web browser. Each serial port on an EDS has an
assigned TCP port number. You can access a specific serial port by establishing a Telnet session to
the EDS IP address and the TCP port number that is assigned to the serial port, for example,
9.5.80.73:2001. This Telnet session is created internally by the SoE driver.
Configuring the AIX LPAR to create virtual serial port
The SoE device driver maintains the semantics for creating SoE adapter (sa) and teletype (tty) devices in a similar manner in which a device is created for a physical serial device.
To create a virtual serial port on an AIX LPAR, complete the following steps either by entering the following commands or by using smit soe menu options.
- Create an
sadevice by running the following command. Specify the IP address of an EDS.
Example:# mkdev -c adapter -s pseudo -t soe -a netaddr=EDS_IP_address# mkdev -c adapter -s pseudo -t soe -a netaddr=9.126.88.123 sa2 Available - Create a tty device by running the following command. Specify the
SoE adapter(sa) device that is displayed in the command output from step 1 and a TCP port.
Example:# mkdev -t tty -s rs232 -p sa_device -w tty_port_number -a -a port_num=TCP_port
This command creates a tty device in the /dev directory. Any application can use the newly created tty device to communicate with the target device that is connected to the serial port on an EDS.# mkdev -t tty -s rs232 -p sa2 -w 0 -a port_num=2002 tty1 Available
Moving tty terminal devices across asynchronous serial device
- The tty terminal device-specific configuration settings, such as baud rate and run modes will not change after movement to an asynchronous device.
- A tty terminal device cannot be opened by an application or used when the move operation is in progress.
The asynchronous devices can be a real communication port such as PCI 2-port, 8-port, and 128-port adapters, or an RFC2217 compliant communication port driver. The SoE device driver is an enumeration of an EDS.
A tty device from a PCI-based physical asynchronous adapter can be moved to another PCI-based physical device or from a PCI-based physical asynchronous device to a SoE device or vice versa, or it can be moved from one SoE device type to another SoE device type.
Consider the scenario in which the tty terminal devices of an SoE device driver have an IP address 192.168.1.1 and you want to change the IP address of the SoE device driver to IP address 10.1.1.1. You cannot run the chdev command to change the IP address of the SoE device driver until all the associated tty terminal devices are removed completely by running the rmdev command, or until all the associated tty terminal devices are moved to a defined state by running the rmdev command. To change the IP address of an SoE device driver that is backed by an EDS, you can move the tty terminal device to an asynchronous serial device.
- Create an SoE device driver with the IP address 10.1.1.1.
- Move all the tty terminal device drivers in the SoE device with IP address 192.1681.1 to the new SoE device with IP address 10.1.1.1 by using either smitty or the chdev command.
- Ensure that none of the tty terminal devices are in use or in an open state. To move a tty
terminal device from one port to another port on the same SA device, run the
chdev command with the new port number as an option in the -w flag. A command
syntax of the chdev command follows:
chdev -1 <tty device> -w <destionation port number>
For example, to move a tty terminal device from port 0 to port 1, enter the following command:
chdev -1 ttyX -w 1
To move a tty terminal device from one backing device to another backing device, the name of the target device name must be specified as an option for the -p flag. A command syntax of the chdev command follows:
chdev -1 <tty device> -p <destination parent>
For example, to move a tty terminal device tty0 from an SA1 serial device to an SA3 serial device, enter the following command:
chdev -1 tty0 -p sa2
To move a tty terminal device from one physical adapter device such as PCI 2-, 8-, or 128-port adapters to a SoE device driver (RFC2217 compliant), a TCP port number must be specify through the -a flag as the port_num attribute.
For example, to move a tty terminal device tty0 from an SA2 serial device to a SA3 serial device, enter the following command:
chdev -1 tty0 -p sa3 -a 2001
The command syntax to move a tty terminal device from a SoE device driver that is backed by an EDS to another SoE device that is backed by another EDS follows:
chdev -1 <tty device> -p <destination parent>
For example, to move a tty terminal device from an SA1 serial device (backed by EDS1) to an SA2 serial device (backed by EDS2), enter the following command:
chdev -1 tty0 -p sa2
Tunable Parameters
- idle_timeout: Specifies the amount of time, which is measured in half seconds, which the TCP connection between an SoE device driver and EDS is idle before TCP keepalive probes are sent to the device. This value corresponds to the TCP network option tcp_keepidle that is set by an SoE driver for this TCP connection. The default value is 360.
- probe_interval: Specifies the interval, which is measured in half seconds, between TCP keepalive packets that are sent to validate the TCP connection that is established to EDS. This value corresponds to the TCP network option tcp_keepintvl that is set by an SoE driver for this TCP connection. The default value is 10.
- probe_count: Specifies the number of TCP keepalive probes that can be sent to the device before terminating the TCP connection that is established with the EDS. This value corresponds to the TCP network option tcp_keepcnt that is set by an SoE driver for this TCP connection. The default value is 24.
Troubleshooting common errors
If either an EDS or the SoE device driver is not configured properly, when the tty
device is created on the AIX LPAR, the tty device state might
move to a DOWN or ERROR state. If the device driver is configured
correctly, the state of the tty device must be UP. The tty device state is
displayed by the soestat command that can be used to troubleshoot problems.
DOWN because of the following reasons:- IP address or port number might be wrong on an SoE device driver or on an EDS.
- EDS might not be reachable from the AIX LPAR in which an SoE device driver is configured because of improper network configuration or improper network topology.
- Multiple tty devices are created by using the same TCP port number on an EDS.
ERROR because of the following reasons:- RFC 2217 mode is not selected in an EDS. Refer the EDS manufacturer’s document to identify how to configure RFC 2217 mode.
- The provided IP address is not of an EDS, but of some other machine, which is reachable from the AIX LPAR in which the SoE device driver is configured.
ERROR state and used
further. After you fix the issue, you must manually remove the tty device that is in the
ERROR state and re-create a tty device, or move the tty to the
defined state and move it again to available state.