The rip metricin command sets the metric that is added to the route when an interface receives a RIP packet.
The undo rip metricin command restores the additional metric to the default value.
By default, there is no metric added to the route when an interface receives a RIP packet.
| Parameter | Description | Value |
|---|---|---|
| value | Specifies the metric that is added to the received route. | The value is an integer ranging from 0 to 15. By default, it is 0. |
| acl-number | Specifies the basic ACL number. | The value is an integer ranging from 2000 to 2999. |
| ip-prefix ip-prefix-name | Specifies the IP prefix list. | The value must be the name of an existing IP prefix list. |
| value1 | Specifies the metric that is added to the route that passes the filtering of the ACL or IP prefix list. | The value is an integer ranging from 1 to 15. |
Ethernet interface view, Ethernet sub-interface view, Eth-Trunk interface view, Eth-Trunk sub-interface view, Tunnel interface view, Dialer interface view, VLANIF interface view, Virtual-Template interface view
When an interface receives a route, RIP adds the additional metric of the interface to the route, and then installs the route into the routing table. Therefore, increasing the metric of an interface also increases the metric of the RIP route received by the interface.
Adjust RIP route selection by increasing the metrics of received routes.
# Set the additional metric to 12 when GigabitEthernet 0/0/1 receives RIP routes.
<sysname> system-view [sysname] interface GigabitEthernet 0/0/1 [sysname-GigabitEthernet0/0/1] rip metricin 12
# Set the additional metric to 12 using ip-prefix ip1.
<sysname> system-view [sysname] interface GigabitEthernet 0/0/1 [sysname-GigabitEthernet0/0/1] rip metricin ip-prefix ip1 12