> For the complete documentation index, see [llms.txt](https://doc.engenius.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.engenius.ai/esg-application-guide/highlight-features/routing-and-static-route.md).

# Routing & Static Route

Routing is a critical component of network management that determines how data packets travel within and outside of a network. EnGenius Cloud Gateway allows administrators to override its default routing behavior using policy routes and static routes. This capability is essential for directing traffic through the appropriate interfaces or VPN tunnels, optimizing network performance and security.

## Understanding Static Routes and Policy Routes

* **Static Routes:** Static routing is a method to manually specify the network route rather than relying on dynamic routing protocols. It is generally used in smaller or more static networks where the routes do not change often. In larger network environments involving multiple routers, static routes are often used in conjunction with routing protocols like RIP (Routing Information Protocol) or OSPF (Open Shortest Path First) to propagate routing information efficiently.
* **Policy Routes:** These routes allow you to define paths based on criteria other than the destination IP address, such as source IP, source port, destination port, or even the protocol used. This flexibility makes policy routing a powerful tool for traffic management, especially when dealing with multiple types of traffic that require different handling.

## Configuring Static Route

1. **Determine the Need for Static Route:**
   * Assess your network to decide if static routes are necessary. In networks with multiple routers where dynamic routing protocols like RIP or OSPF are used, static routes can be beneficial for managing specific traffic paths or for network segments that do not change often.
2. **Set Up a Static Route:**
   * In the **Configure/Gateway/Interface** setting page, select 'Static Routes' and choose to add a new route. Enter the destination network, subnet mask, and the gateway through which the traffic should be directed.
3. **Apply and Test the Configuration:**
   * Save the static route configuration and conduct tests to verify that the traffic is routing through the specified paths correctly.

## **Example of** Policy Route **configuration**

<figure><img src="/files/3MgkU39lgm4PamQzv0lF" alt=""><figcaption><p>Example of Policy Route configuration</p></figcaption></figure>

## **Illustration of** Policy Route **configuration**

<figure><img src="/files/A6MgkFxp94OAYi1sY4D6" alt=""><figcaption><p>Example of Policy Route configuration</p></figcaption></figure>

## Configuring Policy Route

1. **Access Routing Settings:**
   * Log into your EnGenius Cloud account and select the **Configure/Gateway/Interface** setting page. Navigate to the 'Policy Routes' Tab.
2. **Create a New Policy Route:**
   * Choose '+ Add Route' to start defining a new routing rule. Input the criteria for the policy route, such as source IP, destination IP, ports, or protocols.
3. **Specify the Route Action:**
   * Determine what action to take when the criteria are met—such as directing the traffic to a specific interface.
4. **Save and Activate the Route:**
   * After setting up the details, save the configuration to activate the policy route. Make sure to test the route to ensure it behaves as expected.

{% hint style="info" %}

### Best Practices for Routing

* **Security:** Regularly review routing configurations to ensure they do not introduce security vulnerabilities, especially when opening new paths through firewalls or into sensitive network segments.
* **Monitoring:** Continuously monitor the performance and effectiveness of routing policies and static routes to ensure they meet the network’s evolving needs.
  {% endhint %}

By understanding and implementing policy and static routes in your EnGenius Cloud Gateway, you can significantly enhance the network's efficiency and security, ensuring that data packets travel through the most appropriate paths.

### Additional Considerations

Refer to [link](/esg-application-guide/highlight-features/multiple-wan-connection-fail-over-and-load-balance/wan-link-load-balancing.md#policy-routing-for-load-balancing-and-1-1-nat)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://doc.engenius.ai/esg-application-guide/highlight-features/routing-and-static-route.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
