--- title: "detachNetworkInterface" slug: "cli-vserver-networkinterface-detachnetworkinterface" updated: 2026-09-17T10:11:00Z published: 2026-09-17T10:11:00Z canonical: "cli.ncloud-docs.com/cli-vserver-networkinterface-detachnetworkinterface" --- > ## Documentation Index > Fetch the complete documentation index at: https://cli.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # detachNetworkInterface VPC環境で利用できます。 サーバインスタンスに割り当てられたネットワークインターフェースを解除します。サーバインスタンスの基本ネットワークインターフェースは解除できません。 ## 構文 `detachNetworkInterface`構文は次の通りです。 ``` ./ncloud vserver detachNetworkInterface \ --subnetNo \ --networkInterfaceNo \ --serverInstanceNo \ [--regionCode ] \ [--output ] ``` ## オプション `detachNetworkInterface`の実行時に指定できるオプションについて説明します。 ### 必須オプション `detachNetworkInterface`の必須オプションです。 | オプション | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `--subnetNo` | String | Required | Subnet番号 - [getSubnetList](/docs/ja/cli-vpc-subnetmanagement-getsubnetlist)を参照 | | `--networkInterfaceNo` | String | Required | ネットワークインターフェース番号 - [getNetworkInterfaceList](/docs/ja/cli-vserver-networkinterface-getnetworkinterfacelist)を参照 | | `--serverInstanceNo` | String | Required | サーバインスタンス番号 - [getServerInstanceList](/docs/ja/cli-vserver-server-getserverinstancelist)を参照 | ### 共通オプション `vserver`コマンドで共通して使用するオプションについては、[Server (VPC)のオプション](/docs/ja/cli-vserver#%EC%98%B5%EC%85%98)をご参照ください。 ## 例 ネットワークインターフェースの解除リクエストが成功すると、ネットワークインターフェースの最新情報が返されます。 ### コマンド コマンドの例は次の通りです。 ``` ./ncloud vserver detachNetworkInterface \ --subnetNo 23456789 \ --networkInterfaceNo 56789012 \ --serverInstanceNo 34567890 \ --regionCode KR \ --output json ``` ### 出力 出力の例は次の通りです。 ``` { "detachNetworkInterfaceResponse": { "totalRows": 1, "networkInterfaceList": [ { "networkInterfaceNo": "56789012", "networkInterfaceName": "test-nic-01", "subnetNo": "23456789", "deleteOnTermination": false, "isDefault": false, "deviceName": "eth1", "networkInterfaceStatus": { "code": "UNSET", "codeName": "解除中" }, "instanceNo": "34567890", "ip": "192.0.2.10", "macAddress": "F2:20:AF:00:00:01", "enableFlowLog": false, "accessControlGroupNoList": [], "networkInterfaceDescription": "Test network interface", "secondaryIpList": [ "192.0.2.14", "192.0.2.11" ] } ], "requestId": "6c345678-9012-3456-6789-234567890123", "returnCode": "0", "returnMessage": "success" } } ```