01-10-2021 01:22 AM
I have 2 routers in 2 different AS. R1 is learning routes from the ospf 1 process. Some of these routes are tagged as 604 in OSPF. So, what I want to do it’s to advertise these tagged routes to R2 via BGP.
I thought it would be just as simple as to create a route map with the match tag 604 statement in one of its entries and then append this route map to the neighbour statement in the BGP process. However, I just discover, the match tag command is not supported in BGP (at least not in VIRL) because when I apply the route map to the neighbour statement in R1 I get the following message and notice that I am still receiving the whole of the ospf routing table from R1 when I check in R2 (192.168.125.34).
% "TAGGED" used as BGP outbound route-map, tag match not supported
% not supported match will behave as route-map with no match
Can someone suggest a way to advertise the ospf tagged routes to the neighbour R2 via BGP? I will also need to advertise a few more routes which are learnt from other BGP neighbours and the same OSPF process, but they are not tagged. These other routes are not many and can advertise them to the neighbour using a prefix-list or ACL.
R1 BGP process
router bgp 65321
bgp router-id 192.168.1.1
bgp log-neighbor-changes
timers bgp 10 30
neighbor 192.168.125.34 remote-as 65322
neighbor 192.168.126.81 remote-as 65323
!
address-family ipv4
redistribute connected
redistribute static
redistribute ospf 1 match external 1 route-map RTM-4_REDISTRIBUTE_OSPF-1
neighbor 192.168.125.34 activate
neighbor 192.168.125.34 soft-reconfiguration inbound
neighbor 192.168.126.81 activate
neighbor 192.168.126.81 soft-reconfiguration inbound
neighbor 192.168.126.81 route-map ROUTES_IN_19216812681 in
neighbor 192.168.126.81 route-map ROUTES_OUT_19216812681 out
default-information originate
exit-address-family
This route map, has various entries, one of which has the match tag 604. However, it also has other entries matc hing other tags and ACLs taht I do not want to send to the neighbour.
route-map RTM-4_REDISTRIBUTE_OSPF-1
Thank you in advance for your time.
01-10-2021 11:31 AM - edited 01-10-2021 11:36 AM
All
How can an originated prefix from an igp be redistributed with tag into bgp and be understood by bgp?
What mean is when does an igp tag prefix become an bgp prefix with an attribute based in a igp tag?
01-11-2021 09:36 AM
BGP use attributes and there is no attributes for tag, this is why I use community-list
use MAPPING
tag = community-list one site, this map is happened at BGP "this BGP is outbound"
community-list = tag other site this map is happened at OSPF
03-23-2022 01:47 AM
Hi, I am facing the same problem with my setup. Have you find a solution ?
03-23-2022 06:33 AM
Hi @JEROME BOSC ,
You could set a specific community for a given tag while redistributing the IGP prefixes into BGP and carry that value through BGP.
Regards,
03-23-2022 06:54 AM
See my comment above.
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