What is a static route?
Short answer
A static route is a fixed route that defines by hand through which gateway (next-hop) a specific destination network is reached; it does not adapt to changes in the network by itself. For example, going to the 203.0.113.0/24 network through 192.0.2.254 is a static route. In TR7, a static route is added on the Network → Interfaces screen with the Add Route form: Route Interface, Gateway and Destination Network are entered. The route is valid in the route table of the interface it is bound to; in the record, the destination address is converted to the start address of the block (e.g. 203.0.113.77/24 → 203.0.113.0/24). The same destination network cannot be defined a second time in the same route table (Route destinations collide); for this reason, more than one route (ECMP) to the same destination through different gateways is not defined. Destination Network and Gateway must be in the same IP version.
Where It Is Used in TR7
| Where | Field / label | What for |
|---|---|---|
| Network → Interfaces → Actions → Add Route (or right-click on the interface → Add Route) | Route Table (if there is more than one route table), Route Interface, Default Gateway, Gateway, Destination Network (CIDR default 24) | Defining a route specific to the destination network |
| Network → Interfaces list and preview → Routes tab | destination/CIDR -> gateway lines; Edit Route, Delete Route(s) | Seeing the routes, changing their gateway or destination, deleting them |
| WEB-CLI | network route add, network route list (network route); sys-cmd netstat (netstat) | Adding and listing routes; with the -rn parameter, seeing the running routing table of the selected route table |
Static Route Rules in TR7
- Route table: The route table of the route is the route table of the selected interface; the Route Table field in the form only filters the interface list. The routes in one route table do not affect other route tables.
- Gateway check: The form does not check whether the gateway is in the subnet of the interface; the route is added by being treated as directly connected (onlink). The correctness of the gateway address is the user's responsibility.
- Interfaces to which a route cannot be added: A route cannot be added to the cluster sync interface (
Interface '…' is protected); the interfaces that are Bond/LACP members are disabled in the list. - Editing: In the Edit Route form, only Gateway and Destination Network (in the default gateway route, also Gateway Monitoring) are changed; the interface and the route type are locked.
- Cluster: The route definition is common to the two devices and, with the default auto-sync, is also applied to the peer device; a different gateway cannot be defined per device.
Common Misconceptions
- "A static route is applied to the whole device." The route is valid in the route table that the interface is bound to (What is a Route Table; when do I need to change it for a vService or Backend Service?).
- "The load is shared by giving two gateways to the same destination." A single route is defined for the same destination network in the same route table; the second one is rejected with
Route destinations collide. - "The default gateway is something separate from a static route." The default gateway is a route whose destination is
0.0.0.0/0(or::/0), and it is added in the same form with the Default Gateway box (What is a Default Gateway?).
How it is done in the documentation
