# (Optional) Deploy the secondary NSX Autonomous Edge in HA mode (on-premises site)

## <mark style="color:green;">O</mark><mark style="color:green;">**verview**</mark> <a href="#overview" id="overview"></a>

Optionally, use the following steps to deploy a secondary NSX-T Autonomous Edge (Layer 2 VPN client) in HA mode in your on-premises environment:

| **#** | **OVF Template Name** | **Port Group**   | **Primary Node**                                             | **Second Node (optional)**                                                                                 | **Remark**                      |
| ----- | --------------------- | ---------------- | ------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- | ------------------------------- |
| 1     | Network 0             | Management       | <mark style="background-color:yellow;">192.168.137.79</mark> | <mark style="background-color:yellow;">192.168.137.</mark>8<mark style="background-color:yellow;">0</mark> |                                 |
| 2     | Network 1             | Uplink           | <mark style="background-color:yellow;">192.168.138.77</mark> | –                                                                                                          | must to have access to internet |
| 3     | Network 2             | Trunk            | –                                                            | –                                                                                                          |                                 |
| 4     | Network 3             | – (HA, optional) | <mark style="background-color:yellow;">192.168.137.81</mark> | 1<mark style="background-color:yellow;">92.168.137.82</mark>                                               |                                 |

## <mark style="color:green;">**Procedure**</mark> <a href="#procedure" id="procedure"></a>

{% stepper %}
{% step %}
**Step 1:** Follow the steps in [Deploy NSX Autonomous Edge (on-premises site)](https://higio-support.atlassian.net/wiki/spaces/v2/pages/69992630) until you reach the **Customize template** step.
{% endstep %}

{% step %}
**Step 2:** On the **Customize template** step, do the following instead:

* In the **Application** section, do the following:
  * Set the **System Root User Password**.
  * Set the **CLI "admin" User Password**.
  * Select the **Is Autonomous Edge** checkbox.
  * Leave the remaining fields empty.

{% hint style="warning" %}
NSX Edge core services do not start unless you enter passwords meeting these requirements:

At least 12 characters

At least one uppercase letter

At least one lowercase letter

At least one digit

At least one special character

At least five different characters
{% endhint %}

* In the **Network Properties** section, do the following:

  * Set the **Hostname**.
  * Set the **Management Network IPv4 Address**. This is the management IP for the autonomous edge.
  * Set the **Management Network Netmask**. This is the management network prefix length.
  * Set the **Default IPv4 Gateway**. This is the default gateway of the management network.

  <figure><img src="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2F5UTwKNjbGAB9DFBZWqgE%2Fimage.png?alt=media&#x26;token=5d617d6a-6e80-46a3-b4b5-904843e12b8b" alt=""><figcaption></figcaption></figure>
* In the **DNS** section, do the following:
  * In the **DNS Server list** field, enter the DNS server IP addresses separated by spaces.
  * In the **Domain Search List** field, enter the domain name.
* In the **Services Configuration** section, do the following:
  * Enter the **NTP Server List**.
  * Enter the **NTP Servers**, separated by spaces.
  * Select the **Enable SSH** checkbox.
  * Select the **Allow Root SSH logins** checkbox.
* Leave **External** section empty.
* In the **HA** section, do the following:

-Enter the **HA Port** details in the following format: VLAN\_ID, Exit Interface, IP, Prefix Length.

*For example:* *137,eth2,192.168.137.81,24*. Replace the following values:

VLAN ID: VLAN ID of the uplink VLAN

Exit Interface: interface ID reserved for uplink traffic

IP: IP address reserved for the uplink interface

Prefix Length: prefix length for the uplink network

-In the **HA Port Default Gateway** field, enter the default gateway of the management network

-Select the **Secondary API Node** checkbox.

-In the **Primary Node Management IP** field, enter the management IP address of the primary autonomous edge.

-In the **Primary Node Username** field, enter the username of the primary autonomous edge (for example, "admin").

-In the **Primary Node Password** field, enter the password of the primary autonomous edge.

-In the **Primary Node Management Thumbprint** field, enter the API thumbprint of the primary autonomous edge.

> You can get this by connecting using SSH to the primary autonomous edge using admin credentials and running the command: “**get certificate api thumbprint**”

<figure><img src="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2FzdFI6aQrn8WFCNMtMInV%2Fimage.png?alt=media&#x26;token=de3b48e5-3240-41f4-ae8c-b3a844cd2c68" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2F48WgMhLDS61NfrhtBB0r%2Fimage.png?alt=media&#x26;token=35e4ea1e-986d-4cf4-a396-4e265e72808e" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Step 3:** Complete the remaining OVF template deployment steps to deploy the secondary autonomous edge (on-premises Layer 2 VPN client).

<figure><img src="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2FJliAllYWqHWCOvS6QDbO%2Fimage.png?alt=media&#x26;token=358308c4-fb14-4392-b519-cc7b0b754573" alt=""><figcaption></figcaption></figure>

PowerOn the second NSX autonomous edge
{% endstep %}

{% step %}
**Step 4:** Validate:

It will take some minutes to sync.

Log in to both NSX autonomous nodes, check High Availability, L2VPN\\

-Primary node:

<figure><img src="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2Fp6OBJMktNwekVu25QwwN%2Fimage.png?alt=media&#x26;token=b7ef9ad0-f042-473c-be42-af277b2dc7b9" alt=""><figcaption></figcaption></figure>

-Secondary node:

<figure><img src="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2FWGE5xtGwAg6dNs0cwPhX%2Fimage.png?alt=media&#x26;token=c2a28d18-89d7-4a77-b245-dfc8562346f2" alt=""><figcaption></figcaption></figure>

-Port ID, Tunnel ID, exit interfaces are same on both nodes.

<figure><img src="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2FagBZwfMpJmqbYeW37uCm%2Fimage.png?alt=media&#x26;token=511dcd1a-0659-41b3-9ebc-605518b20a00" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Step 5:** Failover test:

To test the NSX autonomous failover:

-Ping from on-premises to HI GIO cloud.

-Shutdown NSX autonomous primary node

-Result:

NSX autonomous secondary status will change to ACTIVE, L2 VPN = UP

<figure><img src="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2FALje97qfCE35vfKClZL8%2Fimage.png?alt=media&#x26;token=f9734170-2aa6-4580-ab91-5fa2f0caa025" alt=""><figcaption></figcaption></figure>

The connection drop \~ 5-10 seconds

<figure><img src="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2FQjMMQIEZ5jP2Ac8rCio1%2Fimage.png?alt=media&#x26;token=a775164a-1204-4b5a-b5a3-de8d7564ff35" alt=""><figcaption></figcaption></figure>

After powering on the NSX autonomous primary node, the HA status between the nodes was re-established. The secondary edge remains active, and the primary will become active only in case of additional failure.

<figure><img src="https://3953927389-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fbvay7AR0CH8vZKgD3dSy%2Fuploads%2FVeOudgTJSOh4KSWlDQDf%2Fimage.png?alt=media&#x26;token=892640e6-5240-4ba3-a706-b419715e0c28" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}
