

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 檢閱 EC2 執行個體的 ENA Express 設定
<a name="ena-express-list-view"></a>

您可以依執行個體或網路介面驗證 ENA Express 設定。要更新 ENA Express 設定，請參閱 [設定 EC2 執行個體的 ENA Express 設定](ena-express-configure.md)。

------
#### [ Console ]

**檢視網路介面的 ENA Express 設定**

1. 前往 [https://console.aws.amazon.com/ec2/](https://console.aws.amazon.com/ec2/) 開啟 Amazon EC2 主控台。

1. 在左側導覽窗格中，選擇 **Network Interfaces** (網路介面)。

1. 選取網路介面以查看該執行個體的詳細資訊。您可以選擇 **Network interface ID** (網路介面 ID) 連結，以開啟詳細資訊頁面；或選取清單左側的核取方塊，以在頁面底部的詳細資訊窗格中檢視詳細資訊。

1. 在**詳細資訊**索引標籤或詳細資訊頁面的**網路介面附件**區段中，檢視 **ENA Express** 和 **ENA Express UDP** 的設定。

**檢視執行個體的 ENA Express 設定**

1. 前往 [https://console.aws.amazon.com/ec2/](https://console.aws.amazon.com/ec2/) 開啟 Amazon EC2 主控台。

1. 在左側導覽窗格中選擇 **(執行個體)**。

1. 選取執行個體以查看該執行個體的詳細資訊。您可以選擇 **Instance ID** (執行個體 ID) 連結，以開啟詳細資訊頁面；或選取清單左側的核取方塊，以在頁面底部的詳細資訊窗格中檢視詳細資訊。

1. 在 **Networking** (聯網) 標籤的 **Network interfaces** (網路介面) 區段中，向右捲動以檢視 **ENA Express** 和 **ENA Express UDP** 的設定。

------
#### [ AWS CLI ]

**取得執行個體的 ENA Express 設定**  
使用 [https://docs.aws.amazon.com/cli/latest/reference/describe-instances.html](https://docs.aws.amazon.com/cli/latest/reference/describe-instances.html) 命令。此命令範例會傳回連接到 `--instance-ids` 參數所指定之每個執行中執行個體，以及其網路介面的 ENA Express 組態清單。

```
aws ec2 describe-instances \
    --instance-ids {{i-1234567890abcdef0}} {{i-0598c7d356eba48d7}} \
    --query 'Reservations[*].Instances[*].[InstanceId, NetworkInterfaces[*].Attachment.EnaSrdSpecification]'
```

以下為範例輸出。

```
[
    [
        [
            "i-1234567890abcdef0",
            [
                {
                    "EnaSrdEnabled": true,
                    "EnaSrdUdpSpecification": {
                        "EnaSrdUdpEnabled": false
                    }
                }
            ]
        ]
    ],
    [
        [
            "i-0598c7d356eba48d7",
            [
            {
                    "EnaSrdEnabled": true,
                    "EnaSrdUdpSpecification": {
                        "EnaSrdUdpEnabled": false
                    }
                }
            ]
        ]
    ]
]
```

**取得網路介面的 ENA Express 設定**  
使用 [https://docs.aws.amazon.com/cli/latest/reference/describe-network-interfaces.html](https://docs.aws.amazon.com/cli/latest/reference/describe-network-interfaces.html) 命令。

```
aws ec2 describe-network-interfaces \
    --network-interface-ids {{eni-1234567890abcdef0}} \
    --query NetworkInterfaces[].[NetworkInterfaceId,Attachment.EnaSrdSpecification]
```

以下為範例輸出。

```
[
    [
        "eni-1234567890abcdef0",
        {
            "EnaSrdEnabled": true,
            "EnaSrdUdpSpecification": {
                "EnaSrdUdpEnabled": false
            }
        }
    ]
]
```

------
#### [ PowerShell ]

**取得網路介面的 ENA Express 設定**  
使用 [https://docs.aws.amazon.com/powershell/latest/reference/items/Get-EC2NetworkInterface.html](https://docs.aws.amazon.com/powershell/latest/reference/items/Get-EC2NetworkInterface.html) cmdlet。

```
Get-EC2NetworkInterface `
    -NetworkInterfaceId {{eni-1234567890abcdef0}} | `
Select-Object `
    Association, 
    NetworkInterfaceId, 
    OwnerId, 
    @{Name = 'AttachTime'; Expression = { $_.Attachment.AttachTime } },
    @{Name = 'AttachmentId'; Expression = { $_.Attachment.AttachmentId } },
    @{Name = 'DeleteOnTermination'; Expression = { $_.Attachment.DeleteOnTermination } },
    @{Name = 'NetworkCardIndex'; Expression = { $_.Attachment.NetworkCardIndex } },
    @{Name = 'InstanceId'; Expression = { $_.Attachment.InstanceId } },
    @{Name = 'InstanceOwnerId'; Expression = { $_.Attachment.InstanceOwnerId } },
    @{Name = 'Status'; Expression = { $_.Attachment.Status } },
    @{Name = 'EnaSrdEnabled'; Expression = { $_.Attachment.EnaSrdSpecification.EnaSrdEnabled } },
    @{Name = 'EnaSrdUdpEnabled'; Expression = { $_.Attachment.EnaSrdSpecification.EnaSrdUdpSpecification.EnaSrdUdpEnabled } }
```

以下為範例輸出。

```
Association         : 
NetworkInterfaceId  : eni-0d1234e5f6a78901b
OwnerId             : 111122223333
AttachTime          : 6/11/2022 1:13:11 AM
AttachmentId        : eni-attach-0d1234e5f6a78901b
DeleteOnTermination : True
NetworkCardIndex    : 0
InstanceId          : i-1234567890abcdef0
InstanceOwnerId     : 111122223333
Status              : attached
EnaSrdEnabled       : True
EnaSrdUdpEnabled    : False
```

------