Available in VPC
Create a network interface.
Syntax
The createNetworkInterface syntax is as follows:
./ncloud vserver createNetworkInterface \
--vpcNo <vpc-no> \
--subnetNo <subnet-no> \
--accessControlGroupNoList <acg-no-list> \
[--serverInstanceNo <server-instance-no>] \
[--isBareMetal <true|false>] \
[--networkInterfaceName <nic-name>] \
[--networkInterfaceDescription <nic-description>] \
[--ip <ip>] \
[--secondaryIpList <secondary-ip-list>] \
[--secondaryIpCount <secondary-ip-count>] \
[--regionCode <KR|SGN|JPN>] \
[--output <json|xml>]
Options
This section describes the options available when running createNetworkInterface.
Required options
The following options are required for createNetworkInterface.
| Options | Type | Required | Description |
|---|---|---|---|
--vpcNo |
String | Required | VPC number
|
--subnetNo |
String | Required | Subnet number
|
--accessControlGroupNoList |
List | Required | ACG number list
|
--serverInstanceNo |
String | Conditional | Server instance number
|
Optional options
These are the optional options for createNetworkInterface. Options that are not specified will use their default values.
| Options | Type | Required | Description |
|---|---|---|---|
--isBareMetal |
Boolean | Optional | Whether it is a network interface for bare metal servers
|
--networkInterfaceName |
String | Optional | Network interface name
|
--networkInterfaceDescription |
String | Optional | Network interface description (byte)
|
--ip |
String | Optional | Primary IP address
|
--secondaryIpList |
List | Optional | Secondary IP list
|
--secondaryIpCount |
Integer | Optional | Number of auto-assigned secondary IPs
|
Common options
For information about the options common to all vserver subcommands, see Server (VPC) options.
Examples
If the request to create a network interface is successful, the network interface's identification information and network configuration are returned.
Command
The command example is as follows:
./ncloud vserver createNetworkInterface \
--vpcNo 12345678 \
--subnetNo 23456789 \
--accessControlGroupNoList 67890123 \
--networkInterfaceName test-nic-01 \
--networkInterfaceDescription "Test network interface" \
--secondaryIpCount 1 \
--regionCode KR \
--output json
Output
The output example is as follows:
{
"createNetworkInterfaceResponse": {
"totalRows": 1,
"networkInterfaceList": [
{
"networkInterfaceNo": "56789012",
"networkInterfaceName": "test-nic-01",
"subnetNo": "23456789",
"deleteOnTermination": false,
"isDefault": false,
"deviceName": "",
"networkInterfaceStatus": {
"code": "NOTUSED",
"codeName": "Not used"
},
"ip": "192.0.2.10",
"macAddress": "F2:20:AF:00:00:01",
"enableFlowLog": false,
"accessControlGroupNoList": [
"67890123"
],
"networkInterfaceDescription": "Test network interface",
"secondaryIpList": [
"192.0.2.11"
]
}
],
"requestId": "b1c2d3e4-f5a6-7890-bcde-f12345678901",
"returnCode": "0",
"returnMessage": "success"
}
}