---
title: static-route
description: Canonical makes open source secure, reliable and easy to use, providing
  support for Ubuntu and a portfolio of enterprise-grade technologies. Founded in
  2004, Canonical operates globally with team members in over 80 countries.
url: https://canonical-com-2934.demos.haus/maas/docs/static-route?format=md
---

*Submit*

# static-route

Enter keyword arguments in the form `key=value`.

## [Delete static route](https://canonical-com-2934.demos.haus/maas/docs/static-route?format=md#p-23252-delete-static-route)

```
maas $PROFILE static-route delete [--help] [-d] [-k] id [data ...]
```

#### Positional arguments

* id

Deletes the static route with the given ID.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit. |
| -d, --debug | Display more information about API responses. |
| -k, --insecure | Disable SSL certificate check |

## [Get a static route](https://canonical-com-2934.demos.haus/maas/docs/static-route?format=md#p-23252-get-a-static-route)

```
maas $PROFILE static-route read [--help] [-d] [-k] id [data ...]
```

#### Positional arguments

* id

Gets a static route with the given ID.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit. |
| -d, --debug | Display more information about API responses. |
| -k, --insecure | Disable SSL certificate check |

## [Update a static route](https://canonical-com-2934.demos.haus/maas/docs/static-route?format=md#p-23252-update-a-static-route)

```
maas $PROFILE static-route update [--help] [-d] [-k] id [data ...]
```

#### Positional arguments

* id

Updates a static route with the given ID.

#### Keyword “source”

Optional String. Source subnet name for the route.

#### Keyword “destination”

Optional String. Destination subnet name for the route.

#### Keyword “gateway\_ip”

Optional String. IP address of the gateway on the source subnet.

#### Keyword “metric”

Optional Int. Weight of the route on a deployed machine.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit. |
| -d, --debug | Display more information about API responses. |
| -k, --insecure | Disable SSL certificate check |

## [Create a static route](https://canonical-com-2934.demos.haus/maas/docs/static-route?format=md#p-23252-create-a-static-route)

```
maas $PROFILE static-routes create [--help] [-d] [-k] [data ...]
```

Creates a static route.

#### Keyword “source”

Required String. Source subnet name for the route.

#### Keyword “destination”

Required String. Destination subnet name for the route.

#### Keyword “gateway\_ip”

Required String. IP address of the gateway on the source subnet.

#### Keyword “metric”

Optional Int. Weight of the route on a deployed machine.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit. |
| -d, --debug | Display more information about API responses. |
| -k, --insecure | Disable SSL certificate check |

## [List static routes](https://canonical-com-2934.demos.haus/maas/docs/static-route?format=md#p-23252-list-static-routes)

```
maas $PROFILE static-routes read [--help] [-d] [-k] [data ...]
```

Lists all static routes.

#### Command-line options

| Option | Effect |
| --- | --- |
| –help, -h | Show this help message and exit. |
| -d, --debug | Display more information about API responses. |
| -k, --insecure | Disable SSL certificate check |

---

[Previous

sslkey](https://canonical-com-2934.demos.haus/maas/docs/sslkey)
[Next

status](https://canonical-com-2934.demos.haus/maas/docs/status)

Last updated 1 year, 5 months ago. [Help improve this document in the forum](https://discourse.maas.io/t/static-route/11372).
