---
title: "assignSecondaryIps"
slug: "cli-vserver-networkinterface-assignsecondaryips"
updated: 2026-06-25T09:10:26Z
published: 2026-06-25T09:10:26Z
canonical: "cli-fin.ncloud-docs.com/cli-vserver-networkinterface-assignsecondaryips"
---
> ## Documentation Index
> Fetch the complete documentation index at: https://cli-fin.ncloud-docs.com/llms.txt
> Use this file to discover all available pages before exploring further.
# assignSecondaryIps
네트워크 인터페이스에 Secondary IP를 할당합니다.
## 구문
`assignSecondaryIps` 구문은 다음과 같습니다.
```shell
./ncloud vserver assignSecondaryIps \
--networkInterfaceNo \
--secondaryIpList \
--secondaryIpCount \
[--allowReassign ] \
[--regionCode ] \
[--output ]
```
## 옵션
`assignSecondaryIps` 실행 시 지정할 수 있는 옵션을 설명합니다.
### 필수 옵션
`assignSecondaryIps`의 필수 옵션입니다.
| 옵션 | 타입 | 필수 여부 | 설명 |
| :--- | :--- | :--- | :--- |
| `--networkInterfaceNo` | String | Required | 네트워크 인터페이스 번호- [getNetworkInterfaceList](/docs/cli-vserver-networkinterface-getnetworkinterfacelist) 참조
|
| `--secondaryIpList` | List | Conditional | Secondary IP 목록- 공백으로 구분하여 여러 개 입력 가능 (예시: `--secondaryIpList 192.168.0.1 192.168.0.2`)
- Subnet의 IP 주소 범위 내 최대 5개 입력 가능
- `secondaryIpCount` 포함 최소 1개 필수 입력
|
| `--secondaryIpCount` | Integer | Conditional | Secondary IP 자동 할당 수- 0~5
- Private IP를 순차적으로 자동 할당
- `secondaryIpList` 포함 최대 5개 입력 가능
- `secondaryIpList` 포함 최소 1개 필수 입력
|
### 선택 옵션
`assignSecondaryIps`의 선택 옵션입니다. 지정하지 않은 옵션에는 기본값이 적용됩니다.
| 옵션 | 타입 | 필수 여부 | 설명 |
| :--- | :--- | :--- | :--- |
| `--allowReassign` | Boolean | Optional | 재할당 허용 여부- `true` \| `false` (기본값)
- `true`: Secondary IP가 이미 사용 중인 경우, 재할당
- `false`: Secondary IP가 이미 사용 중인 경우, 오류 발생
- `secondaryIpList`로 지정한 IP에만 적용
|
### 공통 옵션
`vserver` 명령에서 공통으로 사용하는 옵션에 대한 정보는 [Server 옵션](/docs/cli-vserver#옵션)을 참조해 주십시오.
## 예시
네트워크 인터페이스에 Secondary IP 할당 요청이 성공하면 네트워크 인터페이스의 구성 정보와 할당된 Secondary IP 목록이 반환됩니다.
### 명령
명령 예시는 다음과 같습니다.
```shell
./ncloud vserver assignSecondaryIps \
--networkInterfaceNo 56789012 \
--secondaryIpList 192.0.2.13 192.0.2.14 \
--regionCode FKR \
--output json
```
### 출력
출력 예시는 다음과 같습니다.
```json
{
"assignSecondaryIpsResponse": {
"totalRows": 1,
"networkInterfaceList": [
{
"networkInterfaceNo": "56789012",
"networkInterfaceName": "test-nic-01",
"subnetNo": "23456789",
"deleteOnTermination": false,
"isDefault": false,
"deviceName": "eth1",
"networkInterfaceStatus": {
"code": "SET",
"codeName": "설정중"
},
"instanceType": {
"code": "VSVR",
"codeName": "Server (VPC)"
},
"instanceNo": "34567890",
"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",
"192.0.2.13",
"192.0.2.14"
]
}
],
"requestId": "17890123-4567-8901-1234-789012345678",
"returnCode": "0",
"returnMessage": "success"
}
}
```