06-01-2022 10:36 AM
Dear ALL,
We are setup the network to using AWS service, we have two peering to AWS, one is public peering to receive the internet prefix, one is private peering to receive the private prefix, now the two peering to AWS is fine.
We want to use tag to separate internet prefix and internal prefix and announce into OSPF, i have set the BGP community for public peering and private peering, but i can't use match community to add the tag.
anyone can help?
AWS(BGP)-> internet facing FW(BGP)->internal FW(BGP+OSPF)->internal switch(OSPF)
Support
06-01-2022 10:51 AM
Hi
With route-map you can use "set tag X" and then you can redistribute into OSPF with that route-map.
06-01-2022 11:10 AM
this not work,
below is my configuration
router bgp 65532
bgp router-id 10.255.255.10
bgp log-neighbor-changes
neighbor 10.194.0.253 remote-as 65531
!
address-family ipv4
redistribute connected
redistribute ospf 1 metric 2 match internal external 1 external 2 nssa-external 1 nssa-external 2
neighbor 10.194.0.253 activate
neighbor 10.194.0.253 default-originate route-map OSPF-to-BGP
neighbor 10.194.0.253 weight 50000
neighbor 10.194.0.253 route-map 10-IN in
neighbor 10.194.0.253 route-map 10-OUT out
no auto-summary
no synchronization
exit-address-family
!
!
ip community-list 2 permit 2000
!
!
!
route-map 10-IN permit 10
match community 2
set tag 2000
I get this error when set the route-map
% "10.194.0.253-IN" used as BGP inbound route-map, set tag not supported
06-01-2022 11:32 AM - edited 06-01-2022 04:58 PM
see my below comment
06-01-2022 12:00 PM
Hi @Support ACME ,
You can accomplish that using a table-map.
router bgp 999
table-map setTag
!
route-map setTag permit 10
match community 1
set tag 998
route-map setTag permit 20
match community 2
set tag 999
!
ip community-list 1 permit 2:1
ip community-list 2 permit 2:2
,
You can use a prefix-list or an access-list as a match instead of the community-list if you want.
Regards
06-01-2022 05:00 PM - edited 06-01-2022 05:00 PM
I do lab and finally I success to add TAG to eBGP prefix when it redistribute from eBGP into OSPF after match the community,
BUT
the trick is not apply match community directly under the route-map BUT we will match ext community-list
match the community we receive from eBGP and set TAG as we want.
so instead of use community use extcommunity-list
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