ADC

Deploy a single NIC VPX high-availability pair with private IP address on Google Cloud Platform

You can deploy a single NIC VPX high-availability pair on GCP using private IP address. The client IP (VIP) address must be configured as alias IP address on the primary node. Upon failover, the Client IP address is moved to the secondary node, for the traffic to resume. The Subnet IP (SNIPs) addresses for each node must also be configured as an alias IP range.

For more information on high availability, see High Availability.

Before you start

  • Read the Limitation, Hardware requirements, Points to note mentioned in Deploy a NetScaler VPX instance on Google Cloud Platform. This information applies to high availability deployments also.
  • Enable Cloud Resource Manager API for your GCP project.
  • Allow full access to all Cloud APIs while creating the instances. Full access cloud API

  • Ensure that your GCP service account has the following IAM permissions:

     REQUIRED_INSTANCE_IAM_PERMS = [
     "compute.forwardingRules.list",
     "compute.forwardingRules.setTarget",
     "compute.instances.setMetadata",
     "compute.instances.get",
     "compute.instances.list",
     "compute.instances.updateNetworkInterface",
     "compute.targetInstances.list",
     "compute.targetInstances.use",
     "compute.targetInstances.create",
     "compute.zones.list",
     "compute.zoneOperations.get",
     ]
     <!--NeedCopy-->
    
  • If your VMs do not have internet access, you must enable Private Google Access on the VPC subnet. Private google access

  • If you have configured GCP forwarding rules on the primary node, read the limitations and requirements mentioned in Forwarding rules support for VPX high-availability pair on GCP to update them to new primary on failover.

How to deploy a VPX high availability pair on Google Cloud Platform

Here is a summary of the steps for deploying HA pair with single NIC:

  1. Create one VPC network.
  2. Create two VPX instances (primary and secondary nodes) in the same region. They can be in the same zone or different zones. For example Asia east-1a and Asia east-Ib.
  3. Configure HA settings on both instances by using the NetScaler GUI or ADC CLI commands.

Step 1. Create one VPC network

To create a VPC network, perform these steps:

  1. Log on to the Google console > Networking > VPC network > Create VPC Network.
  2. Complete the required fields, and click Create.

For more information, see the Create VPC Networks section in Deploy a NetScaler VPX instance on Google Cloud Platform.

Step 2. Create two VPX instances

Create two VPX instances by following the step 1 to step 3 given in Scenario: Deploy a single-NIC, standalone VPX instance.

Important:

Assign a client alias IP address only to the primary node and server alias IP addresses to primary and secondary nodes. Do not use the internal IP address of the VPX instance to configure the VIP or SNIP.

To create client and server alias IP addresses, perform these steps on the primary node:

  1. Navigate to the VM instance and click Edit.

  2. In the Network Interface window, edit the client (NIC0) interface.

  3. In the Alias IP range field, enter the client alias IP address.

  4. Click Add IP Range and enter the server alias IP address.

Single NIC client alias IP address

To create a server alias IP address, perform these steps on the secondary node:

  1. Navigate to the VM instance and click Edit.
  2. In the Network Interface window, edit the client (NIC0) interface.
  3. In the Alias IP range field, enter the server alias IP address.

Single NIC secondary SNIP

After the failover, when the old primary becomes the new secondary, the client alias IP address is moved from the old primary and is attached to the new primary.

After you have configured the VPX instances, you can configure the Virtual (VIP) and Subnet IP (SNIP) addresses. For more information, see Configuring NetScaler-owned IP addresses.

Step 3. Configure high availability

After you’ve created the instances on Google Cloud Platform, you can configure high availability by using the NetScaler GUI or CLI.

Configure high availability by using the GUI

Step 1. Set up high availability in INC Enabled mode on both the nodes.

On the primary node, perform the following steps:

  1. Log on to the instance with user name nsroot and instance ID of the node from GCP console as the password.
  2. Navigate to Configuration > System > High Availability > Nodes, and click Add.
  3. In the Remote Node IP address field, enter the private IP address of the management NIC of the secondary node.
  4. Select the Turn on INC (Independent Network Configuration) mode on self node check box.
  5. Click Create.

On the secondary node, perform the following steps:

  1. Log on to the instance with user name nsroot and instance ID of the node from GCP console as the password.
  2. Navigate to Configuration > System > High Availability > Nodes, and click Add.
  3. In the Remote Node IP address field, enter the private IP address of the management NIC of the primary node.
  4. Select the Turn on INC (Independent Network Configuration) mode on self node check box.
  5. Click Create.

