Modify default metric for redistribution
The default metric is a global parameter that species the cost applied to all OSPF routes by default. The default value is 10. You can
assign a cost from 1 - 65535.
NOTE
You also can dene the cost on individual interfaces. The interface cost overrides the default
cost.
To assign a default metric of 4 to all routes imported into OSPF, enter the following commands.
device(config)# router ospf
device(config-ospf-router)# default-metric 4
Syntax: default-metric value
The value can be from 1 - 15. The default is 10.
Enable route redistribution
NOTE
Do not enable redistribution until you have congured the redistribution route map. Otherwise, you might accidentally overload
the network with routes you did not intend to redistribute.
To enable redistribution of RIP and static IP routes into OSPF, enter the following commands.
device(config)# router ospf
device(config-ospf-router)# redistribute rip
device(config-ospf-router)# redistribute static
device(config-ospf-router)# write memory
Example using a route map
To
congure a route map and use it for redistribution of routes into OSPF, enter commands such as the following.
device(config)# ip route 1.1.0.0 255.255.0.0 10.95.7.30
device(config)# ip route 1.2.0.0 255.255.0.0 10.95.7.30
device(config)# ip route 1.3.0.0 255.255.0.0 10.95.7.30
device(config)# ip route 4.1.0.0 255.255.0.0 10.95.6.30
device(config)# ip route 4.2.0.0 255.255.0.0 10.95.6.30
device(config)# ip route 4.3.0.0 255.255.0.0 10.95.6.30
device(config)# ip route 4.4.0.0 255.255.0.0 10.95.6.30 5
device(config)# route-map abc permit 1
device(config-routemap abc)# match metric 5
device(config-routemap abc)# set metric 8
device(config-routemap abc)# router ospf
device(config-ospf-router)# redistribute static route-map abc
The commands in this example
congure some static IP routes, then congure a route map and use the route map for redistributing
static IP routes into OSPF.
The ip route commands congure the static IP routes. The route-map command begins conguration of a route map called "abc". The
number indicates the route map entry (called the "instance") you are conguring. A route map can contain multiple entries. The software
compares routes to the route map entries in ascending numerical order and stops the comparison once a match is found.
The match command in the route map matches on routes that have 5 for their metric value (cost). The set command changes the metric
in routes that match the route map to 8.
Conguring OSPF
FastIron Ethernet Switch Layer 3 Routing
250 53-1003627-04