# Tạo L2 VPN - Client session (on-premises site)

## <mark style="color:green;">**Tổng quan**</mark> <a href="#overview" id="overview"></a>

Sau khi cấu hình các mạng của NSX Autonomous Edge, sử dụng On-Premises to Cloud Director Replication Appliance tạo client-side của L2 VPN session, mở rộng một hoặc nhiều mạng qua cloud site.

## <mark style="color:green;">Quy trình</mark> <a href="#id-2.-guidance" id="id-2.-guidance"></a>

{% stepper %}
{% step %}
**Bước 1**: Đăng nhập vào giao diện quản lý của VMware Cloud Director Availability On-premises Appliance.

Trên trình duyệt web, truy cập [https://On-Premises-Appliance-IP-address/ui/admin](https://on-premises-appliance-ip-address/ui/admin).

Đăng nhập với tài khoản **root**.

<figure><img src="https://content.gitbook.com/content/dOZ82gj0wvhbAUlxBHpj/blobs/wdt81FZLUVhF95BbYkqz/image.png" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Bước 2**: Trong bảng điều khiển bên trái, dưới phần **System**, nhấp **L2 Stretch**.
{% endstep %}

{% step %}
**Bước 3**: Trên trang **NSX Autonomous edges**, nhấp **L2 VPN Sessions** > **NEW**.

<figure><img src="https://content.gitbook.com/content/dOZ82gj0wvhbAUlxBHpj/blobs/nQHkSMzgN8NyVSWOO9ja/image.png" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Bước 4**: Nếu phiên người dùng của bạn chưa được mở rộng đến cloud site, nhập thông tin đăng nhập để xác thực với  cloud site.
{% endstep %}

{% step %}
**Bước 5**: Chọn cloud site virtual data center và edge gateway trên trang **VDC and edge Gateway.**

<figure><img src="https://content.gitbook.com/content/dOZ82gj0wvhbAUlxBHpj/blobs/jZaFiWeQJObVeI7CztOt/image.png" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Bước 6**: Trên trang **Settings and networks**, cấu hình L2 VPN và nhấp **Next**.

* Trong ô **Name**, nhập tên cho phiên L2 VPN client này.
* Từ menu **Server session**, chọn cloud side L2 VPN server session.
* Trong ô **Local Address**, nhập địa chỉ IP của on-premises ở phía client của L2 VPN session.\
  Địa chỉ IP local phải giống với địa chỉ IP của cổng uplink của NSX Autonomous Edge hosting client L2 VPN session.
* Trong ô **Remote Address**, nhập địa chỉ IP public của HI GIO ở server-side của L2 VPN session.
* Dưới cột **Client Network**, để tạo L2 stretch giữa các mạng, chọn mạng VLAN của on-premises.

&#x20;

<figure><img src="https://content.gitbook.com/content/dOZ82gj0wvhbAUlxBHpj/blobs/kYeItsVhpyH6kp2ExN7v/image.png" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Bước 7**: Trên trang **Ready To Complete**, xem lại và nhấp **FINISH**.

<figure><img src="https://content.gitbook.com/content/dOZ82gj0wvhbAUlxBHpj/blobs/bgM7W2CgqwmDgyhmRSjS/image.png" alt=""><figcaption></figcaption></figure>

**>>>** Session L2 VPN client trên on-premises đã được tạo và L2 stretch qua site cloud đã hoàn thành.

<figure><img src="https://content.gitbook.com/content/dOZ82gj0wvhbAUlxBHpj/blobs/y2HC42DZ3TLHcZjZ0p7k/image.png" alt=""><figcaption></figcaption></figure>

&#x20; **\*\*\*Kiểm tra kết nối**

Ping đến Gateway (on-prem) từ HI GIO.

<figure><img src="https://content.gitbook.com/content/dOZ82gj0wvhbAUlxBHpj/blobs/ih2NnAvMYB1j9chDbxxH/image.png" alt=""><figcaption></figcaption></figure>

Ping đến VM của HI GIO (cùng VLAN/khác VLAN) từ on-prem.

<figure><img src="https://content.gitbook.com/content/dOZ82gj0wvhbAUlxBHpj/blobs/Zzp1lNFxFdXdiDZtVKrj/image.png" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.higiocloud.vn/hi-gio-user-guide-vn/hi-gio-draas/stretching-layer-2-networks-cho-hi-gios-draas/tao-l2-vpn-client-session-on-premises-site.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
