Cisco Systems IOS XR Laptop User Manual


 
Implementing Routing Policy on Cisco IOS XR Software
Information About Implementing Routing Policy
RC-233
Cisco IOS XR Routing Configuration Guide
router ospfv3 1
default-information originate policy ospfv3-originate
.
.
.
Redistribute
The redistribute attach point within OSPFv3 injects routes from other routing protocol sources into the
OSPFv3 link-state database, which is done by selecting the route types it wants to import from each
protocol. It then sets the OSPFv3 parameters of cost and metric type. The policy can control how the
routes are injected into OSPFv3 by using the metric type command.
The following example shows how to redistribute routes from BGP instance instance_15 into OSPF
instance 1 using the policy OSPFv3-redist. The policy sets the metric type to type-2 for all redistributed
routes. BGP routes with a tag of 10 have their cost set to 100, and BGP routes with a tag of 20 have their
OSPFv3 cost set to 200. Any BGP routes not carrying a tag of either 10 or 20 are not be redistributed
into the OSPFv3 link-state database.
route-policy OSPFv3-redist
set metric-type type-2
if tag eq 10 then
set cost 100
elseif tag eq 20 then
set cost 200
else
drop
endif
end-policy
router ospfv3 1
redistribute bgp instance_15 policy OSPFv3-redist
.
.
.
OSPFv3 Attributes and Operators
Table 6 summarizes the OSPFv3 attributes and operators.
Table 6 OSPFv3 Attributes and Operators
Attribute Match Set
cost n/a set
destination in n/a
metric-type n/a set
rib-has-route in n/a
route-type is n/a
tag eq, ge, le set