Route Filtering
Load isis.inter.area.cfg
#IOS-XE
config replace flash:isis.inter.area.cfg
#IOS-XR
configure
load bootflash:isis.inter.area.cfg
commit replace
y

On XR2, configure Lo20 with IP 200.20.20.20/32. Redistribute this into ISIS with tag=20.
On R3 and R4, filter routes with tag=20 from being redistributed into L1. Allow all other L2 routes to be redistributed.
Answer
First we must switch to wide-style metrics to use tags. The narrow metric external IP reachability TLV does not have a tag field.
#R1-R6
router isis
metric-style wide
#XRv1-2
router isis 1
add ipv4 unicast
metric-style wide
Then we create the loopback on XRv2 and redistribute it with the correct tag.
#XRv2
int Lo20
ip add 200.20.20.20/32
!
route-policy CONN_TO_ISIS
if destination in ( 200.20.20.20/32 ) then
set tag 20
endif
end-policy
!
router isis 1
add ipv4 unicast
redistribute connected route-policy CONN_TO_ISIS level-1
To verify, we can look at the XR1.00-00 LSP or look at the entry in the routing table:

On R3 and R4 we redistribute all L2 routes into L1 except for tag 20:
#R3, R4
route-map L2_TO_L1 deny 10
match tag 20
route-map L2_TO_L1 permit 20
!
router isis
redistribute isis ip level-2 into level-1 route-map L2_TO_L1
Verify that R1 and R2 do not have a route for 200.20.20.20/32:

However, they do know all other L2 routes:

Last updated