For failover, there are multiple packet forwarders on different web servers in the cloud. There are Primary and Standby PCAs in the cloud but on separate host servers. The PCAs should be on separate servers because if both PCAs were on the same server the failover won't work.
The packet forwarders forward their traffic to the Primary PCA via a port replicator or port mirror component ensuring that the traffic also gets forwarded to the Standby PCA. The Standby PCA has a heart beat mechanism with the Primary along with heartbeats to the packet forwarders. If the Primary PCA goes down, the Standby PCA tells the packet forwarders (through the heartbeat) to forward the packets to the Standby PCA directly.
For failover, you must have two PCAs, one SPR (Software Packet Replicator), and at least two packet forwarders. The SPR switches the packet forwarders to a different PCA during failover.
These are the variable defintions:
- <build> is the build version number
- <release> is the release version number
- <distro> is the linux distribution such as RHEL6 or SUSE11
- <arch> is the architecture such as i386, i686, i586
- Install the PCAs:
- Log in to the PCA server by using root account.
- Install the PCA by using one of these commands:
rpm -ivh tealeaf-pca-<build>-<release>.<distro>.<arch>.rpm yum install tealeaf-pca-<build>-<release>.<distro>.<arch>.rpm
- Install the packet forwarders.
- Log in to the packet forwarder by using root account.
- Install the packet forwarder by using one of these commands:
rpm -ivh tealeaf-pktfwdr-<build>-<release>.<distro>.<arch>.rpm yum install tealeaf-pktfwdr-<build>-<release>.<distro>.<arch>.rpm
- Install the SPR:
- Log in to the packet forwarder by using root account.
- Install the SPR by using one of these commands:
rpm -ivh tealeaf-spr-<build>-<release>.<distro>.<arch>.rpm yum install tealeaf-spr-<build>-<release>.<distro>.<arch>.rpm
Configuring the Packet Forwarder for failover on cloud
You configure the packet forwarder primary interfaces and listening ports.
- Using a text editor, open the /etc/fwdr-conf.xml file.
- Edit the
PrimaryInterface
tag to add the virtual NIC device name that the packet forwarder uses to capture the web server's traffic. In most installations, the NIC device name iseth0
. - Locate the
ListenTos
tag and add any additional ports that you want to capture traffic from the configuration file. Ports 80 and 443 are listed by default. - Locate the
Delivery
tag and edit theAddress
andPort
tags with the IP address and port number of the virtual machine that is hosting the SPR.Note: Each packet forwarder and listener pair uses one port. The default port number is 1888. When multiple pairs are used, the port address defines the first port number that is used to define a block of port numbers. For example, if you are capturing traffic from five web servers, then five packet forwarder and packet listener pairs are used to capture the traffic. In this scenario, ports 1888 - 1892 are used.
- Edit the
Port
tag to define the port number for the network connection. Each packet forwarder requires a unique port number to identify a unique network connection to the SPR VM instance. The port numbers must be assigned in sequential order. This is required by the SPR's socket receiver when configuring it for the packet forwarders' network connections. If you decide to start with port number 1888 for the first packet forwarder, then defining five of them would be ports 1888 - 1892 explicitly. - Edit the
MaxRotatePeers
tag to define the maximum number of web server instances that are dynamically provisioned. The default value is 1. If you are capturing traffic from five web servers, then set this value to 5.Note: If you are statically assigning a fixed number of web server instances with associated packet forwarders, then the
MaxRotatePeers
would remain set to the default value of 1. Each packet forwarder would need to configured with a unique Port number to identify a unique network connection to the SPR VM instance. The port numbers must be assigned in sequential order. This is required by the SPR's socket receiver when configuring it for the packet forwarders' network connections. If you decide to start with port number 1888 for the first packet forwarder, then defining five of them should be 1888 - 1892 explicitly. - Save you changes to the /etc/fwdr-conf.xml file.
Configuring the PCAs for failover on cloud.
You configure the delivery and pipeline settings for the PCA in failover.
- Log on to the PCA web console.
- Go to the Delivery tab and edit the delivery settings for your environment.
- Go to the Pipeline tab and edit the Pipeline Instances setting to configure the number of pipeline instances for your configuration.
- Select Save Changes to save your updated configuration settings.
DO NOT restart the PCA server.
- Edit the PCA configuration file by opening /usr/local/ctccap/etc/ctcconf.xml in a text editor.
- Go to the Capture tag settings and edit these settings:
- Set
ListenerSocketEnabled
totrue
. - Set
TransparentLoadBalancingEnabled
tofalse
. - Set
SslSessionInfoOnMemcachedServer
tofalse
. If the PCA Server is configured to decrypt SSL traffic from the packet forwarders, set this tofalse
.
- Set
- Go to the Listener tag settings and edit these settings:
- Set
BasePort
to match the port number that is defined in the Delivery settings of the packet forwarder configuration file. The packet forwarder configuration file can be accessed by opening /etc/fwdr-conf.xml on a web server instance. - Set
Instances
to equal the number of packet forwarders that the PCA connects to.
- Set
- Save your changes to /usr/local/ctccap/etc/ctc-conf.xml.
- Run
tealeaf restart
to restart the PCA services.
Configuring the SPR for Failover on cloud
You configure the SPR to identify the primary and secondary PCAs.
- Log in to the SPR server.
- Under Delivery -> Peers, there are two peers. The first is the primary PCA and the second is the secondary PCA.
- Configure the Primary Peer's NIC tag with an available NIC (eth0, eth1, etc.).
- Configure the Primary Peer's address with the IP address of the Primary PCA.
- Configure the Secondary Peer's NIC tag with an available NIC (eth0, eth1, etc.).
- Configure the Secondary Peer's address with the IP address of the Secondary PCA.
- Optional: If you are using a port other than 1888 or if you are using more than one port, edit the spr-instances file and change 1888 to the port that you are using. If you are using more than one port, enter each port number on a new line.
Starting the Services for PCA and Packet Forwarder failover on cloud
After you install and configure the PCAs, packet forwarders, and SPR, you start the services on the PCA server.
- On the PCA server, make sure that the PCA is running by entering
tealeaf ps
. If the PCA is not running, start the PCA by enteringtealeaf start
. - Verify that the PCA is listening to the correct ports by entering
netstat -an | grep <port number>.
- On the SPR server, if you haven’t already done so, start the SPR instance for each Packet Forwarder or Port number with the command
service spr start
. - On the packet forwarder server, verify that the Packet Forwarder is running entering
service pktfwdr status
. IF the packet forwarder is not running, enterservice pktfwdr start
.