# VTS: Virtual Terminal Server

The virtual terminal server is an application running inside the Viper that creates two socket endpoints. One socket endpoint is called "left" and the other one is called "right". Any data received from the left socket endpoint is sent over the right socket endpoint. Any data received from the right socket endpoint is sent over the left socket endpoint. The socket endpoints can operate in TCP server mode, TCP client mode or UDP mode.

### Enable Virtual Terminal Server N

Enable an instance of the terminal server. Up to 5 instances of the virtual terminal server can be configured and enabled. All 5 instances work independently.

### Mode

TCP server mode: Up to 128 TCP clients can connect to the TCP server.

TCP client mode: Try to connect to the TCP server identified by the remote address and remote port number.

UDP: Receive UDP packets on the local port number and send UDP packets to the remote address and remote port number.

### Local IP Address

The source IP address of outgoing packet is selected either automatically (by the IP stack) or we can fix it to the IP address associated to any of the interface.

### Limit to interface

When this option is selected AND a specific "Local IP Address" is selected, enforce the following rules:
Ingress packets: Destination IP address of packets must be equal to the IP address of the specified interface. If VLAN mode is enabled, the incoming packet must have a VLAN ID matching the interface's PVID.
Egress packets: The source IP address of outgoing packets will be set to the IP address of the specified interface. If the specified interface as a PVID, the VLAN ID set in the packet will be equal to the interface PVID.

### Local Port

The port used by to accept incoming packets.

### Remote IP Address

The IP address where packets are sent.

### Remote Port

IP packets are sent to the remote IP address for the application associated with this port number.

### TCP Keepalive

This parameter is expressed in minutes (minimum:0, maximum:1440).

The TCP Keepalive feature will transmit a short Keepalive message to test the TCP connection if there is no data transferred through an open TCP connection after X number of minutes. If the Keepalive message is received successfully by the remote endpoint the TCP connection will remain open. If the Keepalive message is not received successfully the Viper will close the existing TCP connection.

To disable this feature, set the TCP Keepalive to "0". With the TCP Keepalive feature disabled, the Viper will leave the TCP connection open indefinitely. An existing TCP connection will only close if the remote endpoint closes the connection or if the Viper is unable to successfully communicate with the remote endpoint during a data transmission.

### UDP Auto Response

When sending a UDP packet, do not use the remote port and remote IP address configured but rather send to the IP address and port number of the last UDP packet received. When this feature is enabled, drop any packet to transmit until at least one packet is received.

### UDP Local Copy

When the socket operates in UDP mode and the remote address is a multicast (or limited broadcast) address, the packet can be sent out without given a copy to internal applications. local copy enabled -> Send a copy of the packet to internal applications local copy disabled -> Do not send a copy of the packet to internal applications.

### Status

TCP server mode: "down", "listening (N tcp clients up)"

TCP client mode: "down", "connecting", "up"

UDP: "down", "up"