A static route defines the destination and one or more paths (next hops) to get to that destination. You define static routes manually using the Gaia Portal, or the Gaia Clish set static-route
command.
Static routes let you add paths to destinations that are unknown by dynamic routing protocols. You can define multiple paths (next hops) to a destination and define priorities for selecting a path. Static routes are also useful for defining the default route.
Static route definitions include these parameters:
You can configure IPv4 static routes one at a time, or many routes at once.
Step |
Description |
---|---|
1 |
In the navigation tree, click Network Management > IPv4 Static Routes. |
2 |
In the IPv4 Static Routes section, click Add. The Add Destination Route window opens. |
3 |
In the Destination field, enter the IPv4 address of destination host, or network. |
4 |
In the Subnet mask field, enter the subnet mask. |
5 |
In the Next Hop Type field, select one of these:
|
6 |
In the Rank field, leave the default value (60), or enter the relative rank of the IPv4 static route (an integer from 1 to 255). This value specifies the rank for the configured route when there are overlapping routes from different protocols. |
7 |
Select the Local Scope option, if needed. Use this setting on a cluster member when the ClusterXL Virtual IPv4 address is in a different subnet than the IPv4 address of a physical interface. This lets the cluster member accept static routes on the subnet of the Cluster Virtual IPv4 address. To make sure that the |
8 |
In the Comment field, enter the applicable comment text (up to 100 characters). |
9 |
Click Add Gateway and select one of these options:
Notes:
|
10 |
If you defined a next hop gateway by IP Address, you can select the Ping option, if you need to monitor next hops for the IPv4 static route with the The Ping feature sends ICMP Echo Requests to verify that the nexthop for a static route is working. Only nexthop gateways, which are verified as working are included in the kernel forwarding table. When Ping is enabled, an IPv4 static route is added to the kernel forwarding table only after at least one gateway is reachable. |
11 |
Click Save. |
12 |
In the Advanced Options section, you can adjust the Ping behavior. If you changed the default settings, click Apply. |
You can use the batch mode to configure multiple static routes in one step.
Note - This mode does not allow configuring static routes using a logical interface option.
Step |
Description |
---|---|
1 |
In the navigation tree, click Network Management > IPv4 Static Routes. |
2 |
In the Batch Mode section, click Add Multiple Static Routes. |
3 |
In the Add Multiple Routes window, select the Next Hop Type:
|
4 |
Add the routes in the text box, using this syntax:
Where:
Example:
|
5 |
Click Apply. The newly configured static routes show in the IPv4 Static Routes section. Note - The text box shows entries that contain errors with messages at the top of the page. |
6 |
Correct errors and reload the affected routes. |
7 |
In the top right corner, click the Monitoring tab to make sure that the routes are configured correctly. |
Description
Configure, show and delete IPv4 static routes.
Note - There are no add
commands for the static route feature.
Syntax
set static-route default comment {"Text" | off} nexthop gateway address <IPv4 Address of Next Hop Gateway> [priority <Priority>] {on | off} logical <Name of Local Interface> [priority <Priority>] {on | off} blackhole reject ping {on | off} rank <Rank> scopelocal {on | off} |
set static-route <Destination IPv4 Address> comment {"Text" | off} nexthop gateway address <IPv4 Address of Next Hop Gateway> {on | off} monitored-ip <monitored_ip> {on | off} monitored-ip-option {fail-all | fail-any | force-if-symmetry {on | off}} [priority <Priority>] logical <Name of Local Interface> {on | off} [priority <Priority>] blackhole reject off ping {on | off} rank <Rank> scopelocal {on | off} |
show route static all |
set static-route default off |
set static-route <Destination IPv4 Address> off |
set static-route <Destination IPv4 Address> nexthop gateway <IPv4 Address of Next Hop Gateway> off |
set static-route <Destination IPv4 Address> nexthop gateway <Name of Local Interface> off |
Important - After you add, configure, or delete features, run the save config
command to save the settings permanently.
Parameters
Parameter |
Description |
---|---|
|
Defines the default static IPv4 route. |
<Destination IPv4 Address> |
Specifies the IPv4 address of destination host or network using the CIDR notation (IPv4_Address/MaskLength). Example: You can use the |
|
Defines of removes the optional comment for the static route.
|
|
Defines the next hop path, which can be a |
|
Specifies that this next hop accepts and sends packets to the specified destination. |
|
Specifies that this next hop drops packets, but does not send ICMP unreachable packet to the traffic source. |
|
Specifies that this next hop drops packets and sends ICMP unreachable packet to the traffic source. |
|
Specifies the IPv4 address of the next hop gateway. |
|
Identifies the next hop gateway by the name of the local interface that connects to it. Use this option only if the next hop gateway has an unnumbered interface. |
|
Remote IPv4 address to monitor for the next hop gateway. Set a gateway to monitor IP address(es) configured with the The gateway becomes usable with respect to reachability of IP address(es) reported from the |
|
Set failure condition and flavor for the configured monitored IP address(es).
|
|
Defines which gateway to select as the next hop when multiple gateways are configured. The lower the priority, the higher the preference - priority 1 means the highest preference, and priority 8 means the lowest preference. You can define two or more paths using the same priority to specify a backup path with equal priority. Gateways with no priority configured are preferred over gateways with priority configured. |
|
Adds the specified next hop. |
|
Deletes the specified next hop. If you specify a next hop, only the specified path is deleted. If no next hop is specified, the route and all related paths are deleted. |
|
Removes the static route. |
|
Enables ( The Ping feature sends ICMP Echo Requests to verify that the nexthop for a static route is working. Only nexthop gateways, which are verified as working are included in the kernel forwarding table. When Ping is enabled, an IPv4 static route is added to the kernel forwarding table only after at least one gateway is reachable. To adjust the ping behavior, run: |
|
Selects a route, if there are many routes to a destination that use different routing protocols. The route with the lowest rank value is selected. Use the Accepted values are: In addition, see this command: |
|
Defines a static route with a link-local scope. Use this setting on a cluster member, when the ClusterXL Virtual IPv4 address is in a different subnet than the IPv4 address of a physical interface. This lets the cluster member accept static routes on the subnet of the Cluster Virtual IPv4 address. To make sure that the |
Example
gaia> set static-route 192.0.2.0/24 nexthop gateway address 192.0.2.155 on
gaia> set static-route 192.0.2.0/24 nexthop gateway address 192.0.2.155 off
gaia> set static-route 192.0.2.0/24 nexthop gateway logical eth0 on
gaia> set static-route 192.0.2.0/24 off
gaia> set static-route 192.0.2.100/32 nexthop blackhole
gaia> set static-route 192.0.2.100/32 rank 2
gaia> show route static Codes: C - Connected, S - Static, R - RIP, B - BGP, O - OSPF IntraArea (IA - InterArea, E - External, N - NSSA) A - Aggregate, K - Kernel Remnant, H - Hidden, P - Suppressed
S 0.0.0.0/0 via 192.168.3.1, eth0, cost 0, age 164115 S 192.0.2.100 is a blackhole route S 192.0.2.240 is a reject route |