
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
elseif tag eq 20 then
set extcommunity cost 200
else
drop
endif
end-policy
router ospfv3 1
redistribute bgp 15 policy OSPFv3-redist
.
.
.
OSPFv3 Attributes and Operators
This table summarizes the OSPFv3 attributes and operators per attach points.
Table 9: OSPFv3 Attributes and Operators
Set
Match
Attribute
Attach Point
set
n/a
ospf-metric
default-information
originate
set
n/a
metric-type
n/a
in
rib-has-route
set
n/a
tag
Routing Configuration Guide for Cisco NCS 6000 Series Routers, IOS XR Release 6.4.x
434
Implementing Routing Policy
Redistribute