Redundant network connections
In order to achieve a better fault tolerance WinCC OA Managers can connect to other WinCC OA Managers running on different computers via redundant network connections (this means connecting through two network connections (= IP connection)).
Redundant network connections can be used for remote user interfaces, for redundant systems (see also Redundancy, basics), between distributed systems (Connections of the Dist Manager - see also Distributed systems, basics) or for any manager running on a different computer as its "server" (e.g. drivers or API Managers running on a separate computer).
The used network connections have to be defined in the hosts
file. Under Windows the hosts
file is located in the directory
<SystemRoot>/system32/drivers/etc/
, under Linux in the directory /etc/
. Basically you have to notice, that the names of the redundant network
connections in the hosts
file must not be the same as the hostname. On that score aliases for the IP addresses are defined in the hosts
file.
Note that:
- the entry for the localhost, 127.0.0.1 localhost, must be defined in the host file
- all computers of a distributed/redundant system must have the same IPv6 state (active or inactive)- A mixed mode is not supported
The following example will show you how the configuration has to be done, in order to guarantee a proper functionality of redundant network connections during operation.
If the hosts file contains a configuration error, an error message is shown in the Logviewer (e.g. WCCOActrl (1), 2005.08.25 13:37:45.775, SYS, WARNING, 0, , Possible mismatch in host configuration: host1=eitst010xp host2=eitst0172k-1).
Settings in the hosts file
Configuration of a redundant system, which is equipped with a redundant network connection between both servers (Redu host 1 = server1, Redu host 2 = server2). Both computers have two network controllers (main controller and secondary route).
IP addresses for server1: 1.1.1.11 (Main controller) and 1.1.2.11 (Secondary route)
IP addresses for server2: 1.1.1.12 (Main controller) and 1.1.2.12 (Secondary route)
The hosts
file has to look like the following on both computers:
1.1.1.11 server1 server1-1
1.1.2.11 server1-2
1.1.1.12 server2 server2-1
1.1.2.12 server2-2
When defining config entries (e.g. with redundancy) the first connection has to be the connection, which has the same IP address as the computer. According to the
hosts
file shown above, the "data" entry in the config file for a redundant project looks as follows (on both computers):
data = "server1-1,server1-2$server2-1,server2-2"
The correct host name has to be specified next to the IP address of the main network controller. This guarantees that CTRL functions like dataHost(), eventHost(), ... return always the correct host name. The aliases for the IP connection stand next to the host name.
The entries with <Host name>-1 and -2 are aliases for the redundant network connections. The aliases must not be the same as the host name. You can also use other alias names for the connections than the <Host name>-1 or <Host name>-2.! Note however, that the options -1 and -2 must be added to the alias name used.
EXAMPLE:
Hosts file entries:
192.168.153.135 VRA-TST-W-323 reduServer-1
192.168.120.156 VRA-TST-W-323-2 reduServer-2
192.168.153.108 VRA-TST-W-322 reduServer2-1
192.168.120.131 VRA-TST-W-322-2 reduServer2-2
Config file of the redu project looks as follows:
data = "reduServer-1,reduServer-2$ reduServer2-1,reduServer2-2"
event = "reduServer-1,reduServer-2$ reduServer2-1,reduServer2-2"
With a "PING" command you can check the configuration:
All defined names in the hosts file have to return the correct IP address (ping <Name>). For example "ping server1-1" must return "1.1.1.11" ("ping server1" also has to return "1.1.1.11"), "ping server2-2" must return "1.1.2.12".
A "PING" on the IP addresses must return the correct names, which are defined first in the file (ping -a <IP address>). For example "ping -a 1.1.1.11" must return "server1" (and not server1-1), "ping -a 1.1.2.12" must return "server2-2".
The redundant network connection is configured in the config file. Each entry that specifies a host name (or IP address) to connect to (e.g. event, data or distPeer) has to be changed so that the entry contains the names of both IP connections of the remote host separated by a ",".
For example, if the server (called "server") has two network controllers with IP connections called "server-1" and "server-2" the config entry looks like following:
event = "server-1,server-2"
Example 1
Remote UI to a single system (Host name "server", IP connections called "server-1" and "server-2")
The config file of the remote UI must contain the following entries:
[general]
data = "server-1,server-2"
event = "server-1,server-2"
Example 2
Distributed system ("System1" is a single system and "System2" is a redundant system). System1 establishes a connection to System2 via a redundant network connection (Host names of System2: System2_host1 and System2_host2; IP connections of System2: Sys2_host1-1, Sys2_host1-2, Sys2_host2-1, Sys2_host2-2).
The config file of System1, which connects to System2, must contain the following entries:
[general]
distributed = 1
[dist]
distPeer = "Sys2_host1-1,Sys2_host1-2$Sys2_host2-1,Sys2_host2-2" 2 #Connect to both hosts of the System2 via redundant network connection
Note that if you define a server port you have to define one port for all connections e.g. host1,host2:port. If you do not define a port the default port is used.
Furthermore the user must have a HOME directory on the local computer and no HARD mounts are allowed!
Test of Redundant Network Connections
When testing the redundant network connections, please take the following two points into consideration:
-
Each network connection must be tested separately.
-
Make sure if one the network connections is deactivated, each address for this connection (host1-1 <---> host 2-1 or host 1-2 <---> host 2-2) is not accessible.
Message Processing and redundant Network Connections in a distributed system
If you configure redundant network connections in a distributed system, the messages are sent using two connections. When the system receives a message, it accepts the message immediately. If the system then receives the identical message through the second connection, it discards the message. The system does not wait until it receives the message through two network connections.