03-13-2023 11:48 AM
Hello,
I am trying to "tag" with an extcomm a route via a route-policy in network command and I am getting the following error:
router bgp 65501
address-family ipv4 unicast
network 192.168.0.0/24 route-policy TAG_INBOUND(EXT_1, EXT_2, EXT_3)
!!% Could not find entry in list: Policy [TAG_INBOUND] uses 'add rt'. 'set' is not a valid operator for the 'rt' attribute at the bgp network-dflt attach point.
The command that I used is the following
router bgp 65501
address-family ipv4 unicast
network 192.168.0.0/24 route-policy TAG_INBOUND(EXT_1, EXT_2, EXT_3)
The route-policy is the following:
route-policy TAG_INBOUND($VAR1, $VAR2, $VAR3)
set extcommunity rt $VAR1 additive
set extcommunity rt $VAR2 additive
set extcommunity rt $VAR3 additive
end-policy
Any thoughts?
03-13-2023 12:29 PM
Hi @ez9 ,
the route target extended community is used in the l3vpn context. You can use an export route-policy under the vrf xxx configuration to set it. It is not valid in the context where you are trying to use it.
Regards,
03-13-2023 12:50 PM - edited 03-13-2023 12:52 PM
sorry I thinnk he must config it under VRF OR under vpnv4.
https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_bgp/configuration/15-mt/irg-15-mt-book/irg-vpn-distinguisher.html
03-13-2023 01:01 PM
Hi @MHM Cisco World ,
It is more common to configure it using an export route-policy under the VRF as follow:
RP/0/0/CPU0:ios#sh runn vrf
vrf test
address-family ipv4 unicast
import route-target
109:1
!
export route-policy test
export route-target
109:1
!
!
!
RP/0/0/CPU0:ios#sh runn route-policy test
route-policy test
set extcommunity rt test
end-policy
!
Regards,
03-13-2023 01:11 PM
SUPER ANSWER ALWAYS
03-15-2023 02:51 AM
Hello,
Thank you for your answers. I don't have VRF configured and I am not using l3vpn. I just want the route target extended community to tag some routes. So, if I understand correctly I can't use the extended community in network command. I should only use standard communities.
03-15-2023 02:59 AM
Yes,
the VPNv4 is change only the protocol add RT to prefix.
sure you can use community but be sure to make routers send community (meaning add commend for send community).
03-15-2023 06:33 AM
Hi @ez9 ,
This is not really te purpose of extended communities. What are you trying to achieve? Why don't you use regular communities to tag the routes?
Regards,
03-15-2023 06:52 AM
Thanks for the answer. The use case is in an IXP where I should tag the prefixes with extended communities (because of 32bit ASN).
eg: https://www.ams-ix.net/ams/documentation/ams-ix-route-servers
03-15-2023 09:35 AM - edited 03-15-2023 10:09 AM
Hi @ez9 ,
Thanks for the additional information. It is really helpful. I just checked and although it is not possible to set the rt extended community using the network statement route-policy, it is possible to set it using and outbound policy.
Also, according to the following statement from the page you sent, it looks like the preferred approach is to use the large community.
"Please note that AMS-IX is planning to drop the support for the Extended communities as their functionality is fully covered from the Large communities."
Large communities are supported in XR and they can even be applied using the network statement like in you original post.
route-policy test
set large-community (66000:65535:65535)
end-policy
!
router bgp xxx
address-family ipv4 unicast
network x.x.x.x/32 route-policy test
neighbor a.b.c.d
address-family ipv4 unicast
send-community-ebgp
Regards,
03-15-2023 03:37 AM
Are you sure that only VPNv4 af can add RT communities? I am using rpl that adding ext rt communities on inbound ipv4 af neighbors.
03-15-2023 01:10 PM
VPNv4 add RT to prefix if your need to advertise prefix from router to router
also you can use RT in same router for VRF-leaking.
03-15-2023 01:19 PM - edited 03-15-2023 01:22 PM
Hi @MHM Cisco World ,
This is not a VPNv4 scenario. Please refer to the following document provided by @ez9 and to the solution I provided in this thread.
https://www.ams-ix.net/ams/documentation/ams-ix-route-servers
Regards,
03-15-2023 01:28 PM
if you have
R1-R3-R2
in R1 you have multi VRF <<- between VRF in same router here RT use for leaking
in R2 you have multi VRF <<- between VRF in same router here RT use for leaking
NOW if he want to advertise VRF from R1 to R2, he need VPNv4 (which I called it neutral since no vrf config in VPNv4 but it carry prefix that it vrf-aware (via RT)
the route server is only forward the prefix it have not effect how we config RT.
so if he config R3 then he must config VPNv4 and R3 will forward any prefix from R1 to R2.
so if the prefix is with RT then the R3 will forward it as it.
03-15-2023 01:41 PM
Hi @MHM Cisco World ,
This is not a VPNv4 nor a VRF setup. The goal is to use the rt extended community to propagate the 4 byte ASN to the internet exchange route server, since regular communities only handle 2 byte ASN. What I found is that it is possible indeed to attach a rt to an "ipv4 unicast" advertisement, but this is just a workaround as I see it.
The better way to achieve the original poster's goal is to attach a large community (RFC8092) to the ipv4 unicast prefix. This is supported in XR.
Regards,
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