# ミラーリング

ポートミラーリングは、1つまたは複数のポートのパケットをミラーリング先ポートに複製する機能です。ミラーリング先ポートに監視用デバイスを接続することで、複製されたポートを通過するパケットの詳細を確認できます。ネットワークの監視やトラブルシューティングに有用です。この機能は「**管理**」＞「**スイッチ**」＞「**詳細情報**」＞「**ミラー**」から利用できます。

<figure><img src="/files/qI25spJlIHvLK1HaF91z" alt=""><figcaption></figcaption></figure>

以下はこの画面に表示されるラベルの説明です：

* **セッションID**：ミラーリングセッションを識別する番号です。スイッチは最大3つのミラーリングセッションをサポートします。
* **セッション状態**：ポートミラーリングの有効／無効を選択します。
* **宛先ポート**：すべてのミラーリングされたデータが送信されるポートです。
* **Egress**：送信データのみがミラーリングされることを示します。
* **Ingress**：受信データのみがミラーリングされることを示します。

## 設定手順 <a href="#how-to-configure" id="how-to-configure"></a>

<figure><img src="/files/CyWHkb4h7fvWYXeBmucn" alt=""><figcaption></figcaption></figure>

1. 右側の編集アイコンをクリックします。
2. 「**セッション状態**」を有効にします。
3. 「**宛先ポート**」を選択します。
4. 「**Egress**」と「**Ingress**」のポートを選択します。
5. 「**適用する**」をクリックします。

{% hint style="info" %}
該当ポートの送信データのみをミラーリングしたい場合は「Egress」のみを、受信データのみをミラーリングしたい場合は「Ingress」のみを選択してください。送受信データをミラーリングしたい場合は、「Egress」と「Ingress」両方を選択してください。
{% endhint %}

{% hint style="info" %}
ミラーリングされるデータは「宛先ポート」に送信されます。「Egress」ポートではないのでご注意ください。
{% endhint %}

## ポートの状態 <a href="#port-state" id="port-state"></a>

設定可能なポートのタイプは4つあります。

&#x20;<img src="/files/-M5tUdv7G1B-5j875i-5" alt="" data-size="original">                宛先ポートに割り当てられたポート\
&#x20;<img src="/files/-M5tV0z1jdrsSIobKTbv" alt="" data-size="original">                送信データのみミラーリングされるポート\
&#x20;<img src="/files/-M5tVVUAciCbl6iomCMV" alt="" data-size="original">                受信データのみミラーリングされるポート\
&#x20;<img src="/files/-M5tVZtLqIoYkKYAwIB2" alt="" data-size="original">               両方向のデータが宛先ポートにミラーリングされるポート \
&#x20;               &#x20;


---

# 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.lan.kokomocloud.com/managing-devices/managing-switches/mirror.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.
