08-24-2015 05:53 AM
hi,
i'm trying to configure the redistribution of some static routes in bgp for only one vrf; the problem that I have is when I apply a route-policy; this is my config:
router bgp 65000
bgp router-id 99.99.99.99
address-family ipv4 unicast
network 11.2.37.0/24
!
address-family vpnv4 unicast
additional-paths selection route-policy PIC
!
neighbor 172.31.3.101
remote-as 65000
update-source Loopback1
address-family ipv4 unicast
!
address-family vpnv4 unicast
!
!
neighbor 172.31.3.102
remote-as 65000
update-source Loopback1
address-family ipv4 unicast
!
address-family vpnv4 unicast
!
!
vrf SOMEVRF
rd 10:1
address-family ipv4 unicast
redistribute connected
redistribute static route-policy POLICY1
!
!
!
RP/0/RSP0/CPU0:RackA#show run route-policy POLICY1
Mon Aug 24 06:41:02.682 MET
route-policy POLICY1
if destination in PREFIX1 then
set med 10
set origin egp
prepend as-path 64610
endif
end-policy
!
RP/0/RSP0/CPU0:RackA#show running-config prefix-set PREFIX1
Mon Aug 24 06:42:02.691 MET
prefix-set PREFIX1
10.2.8.17 255.255.255.255 ,
10.10.208.0 255.255.240.0 ,
10.10.244.0 255.255.255.0 ,
10.10.244.40 255.255.255.255 ,
10.10.244.244 255.255.255.255 ,
10.22.152.0 255.255.255.0 ,
10.38.208.0 255.255.240.0 ,
10.38.222.128 255.255.255.224 ,
10.119.0.0 255.255.240.0 ,
10.119.6.191 255.255.255.255 ,
10.119.6.192 255.255.255.255 ,
10.119.15.79 255.255.255.255 ,
10.119.15.200 255.255.255.255 ,
10.119.15.201 255.255.255.255 ,
10.119.15.202 255.255.255.255 ,
10.168.2.0 255.255.255.0 ,
10.168.64.0 255.255.255.0 ,
10.168.180.0 255.255.255.0 ,
10.168.189.0 255.255.255.0 ,
10.170.40.7 255.255.255.255 ,
10.170.40.8 255.255.255.255 ,
10.170.40.9 255.255.255.255 ,
10.170.40.10 255.255.255.255 ,
10.170.40.11 255.255.255.255 ,
10.170.40.12 255.255.255.255 ,
10.170.40.13 255.255.255.255 ,
10.170.40.16 255.255.255.255 ,
10.170.40.21 255.255.255.255 ,
10.170.180.0 255.255.255.0 ,
10.170.182.0 255.255.255.0 ,
10.170.185.0 255.255.255.0 ,
10.171.128.128 255.255.255.192 ,
10.196.89.1 255.255.255.255 ,
10.196.211.0 255.255.255.0 ,
10.196.224.32 255.255.255.240 ,
10.196.224.64 255.255.255.224 ,
10.196.224.128 255.255.255.240 ,
10.239.6.10 255.255.255.255 ,
10.239.6.11 255.255.255.255 ,
10.239.55.0 255.255.255.0 ,
10.239.55.233 255.255.255.255 ,
10.239.55.234 255.255.255.255 ,
10.239.55.249 255.255.255.255 ,
10.239.56.0 255.255.255.0 ,
10.239.57.0 255.255.255.0 ,
10.239.59.0 255.255.255.0 ,
10.239.60.0 255.255.255.0 ,
156.54.78.0 255.255.254.0 ,
156.54.80.0 255.255.254.0 ,
172.18.88.0 255.255.248.0 ,
172.19.0.0 255.255.0.0 ,
172.24.165.0 255.255.255.0 ,
172.27.170.133 255.255.255.255 ,
172.28.219.0 255.255.255.0 ,
172.28.220.0 255.255.255.0 ,
172.29.128.0 255.255.128.0 ,
172.29.240.64 255.255.255.224 ,
172.30.218.0 255.255.255.0 ,
192.168.36.16 255.255.255.240 ,
192.168.132.128 255.255.255.128 ,
192.168.170.0 255.255.255.224 ,
192.168.180.0 255.255.255.0 ,
192.168.181.0 255.255.255.0 ,
192.168.182.0 255.255.255.0 ,
192.168.183.0 255.255.255.0 ,
192.168.184.0 255.255.255.0 ,
192.168.185.0 255.255.255.0 ,
192.168.186.0 255.255.255.0 ,
192.168.187.0 255.255.255.0 ,
192.168.197.64 255.255.255.192 ,
192.168.200.64 255.255.255.224 ,
192.168.200.65 255.255.255.255 ,
192.168.200.88 255.255.255.255 ,
192.168.200.90 255.255.255.255 ,
192.168.200.91 255.255.255.255 ,
192.168.200.97 255.255.255.255 ,
192.168.200.113 255.255.255.255 ,
192.168.249.0 255.255.255.0
end-set
!
RP/0/RSP0/CPU0:RackA#show run router static
Mon Aug 24 06:43:54.254 MET
router static
vrf SOMEVRF
address-family ipv4 unicast
10.10.208.0/20 192.168.196.38
10.10.244.0/24 10.168.164.17
10.10.244.40/32 10.168.164.17
10.10.244.244/32 10.168.164.18
10.22.152.0/24 10.38.223.12
10.24.8.0/21 BVI1001
10.38.208.0/20 BVI1001
10.170.44.4/32 BVI1001
192.168.249.0/24 BVI1001
!
!
!
RP/0/RSP0/CPU0:RackA#
This is what I receive on the other PE (IOS):
PE-A#sho ip bgp vpnv4 vrf SOMEVRF | i 99.99
*>i 10.24.8.0/21 99.99.99.99 10 100 0 64610 e
*>i 10.38.208.0/20 99.99.99.99 10 100 0 64610 e
*>i 10.170.44.4/32 99.99.99.99 10 100 0 64610 e
99.99.99.99 0 100 0 ?
*>i 192.168.5.0 99.99.99.99 0 100 0 ?
*>i 192.168.6.0 99.99.99.99 0 100 0 ?
99.99.99.99 0 100 0 ?
*>i 192.168.249.0 99.99.99.99 10 100 0 64610 e
*>i 200.200.210.0 99.99.99.99 0 100 0 ?
PE-A#
How you can see all static routes have the changed attributes (not only routes that match prefix-set PREFIX1).
Tell me where is the mistake
thank's
08-24-2015 10:36 AM
hi frederico,
I think (part of) the problem is that you're denying prefixes because of the missing :
else
pass
in your route policy.
Would modify it to:
route-policy POLICY1
if destination in PREFIX1 then
set med 10
set origin egp
prepend as-path 64610
else
pass
endif
end-policy
I just tested with XR 524 and it works as it should.
See here for handy reference:
https://supportforums.cisco.com/document/88676/asr9000xr-understanding-and-using-rpl-route-policy-language
cheers!
xander
08-25-2015 01:21 AM
Thank you Alexander,
unfortunatly the policy does not work; then you have to consider that i need to announce only subnet of PREFIX1 and PREFIX2.
Regards
Federico
08-26-2015 01:27 AM
Hi Alexander,
only to say that we solved the problem; it was a wrong prefix-set sintax:
we used something like:
prefix-set PREFIX1
10.2.8.17 255.255.255.255 ,
10.10.208.0 255.255.240.0 ,
10.10.244.0 255.255.255.0 ,
..............
while the correct form was:
10.2.8.17/32,
.............
thank you for your time
Regards
Federico
08-26-2015 05:14 AM
I totally overlooked that Frederico, but indeed the prefixes are configured with a /<bits> as opposed to the decimal long mask.
great find and also thanks for letting us know that the issue is resolved.
cheers
xander
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