Before you proceed further, ensure that the Synchronization state of the secondary node is shown as SUCCESS in the Nodes page.

Secondary-node synchronization state

Note:

After the secondary node is synchronized with the primary node, the secondary node has the same log-on credentials as the primary node.

Step 2. Add Virtual IP address and Subnet IP address on both the nodes.

On the primary node, perform the following steps:

  1. Navigate to System > Network > IPs > IPv4s, and click Add.
  2. To create a client alias IP (VIP) address:
    1. Enter the client alias IP address and netmask configured for the VPC subnet in the primary VM instance.
    2. In the IP Type field, select Virtual IP from the drop-down menu.
    3. Click Create.
  3. To create a server alias IP (SNIP) address:
    1. Enter the server alias IP address and netmask configured for the VPC subnet in the primary VM instance.
    2. In the IP Type field, select Subnet IP from the drop-down menu.
    3. Click Create.

    Create client and server IP address for primary

On the secondary node, perform the following steps:

  1. Navigate to System > Network > IPs > IPv4s, and click Add.
  2. To create a client alias IP (VIP) address:
    1. Enter the client alias IP address and netmask configured for the VPC subnet of the primary VM instance.
    2. In the IP Type field, select Virtual IP from the drop-down menu.
    3. Click Create.
  3. To create a server alias IP (SNIP) address:
    1. Enter the server alias IP address and netmask configured for the VPC subnet of the secondary VM instance.
    2. In the IP Type field, select Subnet IP from the drop-down menu.
    3. Click Create.

    Create client and server IP address for secondary

Step 3. Add a load balancing virtual server on the primary node.

  1. Navigate to Configuration > Traffic Management > Load Balancing > Virtual Servers > Add.
  2. Add the required values for Name, Protocol, IP Address Type (IP Address), IP Address (primary client alias IP address) and Port, and click OK.

    LB virtual server client alias

Step 4. Add a service or service group on the primary node.

  1. Navigate to Configuration > Traffic Management > Load Balancing > Services > Add.
  2. Add the required values for Service Name, IP Address, Protocol and Port, and click OK.

Step 5. Bind the service or service group to the load balancing virtual server on the primary node.

  1. Navigate to Configuration > Traffic Management > Load Balancing > Virtual Servers.
  2. Select the load balancing virtual server configured in Step 3, and click Edit.
  3. In the Service and Service Groups tab, click No Load Balancing Virtual Server Service Binding.
  4. Select the service configured in the Step 4, and click Bind.

Step 6. Save the configuration.

After a forced failover, the secondary becomes the new primary. The client alias IP (VIP) from the old primary moves to the new primary.

Configure high availability by using the CLI

Step 1. Set up high availability in INC Enabled mode in both the instances by using the NetScaler CLI.

On the primary node, type the following command.

add ha node 1 <sec_ip> -inc ENABLED
<!--NeedCopy-->

On the secondary node, type the following command.

add ha node 1 <prim_ip> -inc ENABLED
<!--NeedCopy-->

The sec_ip refers to the internal IP address of the management NIC of the secondary node.

The prim_ip refers to the internal IP address of the management NIC of the primary node.

Step 2. Add VIP and SNIP on both primary and secondary nodes.

Type the following commands on the primary node:

add ns ip <primary_client_alias_ip> <subnet> -type VIP

<!--NeedCopy-->

Note:

Enter the alias IP address and netmask configured for the client subnet in the VM instance.

add ns ip <primary_server_alias_ip> <subnet> -type SNIP
<!--NeedCopy-->

Type the following commands on the secondary node:

add ns ip <primary_client_alias_ip> <subnet> -type VIP
<!--NeedCopy-->

Note:

Enter the alias IP address and netmask configured for the client subnet in the VM instance.

add ns ip <secondary_server_alias_ip> <subnet> -type SNIP
<!--NeedCopy-->

Note:

Enter the alias IP address and netmask configured for the server subnet in the VM instance.

Step 3. Add a virtual server on the primary node.

Type the following command:

add <server_type> vserver <vserver_name> <protocol> <primary_client_alias_ip> <port>
<!--NeedCopy-->

Step 4. Add a service or service group on the primary node.

Type the following command:

add service <service_name> <service_ip_address> <protocol> <port>
<!--NeedCopy-->

Step 5. Bind the service or service group to the load balancing virtual server on the primary node.

Type the following command:

bind <server_type> vserver <vserver_name> <service_name>
<!--NeedCopy-->

Note:

To save your configuration, type the command save config. Otherwise, the configurations are lost after you restart the instances.

Deploy a single NIC VPX high-availability pair with private IP address on Google Cloud Platform