> For the complete documentation index, see [llms.txt](https://docs.verge.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verge.io/run-the-platform/vi/mang/port-mirroring.md).

# Nhân bản cổng

Bật nhân bản cổng trên mạng VergeOS để sao chép lưu lượng tới NIC của VM nhằm phân tích gói tin, giám sát và chẩn đoán bằng các chế độ North/South hoặc East/West.

Phản chiếu cổng sao chép lưu lượng của mạng sang một NIC của máy ảo, cho phép phân tích gói tin để giám sát hoặc chẩn đoán.

## Cấu hình phản chiếu cổng

1. Bật **Phản chiếu cổng** trong phần cài đặt mạng. ![portmirrordropdown.png](https://1198484664-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpODKGSQETqL1gSqyxIq3%2Fuploads%2Fgit-blob-21420f8b59523033f7f778544fc9049785828be1%2Fportmirrordropdown.png?alt=media)
   * Chọn ***Bắc/Nam*** để sao chép các gói tin đi qua bộ định tuyến mạng
   * Chọn ***Đông/Tây*** để sao chép các gói tin đi qua bộ định tuyến VÀ tất cả các gói tin trong mạng nội bộ

{% hint style="warning" %}
***Đông/Tây*****&#x20;phản chiếu cổng thường chỉ được khuyến nghị như một cài đặt tạm thời cho mục đích chẩn đoán; sử dụng trong thời gian dài có thể ảnh hưởng đến hiệu năng vì nó sao chép toàn bộ lưu lượng mạng.**
{% endhint %}

2. Nhấp vào **Gửi** để lưu thay đổi.
3. Nhấp vào **Khởi động lại** trên menu bên trái để khởi động mạng.
4. Tạo một máy ảo sẽ được dùng để phân tích cổng (hoặc dùng một máy ảo hiện có).
5. [**Thêm một NIC vào máy ảo**](/run-the-platform/vi/may-ao/vm-nics.md):
   * Trong **Mạng** trường, chọn: *NETWORKNAME*\_mirror
   * Nhấp vào **Gửi** (ở cuối trang) để lưu
6. (Khởi động lại) máy ảo.
7. Có thể sử dụng hệ điều hành/phần mềm ứng dụng tùy chọn trong máy ảo để phân tích gói tin.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.verge.io/run-the-platform/vi/mang/port-mirroring.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
