< Home

rip metricout

Function

The rip metricout command sets the metric that is added to the route when an interface sends a RIP packet.

The undo rip metricout command restores the additional metric to the default value.

By default, the metric that is added to the route when an interface sends a RIP packet is 1.

Format

rip metricout { value | { acl-number | acl-name acl-name | ip-prefix ip-prefix-name } value1 }

undo rip metricout

Parameters

Parameter Description Value
value Specifies the metric that is added to the sent route. The value is an integer ranging from 1 to 15. By default, it is 1.
acl-number Specifies the number of a basic ACL. The value is an integer ranging from 2000 to 2999.
acl-name acl-name Specifies the name of an ACL. The value is a string of 1 to 64 case-sensitive characters without spaces. The value must start with a letter.
ip-prefix ip-prefix-name Specifies the name of the IP prefix list. The name must be exclusive. 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.
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 2 to 15.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

When a RIP route is advertised, the additional metric is added to the route. Therefore, increasing the metric of an interface also increases the metric of the RIP route sent on the interface. However, the metric of the route in the routing table remains unchanged.

You can specify the metric to be added to the RIP route that passes the filtering of the ACL or IP prefix list by specifying value1. If a RIP route does not pass the filtering, its metric is increased by 1.

For an ACL, when the rule command is used to configure a filtering rule, the filtering rule is effective only with the source address range that is specified by the source parameter and with the time period that is specified by the time-range parameter.

Example

# Set the metric that is added when the interface sends RIP routes to 12.

<HUAWEI> system-view
[HUAWEI] interface vlanif 100
[HUAWEI-Vlanif100] rip metricout 12

# Set the metric that is added when the interface sends RIP routes to 12.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] undo portswitch
[HUAWEI-GigabitEthernet0/0/1] rip metricout 12

# Increase the metric of a RIP route that passes the filtering of ACL 2050 by 12.

<HUAWEI> system-view
[HUAWEI] interface vlanif 100
[HUAWEI-Vlanif100] rip metricout 2050 12

# Increase the metric of a RIP route that passes the filtering of ACL 2050 by 12.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] undo portswitch
[HUAWEI-GigabitEthernet0/0/1] rip metricout 2050 12

# Increase the metric of a RIP route that passes the filtering of the IP prefix list named p1 by 12.

<HUAWEI> system-view
[HUAWEI] ip ip-prefix p1 permit 10.10.10.1 24
[HUAWEI] interface vlanif 100
[HUAWEI-Vlanif100] rip metricout ip-prefix p1 12

# Increase the metric of a RIP route that passes the filtering of the IP prefix list named p1 by 12.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] undo portswitch
[HUAWEI-GigabitEthernet0/0/1] rip metricout ip-prefix p1 12
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >