--- title: "attachNetworkInterface" slug: "cli-vserver-networkinterface-attachnetworkinterface" tags: ["VPC", "Server"] updated: 2026-09-17T10:08:33Z published: 2026-09-17T10:08:33Z canonical: "cli.ncloud-docs.com/cli-vserver-networkinterface-attachnetworkinterface" --- > ## 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. # attachNetworkInterface Available in VPC Assign a network interface to a server instance. ## Syntax The `attachNetworkInterface` syntax is as follows: ``` ./ncloud vserver attachNetworkInterface \ --subnetNo \ --networkInterfaceNo \ --serverInstanceNo \ [--regionCode ] \ [--output ] ``` ## Options This section describes the options available when running `attachNetworkInterface`. ### Required options The following options are required for `attachNetworkInterface`. | Options | Type | Required | Description | | --- | --- | --- | --- | | `--subnetNo` | String | Required | Subnet number - See [getSubnetList](/docs/en/cli-vpc-subnetmanagement-getsubnetlist). | | `--networkInterfaceNo` | String | Required | Network interface number - Up to 3 can be assigned, including the default network interface. - See [getNetworkInterfaceList](/docs/en/cli-vserver-networkinterface-getnetworkinterfacelist). | | `--serverInstanceNo` | String | Required | Server instance number - See [getServerInstanceList](/docs/en/cli-vserver-server-getserverinstancelist). | ### Common options For information about the options common to all `vserver` subcommands, see [Server (VPC) options](/docs/en/cli-vserver#%EC%98%B5%EC%85%98). ## Examples If the network interface allocation request is successful, the latest information about the network interface is returned. ### Command The command example is as follows: ``` ./ncloud vserver attachNetworkInterface \ --subnetNo 23456789 \ --networkInterfaceNo 56789012 \ --serverInstanceNo 34567890 \ --regionCode KR \ --output json ``` ### Output The output example is as follows: ``` { "attachNetworkInterfaceResponse": { "totalRows": 1, "networkInterfaceList": [ { "networkInterfaceNo": "56789012", "networkInterfaceName": "test-nic-01", "subnetNo": "23456789", "deleteOnTermination": false, "isDefault": false, "deviceName": "eth1", "networkInterfaceStatus": { "code": "SET", "codeName": "Configuring" }, "instanceType": { "code": "VSVR", "codeName": "Server (VPC)" }, "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.11" ] } ], "requestId": "e4f56789-0123-4567-ef01-456789012345", "returnCode": "0", "returnMessage": "success" } } ```