I have a router running Cisco IOS XR
with established L2 ISIS adjacency with a neighbor router. I would like to inject only the IPv4 address configured on loopback interface into the ISIS. The route for IPv4 address configured on Loopback0
can be seen below:
RP/0/RP0/CPU0:PE2#sh route 172.16.0.22/32
Sun Apr 18 20:13:11.393 UTC
Routing entry for 172.16.0.22/32
Known via "local", distance 0, metric 0 (connected)
Installed Apr 18 20:06:41.281 for 00:06:30
Routing Descriptor Blocks
directly connected, via Loopback0
Route metric is 0
Redist Advertisers:
4 (protoid=4, clientid=21)
RP/0/RP0/CPU0:PE2#`
At first I tried with route-policy
below:
RP/0/RP0/CPU0:PE2#sh run route-policy allow-lo
Sun Apr 18 20:15:02.546 UTC
route-policy allow-lo
if destination in (172.16.0.22/32) then
done
else
drop
endif
end-policy
!
RP/0/RP0/CPU0:PE2#
This route policy was configured under ISIS configuration:
RP/0/RP0/CPU0:PE2#sh run router isis
Sun Apr 18 20:15:50.689 UTC
router isis lab
is-type level-2-only
net 49.0000.1720.1600.0022.00
address-family ipv4 unicast
redistribute connected route-policy allow-lo
!
/* output removed for brevity */
As this did not seem to have affect, then I tagged the 172.16.0.22/32
route with tag 10
and tried with policy below:
RP/0/RP0/CPU0:PE2#sh run route-policy allow-lo
Sun Apr 18 20:19:39.017 UTC
route-policy allow-lo
if tag eq 10 then
done
else
drop
endif
end-policy
!
RP/0/RP0/CPU0:PE2#
Again, this had no affect. According to Cisco documentation destination
and tag
seem to be the two reasonable attributes with redistribution
attach point for filtering routes.
How to restrict routes redistributed into ISIS in IOS XR?
level-2
on yourredistribute
statement?redistribute connected level-2 route-policy allow-lo
? If yes, then this didn't work.