06-04-2022
12:59 AM
- last edited on
06-14-2022
04:53 AM
by
Translator
Sorry I put the wront policy in my question; here is my corrected version:
Hi,
we are multihomed with two diefferent ISPs (i.e. ISP1 with AS 1100, ISP2 with AS 2200); our own AS is i.e. 5000. We are running IOS XR 6.6.3 using the following configuration
router bgp 5000
address-family ipv4 unicast
neighbor 10.100.83.1
remote-as 1100
ebgp-multihop 2
update-source Loopback0
address-family ipv4 unicast
route-policy rp-filter-out out
neighbor 10.200.80.1
remote-as 2200
ebgp-multihop 2
update-source Loopback0
address-family ipv4 unicast
route-policy rp-filter-out out
rout-policy filter:
route-policy rp-filter-out |
# bgp out policy |
if as-path in (ios-regex '^$') then |
pass |
endif |
end-policy |
We want to add an AS PATH prepend to our peering with ISP1(AS 1100); is the following RP correct or not ?
route-policy rp-asp-prepend |
# prepend 5000 5000 |
prepend as-path 5000 2 |
end-policy |
route-policy rp-filter-out |
# bgp out policy |
if as-path is-local and as-path neighbor-is '1100' then |
apply rp-asp-prepend |
pass |
elseif as-path is-local then |
pass |
else |
drop |
end-policy |
Solved! Go to Solution.
06-04-2022
06:08 AM
- last edited on
06-14-2022
04:53 AM
by
Translator
Hi @MANFRED LIEBCHEN ,
Your RP will not accomplish what you want, as the following condition applies to the as-path in the route, rather than the peer-as.
as-path neighbor-is '1100'
The following RP should work for you. Please test it in you lab first.
route-policy rp-filter-out($peeras)
var globalVar1 $peeras
if globalVar1 eq 1100 and as-path is-local then
prepend as-path 5000 2
else
if as-path is-local then
pass
endif
endif
end-policy
!
router bgp 5000
neighbor 10.100.83.1
address-family ipv4 unicast
route-policy rp-filter-out(1100) out
neighbor 10.200.80.1
address-family ipv4 unicast
route-policy rp-filter-out(2200) out
Regards,
06-04-2022 03:19 AM - edited 06-04-2022 08:13 AM
With out pass the route will drop not advertise even if it not modify.
by the way this guide is wonderful for IOS XR it have many many LAB.
https://www.ciscolive.com/c/dam/r/ciscolive/us/docs/2019/pdf/5eU6DfQV/LTRARC-2002-LG.pdf
06-04-2022 04:33 AM
Hi
Sticking with Cisco configuration guide example, you dont need:
The following example shows how to prepend the autonomous system number 666.1 to the AS path three times:
RP/0/0/CPU0:router(config-rpl)# prepend as-path 666.1 3
The following example shows how to prepend the autonomous system number 666.0 to the AS path one time:
RP/0/0/CPU0:router(config-rpl)# prepend as-path 666.0 1
06-04-2022
06:08 AM
- last edited on
06-14-2022
04:53 AM
by
Translator
Hi @MANFRED LIEBCHEN ,
Your RP will not accomplish what you want, as the following condition applies to the as-path in the route, rather than the peer-as.
as-path neighbor-is '1100'
The following RP should work for you. Please test it in you lab first.
route-policy rp-filter-out($peeras)
var globalVar1 $peeras
if globalVar1 eq 1100 and as-path is-local then
prepend as-path 5000 2
else
if as-path is-local then
pass
endif
endif
end-policy
!
router bgp 5000
neighbor 10.100.83.1
address-family ipv4 unicast
route-policy rp-filter-out(1100) out
neighbor 10.200.80.1
address-family ipv4 unicast
route-policy rp-filter-out(2200) out
Regards,
06-13-2022 08:13 AM
Thanks very much, your hint works fine
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