You should set the metric according to the actual network topology, because the routing depends on
the metric of routes. Attentions should be paid to the upper and lower limits of the routing protocols
when you execute the set metric, + metric or – metric commands. When the RIP protocol redistributes
the routes of other protocols, the range of the metric after increase or decrease is 1 to 16.
You can redistribute the routes from one routing process to another routing process. For example,
you can redistribute the route in the OSPF routing domain and then advertise it to the RIP routing
domain, and vice versa. The mutual route redistribution can be implemented between all the IP
routing protocols.
For route redistribution, route maps are usually used to control the mutual route redistribution
between two routing domains.
One or more match or set commands can be executed to configure a route map. If the match
command is not used, all the routes will be matched. If the set command is not used, no operation will
be performed.
The following example enables the OSPF routing protocol to redistribute the RIP routes and sets the
default metric to 40.
Ruijie(config)# router ospf
Ruijie(config-router)# redistribute rip subnets route-map redrip
Ruijie(config-router)# network 192.168.12.0 0.0.0.255 area 0
Ruijie(config-router)# exit
Ruijie(config)# route-map redrip permit 10
Ruijie(config-route-map)# set metric 40
Use set metric-type to set the type of the routes to be redistributed. Use the no form of this
command to remove the setting.