set protocols static route metric
The set protocols static route metric command configures the metric value for a static route.
Command Syntax
set protocols static [vrf <vrf-name>] route <ip-address> metric <metric-value>
Parameter
Parameter | Description |
vrf <vrf-name> | Optional. Specifies a VRF name. The value is a string. It’s a user-defined VRF set by the command set ip vrf <vrf-name> [description <string>]. NOTE:
|
route <ip-address> | Specifies a destination IPv4 or IPv6 address network segment for route. For example, 192.168.1.0/24, 200::0/64 |
metric <metric-value> | Specifies the metric value for a static route. The value is an integer that ranges from 1 to 65535. A smaller value indicates a higher preference. The default value is 1. |
Usage Guidelines
Setting different metrics can help implement different routing management policies. The metric for VLAN interface gateway route is 1 by default. Users can change the metric of the static route by using the command set protocols static [vrf <vrf-name>] route <ip-address> metric <metric-value>. Users can configure different metrics for different static routes according to the needs of routing priority.
Example
- Set the metric value for the static route to 50.
admin@Xorplus# set protocols static vrf vrf100 route 192.168.1.0/24 metric 50 admin@Xorplus# commit
Copyright © 2025 Pica8 Inc. All Rights Reserved.