Specifications

Implementing Routing Policy on Cisco IOS XR Software
Information About Implementing Routing Policy on Cisco IOS XR Software
RC-381
Cisco IOS XR Routing Configuration Guide
OSPFv3 Policy Attach Points
This section describes each of the OSPFv3 policy attach points and provides a summary of the OSPFv3
attributes and operators.
Default-Information Originate, page RC-381
Redistribute, page RC-381
Default-Information Originate
The default-information originate attach point allows the user to conditionally inject the default route
0::/0 into the OSPFv3 link-state database, which is done by evaluating the attached policy. If any routes
in the local RIB pass the policy, then the default route is inserted into the link-state database.
The following example shows how to generate a default route if any of the routes that match 2001::/96
are present in the RIB:
route-policy ospfv3-originate
if rib-has-route in (2001::/96) then
pass
endif
end-policy
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 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 extcommunity cost 100
redistribute destination in n/a
metric-type n/a set
route-type is n/a
tag eq, ge, le n/a
area-in destination in n/a
area-out destination in n/a
Table 7 OSPF Attributes and Operators (continued)
Attach Point Attribute Match Set