R3303-HP HSR6800 Routers Layer 3 - IP Routing Command Reference

55
Routes matching the policy are added with the metric specified in the apply cost command
configured in the policy. Routes not matching it are added with the metric specified in the rip
metricin command. The metric specified in the rip metricin command cannot be changed by using
the + or keyword—used to add or reduce a metric—specified in the apply cost command. For
more information about the apply cost command, see "Routing policy configuration commands."
If the apply cost command is not configured in the policy, all the advertised routes are added with
the metric specified in the rip metricin command.
Examples
# Configure GigabitEthernet 2 /1/1 to add a metric of 6 for the incoming route 1.0.0.0/8 and to add
a metric of 2 for other incoming routes.
<Sysname> system-view
[Sysname] ip ip-prefix 123 permit 1.0.0.0 8
[Sysname] route-policy abc permit node 0
[Sysname-route-policy] if-match ip-prefix 123
[Sysname-route-policy] apply cost 6
[Sysname] interface gigabitethernet 2/1/1
[Sysname-GigabitEthernet2/1/1] rip metricin route-policy abc 2
rip metricout
Use rip metricout to add a metric to sent routes.
Use undo rip metricout to restore the default.
Syntax
rip metricout [ route-policy route-policy-name ] value
undo rip metricout
Default
The additional metric for sent routes is 1.
Views
Interface view
Parameters
route-policy route-policy-name: Specifies the name of a routing policy used to add an additional metric
for the routes matching it. The name is a string of 1 to 63 case-sensitive characters.
value: Adds an additional metric to sent routes, in the range of 1 to 16.
Usage guidelines
With the command configured on an interface, the metric of RIP routes sent on the interface is increased.
If a routing policy is referenced with the route-policy keyword, the following operations can be
performed:
Routes matching the policy are added with the metric specified in the apply cost command
configured in the policy. Routes not matching it are added with the metric specified in the rip
metricout command. The metric specified in the rip metricout command cannot be changed by
using the + or keyword—used to add or reduce a metric—specified in the apply cost command.
For more information about the apply cost command, see "Routing policy configuration
commands."