IPAlias Redundancy
IPAlias Redundancy
Section 1: IPAliasRedundancy
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Supported Firmware Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Function Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
IPAliasRedundancy
Introduction
This library provides functionality to manage an additional IP alias (a second IP address)
added to a specified interface on an SEL Real-Time Automation Controller (RTAC). The
function blocks in this library are designed to work in a redundancy scheme by using an IP
alias to be shared between two RTAC units. The two RTAC units will communicate with
each other via the logic in this library to decide when the IP alias should and should not be
active on the specified interface. The primary IP address for interfaces on the RTAC are
still configured via the web interface.
The two RTACs managing the IP alias communicate via an Ethernet or serial connection.
The library only supports the use of one or the other connection type (do not use both
simultaneously). If the RTACs communicate via Ethernet, it is recommended that a separate
interface than the managed interface is used for communications. (This is not an absolute
requirement—the two RTACs can communicate via the same interface that is being man-
aged—see Frequently Asked Questions on page 4 for details.) Information between the two
RTACs is updated at least once a second regardless of which connection is used.
The redundancy logic operates in two modes. The first is a primary-primary mode, in which
the detection of a failover condition causes the IP alias to activate on the inactive unit. In
this mode, the previously inactive unit will become the primary unit. If the previous primary
unit becomes available again, it will be the inactive unit and must wait for a condition to
occur in which the IP alias will become active. The second mode is a primary-backup mode,
in which the backup unit is designated on the function block. In this mode, if the primary
unit is no longer available, the backup unit will activate the IP alias. When the primary unit
is available again and reestablishes communication to the backup unit, the IP alias on the
backup unit will be deactivated and that IP alias will be returned to the primary unit.
The function blocks in this library offer a maintenance mode in which the unit will no longer
participate in the IP alias redundancy logic. If the IP alias is currently active on the unit
when maintenance mode is activated, it will be transferred to the other unit. Maintenance
mode persists through project settings changes and power cycles. This mode allows for
configuration changes or testing to be performed without affecting communication on the
other unit participating in the redundancy scheme.
The following conditions will cause the IP address to activate on the standby unit:
ä Managed Ethernet interface loss of link
ä Loss of communication between RTACs (note that a unit with a broken communica-
tions cable looks the same to the standby unit as a unit that has lost power)
ä Maintenance mode is activated
Can the IP alias logic work with different RTAC hardware variants
such as the SEL-3530 and SEL-3555?
Yes, the interface control logic will work between any two RTACs of any hardware combina-
tions. This includes any combination of RTAC hardware variants including the SEL-2240
Axion.
CommStatusTimeout value, make sure the CPU burden percentage is less than 80 percent.
The failover functionality for IP address redundancy is intended for SCADA and HMI
redundancy-type applications. This library is not intended for applications that require
high-accuracy IP alias failover in less than two seconds.
Special Considerations
ä Copying function blocks from this library causes unwanted behavior. This means the
following:
1. The assignment operator “:=” must not be used on any function block from
this library; consider assigning pointers to the objects instead.
// This is fine
someVariable := myIpAliasRedundancyObject.value;
// As is this
pt_myIpAliasRedundancyObject :=
ADR(myIpAliasRedundancyObject);
Function Blocks
This library provides two function blocks. Both function blocks provide the same redundancy
functionality. The InterfaceControlWithSerialCheck function block allows for the same
redundancy configuration to be applied to two RTACs, and the logic will identify which
IP address and behavior should be associated with which RTAC based upon the supplied
RTAC serial numbers.
Inputs
Name IEC 61131 Type Description
ControlledInterface enum_interface_ID Interface that will be managed with Con-
trolledIPAlias
ControlledIPAlias STRING(18) IP address and CIDR value that will be man-
aged on the ControlledInterface pin
Backup BOOL If TRUE, the unit will operate in backup mode.
If FALSE, the unit will operate in primary
mode.
RemoteRtacIP STRING(15) IP address of remote RTAC
RemoteRtacPort UINT Port number of the other RTAC. This setting
needs to match the LocalAPPort setting on the
remote RTAC
LocalAPPort UINT Port number for RTAC-to-RTAC communica-
tions on the unit. This setting needs to match
the listening access point that is configured.
LocalClientConnectPort UINT Port number for the RTAC to use to create a
TCP connection to the remote RTAC (29459
by default)
LocalSerialPort UINT The communications port that will be used to
communicate with the other RTAC
CommStatusTimeout TIME The amount of time for which the RTAC will
activate the IP alias when RTAC-to-RTAC com-
munications is lost. This setting has a range of
500 ms to 1 hour.
EnterMaintenanceMode BOOL This pin on a rising edge will activate main-
tenance mode. When the unit is in mainte-
nance mode, it will not participate in redun-
dancy logic.
Inputs
Name IEC 61131 Type Description
ExitMaintenanceMode BOOL This pin on a rising edge will remove the unit
from maintenance mode and allow the unit to
participate in managing the IP alias
InterfaceLinkStatus SPS Connect to the system tags Ethernet link status,
which shows the current value of the managed
interface
Outputs
Name IEC 61131 Type Description
IPAliasActive BOOL This pin shows if the IP address that is as-
signed on “ControlledIPAlias” is active on
the RTAC unit
MaintenanceMode BOOL This pin shows if the unit is currently in main-
tenance mode. If the unit is in maintenance
mode, the RTAC will not participate in re-
dundancy logic. Maintenance mode persists
through power cycle and settings changes on
the unit. Once the unit is set to exit main-
tenance mode it will participate in the re-
dundancy scheme of the “ControlledInter-
faceIP”.
RtacEthernetCommsGood BOOL If both RTAC connections are communicat-
ing via the Ethernet connection, this pin will
be set to TRUE
RtacSerialCommsGood BOOL If both RTAC connections are communicat-
ing via the serial connection, this pin will be
set to TRUE
InvalidInputPin STRING Lists an incorrectly configured input pin
Inputs
Name IEC 61131 Type Description
ControlledInterface enum_interface_ID The interface that will be managed with the
ControlledIPAlias
ControlledIPAlias String(18) The IP address and CIDR value that will be
managed by the Controlled_Interface pin
SerialNumber String(80) The serial number of the unit on which redun-
dancy logic will operate
Backup BOOL If this is true, the unit will operate in backup
mode. If false, the unit will operate in primary
mode.
RemoteRtacIP STRING(15) IP address of the remote RTAC
RemoteRtacPort UINT Port number of the remote RTAC. This setting
must match the LocalAPPort setting on the
remote RTAC.
LocalAPPort UINT Port number for RTAC-to-RTAC communica-
tion on the unit. This setting must match the
listening access point
LocalClientConnectPort UINT Port number for the RTAC to use to create a
TCP connection to the remote RTAC (23459
by default)
LocalSerialPort UINT Communications port that will be used to com-
municate with the other RTAC
CommStatusTimeout TIME Time without remote RTAC communications
or link status before activating IP alias. Range
of 500 ms to 1 hour. Default is 5 seconds.
EnterMaintenanceMode BOOL A rising edge will activate maintenance mode
ExitMaintenanceMode BOOL A rising edge will remove the unit from main-
tenance mode
InterfaceLinkStatus SPS Connect to the system tags Ethernet link status,
which shows the current value of the managed
interface
Outputs
Name IEC 61131 Type Description
IPAliasActive BOOL This pin shows if the IP address that is as-
signed on “ControlledIPAlias” is active on
the RTAC unit
MaintenanceMode BOOL This pin shows if the unit is currently in main-
tenance mode. If the unit is in maintenance
mode, the RTAC will not participate in re-
dundancy logic. Maintenance mode persists
through power cycle and settings change on
the unit. Once the unit is set to exit main-
tenance mode, it will participate in the re-
dundancy scheme of the “ControlledInter-
faceIP”.
RtacEthernetCommsGood BOOL If both RTAC connections are communicat-
ing via the Ethernet connection, this pin will
be set to TRUE
Outputs
Name IEC 61131 Type Description
RtacSerialCommsGood BOOL If both RTAC connections are communicat-
ing via the serial connection, this pin will be
set to TRUE
SerialNumberMismatch BOOL If the assigned and actual serial numbers do
not match, this pin will be TRUE. Redun-
dancy logic will only function if this value
is FALSE .
ProjectIDMismatch BOOL If the project IDs between the two RTAC
units do not match, this output will be TRUE.
The value of this pin is retained through
power cycles and will only compare if Eth-
ernet or serial communication is active be-
tween the two RTAC units
InvalidInputPin STRING Lists an incorrectly configured input pin
Examples
These examples demonstrate the capabilities of this library. Do not mistake them as sugges-
tions or recommendations from SEL.
Implement the best practices of your organization when using these libraries. As the user of
this library, you are responsible for ensuring correct implementation and verifying that the
project using these libraries performs as expected.
Assumptions
This example assumes the following:
ä The IP alias and its associated subnet do not overlap with any other configured subnets
on any Ethernet interface or other IP aliases.
ä The client will communicate with the RTAC on Ethernet Port 2.
ä Both RTACs will communicate with each other on Ethernet Port 1.
ä Both RTACs have IP addresses in the same subnet on Ethernet Port 1.
ä Ethernet Port 1 on each RTAC will be connected directly to the other RTAC or through
a switch.
ä Each RTAC configuration includes an Ethernet Listening, Raw TCP access point that
matches the LocalAPPort setting on the interface control function block.
ä Each RTAC collects data from the other RTAC through serial ports or an Ethernet
port.
ä Any supported server protocol can be used to send data to the client via the IP alias.
ä If a serial connection is used, an RS-232 compatible cable that matches the wiring
diagram according to each connected serial port (as listed in the specific RTAC
hardware instruction manual) is used.
Solution
RTAC Project 1
The user creates an Ethernet listening access point as shown in Figure 1.
Port1Control(
ControlledInterface := Eth_02,
ControlledIPAlias := '10.55.55.55/24',
Backup := FALSE,
RemoteRtacIP := '192.168.25.8',
RemoteRTACPort := 3000,
LocalAPPort := 7500,
LocalClientConnectPort := 8788,
LocalSerialPort := 1,
CommStatusTimeout := T#5S,
InterfaceLinkStatus := SystemTags.Eth_02_Link
);
Figure 2 presents the same logic as Code Snippet 1 shown in CFC rather than an ST program.
RTAC Project 2
The user creates an Ethernet listening access point as shown in Figure 3.
Port1Control(
ControlledInterface := Eth_02,
ControlledIPAlias := '10.55.55.55/24',
Backup := FALSE,
RemoteRtacIP := '192.168.25.7',
RemoteRTACPort := 7500,
LocalAPPort := 3000,
LocalClientConnectPort := 8788,
LocalSerialPort := 1,
CommStatusTimeout := T#5S,
InterfaceLinkStatus := SystemTags.Eth_02_Link
);
Figure 4 presents the same logic as Code Snippet 2 shown in CFC rather than an ST program.
Assumptions
This example assumes the following:
ä The IP alias and its associated subnet mask do not overlap with any other configured
subnets on any Ethernet interface or other IP aliases.
ä The client will communicate with the RTAC on Ethernet Port 2.
ä Both RTACs will communicate with each other on Ethernet Port 1.
ä Both RTACs have IP addresses in the same subnet on Ethernet Port 1.
ä Ethernet port 1 on each RTAC will be connected directly to the other RTAC or through
a switch.
ä Each RTAC configuration includes an Ethernet Listening of Raw TCP access point
that matches the LocalAPPort setting on the interface control function block.
ä Each RTAC collects data from the other RTAC through serial ports or an Ethernet
port.
ä Any supported server protocol can be used to send data to the client via the IP alias.
ä If a serial connection is used, then an RS-232 compatible cable that matches the
wiring diagram according to each connected serial port (as listed in the specific RTAC
hardware instruction manual) is used.
Solution
In each RTAC configuration, create one access point of type Ethernet incoming listening
that matches the settings of the LocalAPPort setting on each function block.
PortControlRTAC2(
ControlledInterface := Eth_02,
ControlledIPAlias := '10.55.55.55/24',
SerialNumber := '1122680283',
Backup := FALSE,
RemoteRtacIP := '192.168.25.7',
RemoteRTACPort := 7500,
LocalAPPort := 3000,
LocalClientConnectPort := 8788,
LocalSerialPort := 1,
CommStatusTimeout := T#5S,
InterfaceLinkStatus := SystemTags.Eth_02_Link
);
Figure 7 presents the same logic as Code Snippet 3 shown in CFC rather than an ST program.
Release Notes