The rip metricin command sets the metric that is added to the routes carried in received RIP packets.
The undo rip metricin command restores the default metric.
By default, the metric is 0.
Parameter | Description | Value |
---|---|---|
value |
Specifies the metric that is added to received routes. |
The value is an integer ranging from 0 to 15. Its default value is 0. |
aclNumber |
Specifies the basic ACL number. |
The value is an integer ranging from 2000 to 2999. |
acl-name aclName |
Specifies the name of a named basic ACL. |
The value is a string of 1 to 64 case-sensitive characters without spaces. The value must start with a letter (a to z or A to Z, case sensitive). |
metricInVal |
Specifies the metric that is added to the routes that match the ACL or IP prefix list. |
The value is an integer ranging from 1 to 15. |
ip-prefix ip-prefix-name |
Specifies an IP prefix list. |
The name is a string of 1 to 169 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. |
100GE interface view, 10GE interface view, 25GE sub-interface view, 25GE interface view, 400GE interface view, 40GE interface view, 50GE sub-interface view, 50GE interface view, Eth-Trunk interface view, FlexE interface view, GE optical interface view, GE electrical interface view, GMPLS-UNI interface view, Global VE sub-interface view, Tunnel interface view, VBDIF interface view, VE sub-interface view, VLANIF interface view
Usage Scenario
When an interface receives a route, RIP adds the interface metric to the route, and then adds the route to the routing table. Therefore, increasing the interface metric also increases the metric of RIP routes received by the interface.
You can specify the metric to be added to the RIP routes that match the ACL or IP prefix list. If a RIP route fails to match the ACL or IP prefix list, the metric is not added to the route.Configuration Impact
If the metric of a route is greater than 16 after the configured value is added, 16 is used as its metric.
NOTE: If the route is unreachable after the rip metricin command is run, run the undo rip metricin command to restore the default value.<HUAWEI> system-view [~HUAWEI] acl 2000 [*HUAWEI-acl4-basic-2000] quit [*HUAWEI] interface GigabitEthernet 0/1/0 [*HUAWEI-GigabitEthernet0/1/0] rip metricin 2000 10
<HUAWEI> system-view [~HUAWEI] interface GigabitEthernet 0/1/0 [~HUAWEI-GigabitEthernet0/1/0] rip metricin 12