02-27-2014 10:27 AM
Greetings,
I'm running an ASR9010 running XR version 4.2.0 and have a scenario where by default I redistribute connected routes into OSPFv2 with the default type-2 metric.
However I have turned up a new peering link off of this PE router and need to redistribute that particular connected prefix as a OSPFv2 type-1.
I thought about attaching the following RPL at the redistribution point:
route-policy MODIFY_TO_TYPE1
if protocol is connected and (destination in (X.X.X.X/30)) then
set metric-type type-1
else
pass
endif
end-policy
Does this look solid? Or should I have (source in (x.x.x.x/30))
Any help would be appricated.
Thanks,
Solved! Go to Solution.
03-04-2014 12:33 PM
Hello,
Use destination instead of source. Since you are redistributing connected already under ospf command, you do not need to put protocol as connected under route-policy. I did quick test in my lab to show you:
RP/0/RSP0/CPU0:ASR9006-J#show run route-policy RTAMAELA
Tue Mar 4 16:30:15.345 EST
route-policy RTAMAELA
if destination in (192.168.103.0/24) then
set metric-type type-1
else
pass
endif
end-policy
!
RP/0/RSP0/CPU0:ASR9006-J#show run router ospf 11
Tue Mar 4 16:30:18.872 EST
router ospf 11
router-id 10.22.65.14
auto-cost reference-bandwidth 10000
redistribute connected route-policy RTAMAELA
area 0.0.0.0
mpls traffic-eng
interface Loopback111
passive enable
!
interface GigabitEthernet0/2/1/13
cost 10
network point-to-point
hello-interval 1
!
interface GigabitEthernet0/2/1/14
cost 10
network point-to-point
hello-interval 1
!
interface GigabitEthernet0/2/1/19
cost 10
network point-to-point
hello-interval 1
!
!
!
RP/0/RSP0/CPU0:ASR9001-B#show route | in 192.168
Tue Mar 4 20:31:25.961 UTC
O E2 192.168.9.8/30 [110/20] via 10.22.65.34, 00:04:17, GigabitEthernet0/0/0/3
C 192.168.28.0/24 is directly connected, 06:48:03, Loopback0
L 192.168.28.254/32 is directly connected, 06:48:03, Loopback0
O E2 192.168.29.29/32 [110/20] via 10.22.65.34, 00:04:17, GigabitEthernet0/0/0/3
O E1 192.168.103.0/24 [110/30] via 10.22.65.34, 00:02:48, GigabitEthernet0/0/0/3 <-- the prefix is advertised as E1.
O E2 192.168.110.0/30 [110/20] via 10.22.65.34, 00:04:17, GigabitEthernet0/0/0/3
RP/0/RSP0/CPU0:ASR9001-B#
HTH,
rivalino
03-04-2014 12:33 PM
Hello,
Use destination instead of source. Since you are redistributing connected already under ospf command, you do not need to put protocol as connected under route-policy. I did quick test in my lab to show you:
RP/0/RSP0/CPU0:ASR9006-J#show run route-policy RTAMAELA
Tue Mar 4 16:30:15.345 EST
route-policy RTAMAELA
if destination in (192.168.103.0/24) then
set metric-type type-1
else
pass
endif
end-policy
!
RP/0/RSP0/CPU0:ASR9006-J#show run router ospf 11
Tue Mar 4 16:30:18.872 EST
router ospf 11
router-id 10.22.65.14
auto-cost reference-bandwidth 10000
redistribute connected route-policy RTAMAELA
area 0.0.0.0
mpls traffic-eng
interface Loopback111
passive enable
!
interface GigabitEthernet0/2/1/13
cost 10
network point-to-point
hello-interval 1
!
interface GigabitEthernet0/2/1/14
cost 10
network point-to-point
hello-interval 1
!
interface GigabitEthernet0/2/1/19
cost 10
network point-to-point
hello-interval 1
!
!
!
RP/0/RSP0/CPU0:ASR9001-B#show route | in 192.168
Tue Mar 4 20:31:25.961 UTC
O E2 192.168.9.8/30 [110/20] via 10.22.65.34, 00:04:17, GigabitEthernet0/0/0/3
C 192.168.28.0/24 is directly connected, 06:48:03, Loopback0
L 192.168.28.254/32 is directly connected, 06:48:03, Loopback0
O E2 192.168.29.29/32 [110/20] via 10.22.65.34, 00:04:17, GigabitEthernet0/0/0/3
O E1 192.168.103.0/24 [110/30] via 10.22.65.34, 00:02:48, GigabitEthernet0/0/0/3 <-- the prefix is advertised as E1.
O E2 192.168.110.0/30 [110/20] via 10.22.65.34, 00:04:17, GigabitEthernet0/0/0/3
RP/0/RSP0/CPU0:ASR9001-B#
HTH,
rivalino
03-05-2014 06:30 AM
Rivalino,
Thanks for taking the time to respond to my submmision and the lab testing.
I wanted to let you know that this morning I implemented the RPL as you suggested and it worked as you expected.
I see now I was thinking too much about where the source of the route was originated and not where it was when I needed to modify it.
Thanks again for your help regarding this question!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide