03-09-2022 06:49 AM - edited 03-09-2022 07:14 AM
Hello,
I'm looking for something that I can't find in cisco:
I would like if my BGP neighbor sends BGP community 65003:1000 on a prefix, it would be prepended 3 times on one of my neighbor.
How to do this?
Also, I would like if it sends 65535:666 on a /32, I would like to automatically modify the next hop.
Anyone have any documentation? At Juniper, this is called "Policy options"
My equipment is a Cisco Nexus 9000.
Thank you !
Axel HAUGUEL
03-09-2022 07:18 AM - edited 03-10-2022 06:26 AM
...
03-10-2022 04:22 AM
Hi !
Thanks for reply, but I cannot integrate this directly on route-map ?
ip prefix-list PFX-AS50046-IRR-V4 seq 10 permit 45.152.70.0/24 ip prefix-list PFX-AS50046-IRR-V4 seq 95 permit 0.0.0.0/0 ge 32 ip prefix-list PFX-AS50046-IRR-V4 seq 100 deny 0.0.0.0/0 le 32 ip prefix-list PFX-AS212815-IRR-V4 seq 67 permit 45.152.70.0/24 route-map RPL-AS210578-CUST-IN-V4 permit 100 description "AS210578 Florian MISFUD" match ip address prefix-list PFX-AS210578-IRR-V4 set community 999:100 999:200 999:300 additive route-map RPL-AS210578-CUST-OUT-V4 permit 100 template peer NBRGRP-AS210578-CUST-V4 remote-as 210578 remove-private-as address-family ipv4 unicast send-community route-map RPL-AS210578-CUST-IN-V4 in route-map RPL-AS210578-CUST-OUT-V4 out maximum-prefix 20 soft-reconfiguration inbound always neighbor 185.171.202.237 inherit peer NBRGRP-AS210578-CUST-V4 description Cust: AS210578 XXX no shutdown
Maybe I must play with permit XXX ?
Because actually, route-map is "RPL-AS210578-CUST-IN-V4". If I apply a community directly on this route-map, it will be applied on the customer on all prefixes received.
Me, I want customer can announce prefix and my route-map match and prepared ONLY IF CUSTOMER SEND PREFIX WITH THE COMMUNITY MATCHED
03-10-2022 04:52 AM
Hello,
can you break this down logically ?
--> customer sends what (give an example)
--> you announce what ?
03-10-2022 04:56 AM
Hi
Example :
A client sends me:
193.234.222.0/24 with no community
112.111.111.0/24 with no community
213.221.241.0/24 with community 65003:1000
I would like if the client sends me a prefix with the following community:
65001:1000 -> Prefix is only prepended once
65002:1000 -> The prefix prepends 2 times
65003:1000 -> The prefix prepends 3 times
Thanks
Axel
03-10-2022 05:24 AM - edited 03-10-2022 05:27 AM
Hello,
I think you need one prefix list and route map for each prefix. That way you can specify what to do with each prefix. This would look something like below:
route-map A_RM permit 10
match ip address prefix-list A_PFX
set community 65001:1000 additive
!
route-map A_RM permit 20
match ip address prefix-list B_PFX
set community 65002:1000 65002:1000 additive
!
route-map A_RM permit 30
match ip address prefix-list C_PFX
match community C_LIST
set community 65003:1000 65003:1000 65003:1000 additive
EDIT: one route map with three sequences...
03-10-2022 05:33 AM
Hi,
Humm, I see I think.
ip prefix-list PFX-AS50046-IRR-V4 seq 10 permit 45.152.70.0/24 ip prefix-list PFX-AS50046-IRR-V4 seq 95 permit 0.0.0.0/0 ge 32 ip prefix-list PFX-AS50046-IRR-V4 seq 100 deny 0.0.0.0/0 le 32 ip prefix-list PFX-AS212815-IRR-V4 seq 67 permit 45.152.70.0/24
route-map RPL-AS210578-CUST-IN-V4 permit 100 description "AS210578 match ip address prefix-list PFX-AS210578-IRR-V4 set community 999:100 999:200 999:300 additive route-map RPL-AS210578-CUST-IN-V4 permit 200 description "AS210578" match ip address prefix-list PFX-AS210578-IRR-V4 match community 65001:1000 set community 999:100 999:200 999:300 additive set as-path prepend last-as 1 route-map RPL-AS210578-CUST-IN-V4 permit 300 description "AS210578" match ip address prefix-list PFX-AS210578-IRR-V4 match community 65002:1000 set community 999:100 999:200 999:300 additive set as-path prepend last-as 2 route-map RPL-AS210578-CUST-IN-V4 permit 400 description "AS210578" match ip address prefix-list PFX-AS210578-IRR-V4 match community 65003:1000 set community 999:100 999:200 999:300 additive set as-path prepend last-as 3
route-map RPL-AS210578-CUST-OUT-V4 permit 100 template peer NBRGRP-AS210578-CUST-V4 remote-as 210578 remove-private-as address-family ipv4 unicast send-community route-map RPL-AS210578-CUST-IN-V4 in route-map RPL-AS210578-CUST-OUT-V4 out maximum-prefix 20 soft-reconfiguration inbound always neighbor 185.171.202.237 inherit peer NBRGRP-AS210578-CUST-V4 description Cust: AS210578 XXX no shutdown
It will be working?
Thanks !
03-10-2022 06:05 AM
Hello
Why are you adding prepending on ingress prefixes are you readvertising them?
03-10-2022 05:01 AM - edited 03-10-2022 06:27 AM
...
03-10-2022 05:14 AM
Hi MHM,
This configuration is correct.
route-map RPL-AS210578-CUST-IN-V4 in route-map RPL-AS210578-CUST-OUT-V4 out
"RPL-AS210578-CUST-IN-V4" -> Prefixes received to my router, from customer
"RPL-AS210578-CUST-OUT-V4" -> Fullview distribued to customer from my router
I do not understand that :
R2 will use route-map IN match community set prepend
I don't understand how to use this.
Because currently I already have "RPL-AS210578-CUST-IN-V4" which exists.
However, if I apply match + community on this RPL, it will apply to prefixes received with community 6500X:1000.
Also, prefixes that don't have this community, which route-map will they use?
03-10-2022 05:45 AM - edited 03-10-2022 02:22 PM
ip communuty list standard X 6500:100
!
route-map CommModify permit
match community-list X
set community 6500:100 6500:100 6500:100 additive
!
!
template peer-session BasePolicy
route-map CommModify OUT
exit
!
neighbor x.x.x.x remote-as AS
address-family ipv4 unicast
inherit peer-policy BasePolicy
we all assume you receive bgp and resend it BUT here there are template Peer, so you need peer-session command.
hope this work for you.
good luck friend
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