Deploy a VPX high-availability pair with private IP addresses across different AWS zones 编辑

January 25, 2022 Contributed by:  C

Deploy a VPX high-availability pair with private IP addresses across different AWS zones

You can configure two Citrix ADC VPX instances on two different subnets or two different AWS availability zones using private IP addresses in the INC mode. This solution can be easily integrated with the existing multizone VPX high-availability pair with elastic IP addresses
. Therefore, you can use both the solutions together.

For more information about high availability, see High availability
. For more information about INC, see Configuring high availability nodes in different subnets
.

Note:

This deployment is supported from Citrix ADC release 13.0 build 67.39 onwards. This deployment is compatible with AWS Transit Gateway.


High availability pair with private IP addresses using AWS non-shared VPC

Prerequisites

Ensure that the IAM role associated with your AWS account has the following IAM permissions:

{    "Version": "2012-10-17",    "Statement": [        {            "Action": ["ec2:DescribeInstances","ec2:DescribeAddresses","ec2:AssociateAddress","ec2:DisassociateAddress","ec2:DescribeRouteTables","ec2:DeleteRoute","ec2:CreateRoute","ec2:ModifyNetworkInterfaceAttribute","iam:SimulatePrincipalPolicy","iam:GetRole"            ],            "Resource": "*",            "Effect": "Allow"        }    ]}<!--NeedCopy-->

Deploy a VPX HA pair with private IP addresses using AWS non-shared VPC

The following is the summary of steps for deploying a VPX pair on two different subnets or two different AWS availability zones using private IP addresses.

  1. Create an Amazon virtual private cloud.
  2. Deploy two VPX instances in two different availability zones.
  3. Configure high availability
    1. Set up high availability in INC mode in both the instances.
    2. Add the respective route tables in the VPC that points to the client interface.
    3. Add a virtual server in the primary instance.

For steps 1, 2, and 3b, use the AWS console. For step 3a and 3c, use the Citrix ADC VPX GUI or the CLI.

Step 1. Create an Amazon virtual private cloud (VPC).

Step 2. Deploy two VPX instance in two different availability zones with the same number of ENI (Network Interface).

For more information about how to create a VPC and deploy a VPX instance on AWS, see Deploy a Citrix ADC VPX standalone instance on AWS
and Scenario: standalone instance

Step 3. Configure the ADC VIP addresses by choosing a subnet that does not overlap with the Amazon VPC subnets. If your VPC is 192.168.0.0/16, then to configure ADC VIP addresses, you can choose any subnet from these IP address ranges:

  • 0.0.0.0 - 192.167.0.0
  • 192.169.0.0 - 254.255.255.0

In this example, the chosen 10.10.10.0/24 subnet and created VIPs in this subnet. You can choose any subnet other than the VPC subnet (192.168.0.0/16).

Step 4. Add a route that points to the client interface (VIP) of the primary node from the VPC route table.

From the AWS CLI, type the following command:

aws ec2 create-route --route-table-id rtb-2272532 --destination-cidr-block 10.10.10.0/24 --gateway-id <eni-client-primary><!--NeedCopy-->

From the AWS GUI, perform the following steps to add a route:

  1. Open the Amazon EC2 console
    .
  2. In the navigation pane, choose Route Tables, and select the route table.
  3. Choose Actions, and click Edit routes.
  4. To add a route, choose Add route. For Destination, enter the destination CIDR block, a single IP address, or the ID of a prefix list. For gateway ID, select the ENI of a client interface of the primary node.

Route Tables-edit routes

Note

You must disable Source/Dest Check on the client ENI of the primary instance.

To disable the source/destination checking for a network interface using the console, perform the following steps:

  1. Open the Amazon EC2 console
    .
  2. In the navigation pane, choose Network Interfaces.
  3. Select the network interface of a primary client interface, and choose Actions, and click Change Source/Dest. Check.
  4. In the dialog box, choose Disabled, click Save.

Change Source-Destination Check

Step 5. Configure high availability. You can use the Citrix ADC VPX CLI or the GUI to set up high availability.

Configure high availability by using the CLI

  1. Set up high availability in INC mode in both the instances.

    On the primary node:

    add ha node 1 \<sec\_ip\> -inc ENABLED<!--NeedCopy-->

    On the secondary node:

    add ha node 1 \<prim\_ip\> -inc ENABLED<!--NeedCopy-->

    <sec_ip> refers to the private IP address of the management NIC of the secondary node.

    <prim_ip> refers to the private IP address of the management NIC of the primary node.

  2. Add a virtual server on the primary instance. You must add it from the chosen subnet, for example, 10.10.10.0/24.

    Type the following command:

    add \<server\_type\> vserver \<vserver\_name\> \<protocol\> \<primary\_vip\> \<port\><!--NeedCopy-->

Configure high availability by using the GUI

  1. Set up high availability in INC mode on both the instances

  2. Log on to the primary node with user name nsroot and instance ID as password.

  3. Navigate to Configuration > System > High Availability, and click Add.

  4. At the Remote Node IP address field, add the private IP address of the management NIC of the secondary node.

  5. Select Turn on NIC (Independent Network Configuration) mode on self-node.

  6. Under Remote System Login Credential, add the user name and password for the secondary node and click Create.

  7. Repeat the steps in the secondary node.

  8. Add a virtual server in the primary instance

    Navigate to Configuration > Traffic Management > Virtual Servers > Add.

    Add a virtual server


