---
title: "ezgh compute route-tables routes set"
description: "Create or replace the route for a destination."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ezgh compute route-tables routes set

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh compute route-tables routes set <table> <destination> --target <ngw_…|nat_…|eni_…> [flags]
```

Create the route for a destination CIDR, or point it at a new target: the VPC's Network Gateway (ngw\_…), a NAT gateway (nat\_…) or a private network interface (eni\_…). Only this destination's route is written; other routes are left as they are. A retry after a lost answer is answered as the first try.

Part of [`ezgh compute route-tables routes`](/cli/reference/compute-route-tables-routes).

## Examples

```sh
ezgh compute route-tables routes set private 0.0.0.0/0 --target nat_…
ezgh compute route-tables routes set private 10.8.0.0/16 --target eni_…
ezgh compute route-tables routes set rtb_… ::/0 --target ngw_…
```

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--target` | string |  | the target: a network gateway (ngw\_…), NAT gateway (nat\_…) or network interface (eni\_…) ID (required) |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/compute-route-tables-routes-set/index.mdx
