--- title: "addRoute" slug: "cli-vpc-routetable-addroute" tags: ["VPC"] updated: 2026-10-08T05:05:45Z published: 2026-10-08T05:05:45Z canonical: "cli.ncloud-docs.com/cli-vpc-routetable-addroute" --- > ## 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. # addRoute Available in VPC Add a route to a route table. ## Syntax The `addRoute` syntax is as follows: ``` ./ncloud vpc addRoute \ --vpcNo \ --routeTableNo \ --routeList \ [--regionCode ] \ [--output ] ``` ## Options This section describes the options available when running `addRoute`. ### Required options The following options are required for `addRoute`. | Options | Type | Required | Description | | --- | --- | --- | --- | | `--vpcNo` | String | Required | VPC number - See [getVpcList](/docs/en/cli-vpc-vpcmanagement-getvpclist). | | `--routeTableNo` | String | Required | Route table number - See [getRouteTableList](/docs/en/cli-vpc-routetable-getroutetablelist). | | `--routeList` | List | Required | Route list - For each route, enter {field='value'} pairs enclosed in quotes and separated by commas. - `destinationCidrBlock` (required): Destination IPv4 address range. Uses CIDR notation. Example: `0.0.0.0/0`, `100.10.20.0/24` - `targetTypeCode` (required): Destination type. `NATGW` (NAT Gateway) \| `VPCPEERING` (VPC peering) \| `VGW` (Virtual Private Gateway) - `targetNo` (required): Destination identification number. Check the list of resources corresponding to each destination type via the API. - `targetName` (required): Destination name. Check the list of resources corresponding to each destination type via the API. | ### Common options For information about the options common to all `vpc` subcommands, see [VPC options](/docs/en/cli-vpc#%EC%98%B5%EC%85%98). ## Examples If the route addition request is successful, the configuration information for each route is returned. ### Command The command example is as follows: ``` ./ncloud vpc addRoute \ --vpcNo 12345678 \ --routeTableNo 45678901 \ --routeList "destinationCidrBlock='192.0.2.0/24', targetTypeCode='NATGW', targetNo='56789012', targetName='test-natgw'" \ --regionCode KR \ --output json ``` ### Output The output example is as follows: ``` { "addRouteResponse": { "totalRows": 3, "routeList": [ { "destinationCidrBlock": "0.0.0.0/0", "targetName": "INTERNET GATEWAY", "routeTableNo": "45678901", "targetType": { "code": "IGW", "codeName": "Internet Gateway" }, "targetNo": "", "isDefault": false }, { "destinationCidrBlock": "10.0.0.0/16", "targetName": "LOCAL", "routeTableNo": "45678901", "targetType": { "code": "LOCAL", "codeName": "Local" }, "targetNo": "", "isDefault": true }, { "destinationCidrBlock": "192.0.2.0/24", "targetName": "test-natgw", "routeTableNo": "45678901", "targetType": { "code": "NATGW", "codeName": "NAT Gateway" }, "targetNo": "56789012", "isDefault": false } ], "requestId": "f6a7b8c9-d0e1-2345-fabc-678901234567", "returnCode": "0", "returnMessage": "success" } } ```