Deploy a VPX HA pair with private IP addresses using AWS shared VPC

In an AWS shared VPC model, the account that owns the VPC (owner) shares one or more subnets with other accounts (participants). Therefore, you have a VPC owner account and a participant account. After a subnet is shared, the participants can view, create, modify, and delete their application resources in the subnets shared with them. Participants cannot view, modify, or delete resources that belong to other participants or the VPC owner.

For information on AWS shared VPC, see AWS documentation
.

Note:

The configuration steps for deploying a VPX HA pair with private IP addresses using AWS shared VPC is same as the Deploy a VPX HA pair with private IP addresses using AWS non-shared VPC
with the following exception:

  • The route tables in the VPC that points to the client interface must be added from the VPC owner account.

Prerequisites

  • Ensure that the IAM role associated with ADC VPX instance in the AWS participant account has the following IAM permissions:

     "Version": "2012-10-17",     "Statement": [         {             "Sid": "VisualEditor0",             "Effect": "Allow",             "Action": [ "ec2:DisassociateAddress", "iam:GetRole", "iam:SimulatePrincipalPolicy", "ec2:DescribeInstances", "ec2:DescribeAddresses", "ec2:ModifyNetworkInterfaceAttribute", “ec2:AssociateAddress”, "sts:AssumeRole"         ],             "Resource": "*"         }     ] } <!--NeedCopy-->

    Note:

    The AssumeRole allows Citrix ADC VPX instance to assume the cross-account IAM role, which is created by the VPC owner account.

  • Ensure that the VPC owner account provides the following IAM permissions to the participant account using cross-account IAM role:

     {     "Version": "2012-10-17",     "Statement": [         {             "Sid": "VisualEditor0",             "Effect": "Allow",             "Action": [ "ec2:CreateRoute", "ec2:DeleteRoute", "ec2:DescribeRouteTables"             ],             "Resource": "*"         }     ] } <!--NeedCopy-->

Create cross-account IAM role

  1. Log in to the AWS web console.
  2. In the IAM tab, navigate to Roles and then choose Create Role.
  3. Choose Another AWS account.

    Shared vpc create role

  4. Enter the 12-digit account ID number of the participant account that you want to grant administrator access to.

Set cross-account IAM role by using the Citrix ADC CLI

The following command enables ADC VPX instance to assume the cross-account IAM role that exists in the VPC owner account.

set cloud awsParam -roleARN <string><!--NeedCopy-->

Set cross-account IAM role by using the Citrix ADC GUI

  1. Sign into Citrix ADC appliance and navigate to Configuration > AWS > Change cloud parameters.

    Change cloud parameters

  2. In the Configure AWS Cloud Parameters page, enter value for the RoleARN field.

    Configure AWS Cloud Parameters


Scenario

In this scenario, a single VPC is created. In that VPC, two VPX instances are created in two availability zones. Each instance has three subnets - one for management, one for client, and one for back-end server.

The following diagrams illustrate the Citrix ADC VPX high availability setup in INC mode, on AWS. The custom subnet 10.10.10.10, which is not part of the VPC is used as VIP. Therefore, the 10.10.10.10 subnet can be used across availability zones.

Before failover high availability setup in INC mode

After failover high availability setup in INC mode

For this scenario, use CLI to configure high availability.

  1. Set up high availability in INC mode on both the instances.

    Type the following commands on the primary and the secondary nodes.

    On the primary node:

    add ha node 1 192.168.4.10 -inc enabled<!--NeedCopy-->

    Here, 192.168.4.10 refers to the private IP address of the management NIC of the secondary node.

    On the secondary node:

    add ha node 1 192.168.1.10 -inc enabled<!--NeedCopy-->

    Here, 192.168.1.10 refers to the private IP address of the management NIC of the primary node.

  2. Add a virtual server on the primary instance.

    Type the following command:

    add lbvserver vserver1 http 10.10.10.10 80<!--NeedCopy-->
  3. Save the configuration.

  4. After a forced failover:

    • The secondary instance becomes the new primary instance.
    • The VPC route pointing to the primary ENI migrates to the secondary client ENI.
    • Client traffic resumes to the new primary instance.


AWS Transit Gateway configuration for HA private IP solution

You need AWS Transit Gateway to make the private VIP subnet routable within the internal network, across AWS VPCs, regions, and On-premises networks. The VPC must connect to AWS Transit Gateway. A static route for the VIP subnet or IP pool inside the AWS Transit Gateway route table is created and pointed towards the VPC.

AWS Transit Gateway

To configure AWS Transit Gateway, follow these steps:

  1. Open the Amazon VPC console
    .
  2. On the navigation pane, choose Transit Gateway Route Tables.
  3. Choose the Routes tab, and click Create static route.

    AWS Transit Gateway Route Table

  4. Create a static route where CIDR points to your private VIPS subnet and attachment points to the VPC having ADC VPX.

    Create a static route

  5. Click Create static route, then choose Close.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:12 次

字数:16400

最后编辑:7 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文