> Source: [sk39746](https://support.checkpoint.com/results/sk/sk39746)

# sk39746 - How to configure static routes in CLISH on Gaia OS and IPSO OS

| Property | Value |
|----------|-------|
| Solution ID | sk39746 |
| Date Created | 2009-04-14 |
| Last Modified | 2022-12-21 |
| Technical Level | General |
| Products | Security Gateway, Security Management Server, Multi-Domain Security Management Server |
| Versions | R82.10, R82, R81.20, R82.10, R82, R81.20, R82.10, R82.20, R81.20, R82, R82.20 |
| OS | Gaia |

## Solution

**Clish** is a command line shell to configure Gaia OS and IPSO OS settings.

To set a route (non-default):
-----------------------------

`HostName> set static-route `*NETWORK_ADDRESS* `/`*MASK_LENGTH*` nexthop gateway address `*GATEWAY_IP_ADDRESS*` priority <1-8> on`

`HostName> set static-route `*NETWORK_ADDRESS* `/`*MASK_LENGTH*` nexthop gateway logical `*INTERFACE_NAME*` priority <1-8> on`
> *Examples*:
>
> * Set a route to 192.168.0.0/24 with priority 1 via 10.0.0.1:
>
>   ```
>   set static-route 192.168.0.0/24 nexthop gateway address 10.0.0.1 priority 1 on
>   ```
>
> * Set a route to 192.168.0.0/24 with priority 1 via eth1:
>
>   ```
>   set static-route 192.168.0.0/24 nexthop gateway logical eth1 priority 1 on
>   ```

To disable a route (non-default):
---------------------------------

`HostName> set static-route `*NETWORK_ADDRESS* `/`*MASK_LENGTH*` nexthop gateway address `*GATEWAY_IP_ADDRESS*` off`

`HostName> set static-route `*NETWORK_ADDRESS* `/`*MASK_LENGTH*` nexthop gateway logical `*INTERFACE_NAME*` off`
> *Examples*:
>
> * Disable a route to 192.168.0.0/24 via 10.0.0.1:
>
>       set static-route 192.168.0.0/24 nexthop gateway address 10.0.0.1 off
>
> * Disable a route to 192.168.0.0/24 via eth1:
>
>       set static-route 192.168.0.0/24 nexthop gateway logical eth1 off

To delete a route (non-default) and all related paths:
------------------------------------------------------

`HostName> set static-route <Destination IP address> off`
> *Examples*:
>
> * Delete a route to 192.0.2.0/24 :  
>
>   `set static-route 192.0.2.0/24 off`

To delete a path only:
----------------------

`HostName> set static-route <Destination IP address> nexthop gateway GATEWAY_IP_ADDRESS off`

`GATEWAY_IP_ADDRESS` - Next hop gateway IP address or interface name
> *Examples*:
>
> * Delete a path to 192.0.2.10 :  
>
>   `set static-route 192.0.2.10 nexthop gateway address 192.0.2.100 off`

To set the default route:
-------------------------

`HostName> set static-route default nexthop gateway address `*GATEWAY_IP_ADDRESS*` priority <1-8> on`

`HostName> set static-route default nexthop gateway logical `*INTERFACE_NAME*` priority <1-8> on`
> *Examples*:
>
> * Set the default route via 192.168.255.1:
>
>       set static-route default nexthop gateway address 192.168.255.1 priority 1 on
>
> * Set the default route via eth1:
>
>       set static-route default nexthop gateway logical eth1 priority 1 on

To disable the default route:
-----------------------------

`HostName> set static-route default nexthop gateway address `*GATEWAY_IP_ADDRESS*` off`

`HostName> set static-route default nexthop gateway logical `*INTERFACE_NAME*` off`
> *Example*:
>
> * Disable the default route via 192.168.255.1:
>
>       set static-route default nexthop gateway address 192.168.255.1 off
>
> * Disable the default route via eth1:
>
>       set static-route default nexthop gateway logical eth1 off

**Important Note:** To save the changes permanently, run "**`save config`**" command.

**Note:** Check Point recommends to press "q" instead of Ctrl-C to return to the CLI prompt. Under certain circumstances, entering Ctrl-C repeatedly might result in the system dumping a core file and exiting the CLI.  
If this occurs and there are configuration changes that you have not saved that you want to save, restart the CLI by entering Clish and then entering save config at the CLI prompt.

### Related documentation:

* [R80.40 Gaia Administration Guide](https://sc1.checkpoint.com/documents/R80.40/WebAdminGuides/EN/CP_R80.40_Gaia_AdminGuide/Default.htm).   

* [IPSO 6.2 CLI Reference Guide](http://supportcontent.checkpoint.com/documentation_download?id=10295).

---

# Agent Instructions

This content is from the Check Point Support Center (https://support.checkpoint.com), the official knowledge base for Check Point cybersecurity products.

## Navigating This Knowledge Base

- **Complete index**: [llms.txt](https://support.checkpoint.com/llms.txt)
- **All SK articles**: [SecureKnowledge Sitemap](https://support.checkpoint.com/sitemaps/secureknowledge-sitemap-index.xml)
- **SK article URL pattern**: `https://support.checkpoint.com/results/sk/{skId}`
- **Markdown responses**: AI bot User-Agents automatically receive `text/markdown` content
