12-02-2020 12:47 PM
As per attached diagram , CSR is receiving 6.6.6.6/32 from R6 as BGP external route.
CSR belongs to AS number 500 and R6 is belongs to BGP AS number 600.
Router#sh ip route 6.6.6.6
Routing entry for 6.6.6.6/32
Known via "bgp 500", distance 20, metric 0
Tag 600, type external
Redistributing via ospf 100
Last update from 192.168.10.2 04:02:55 ago
Routing Descriptor Blocks:
* 192.168.10.2, from 192.168.10.2, 04:02:55 ago
Route metric is 0, traffic share count is 1
AS Hops 1
Route tag 600
MPLS label: none
I have not manually set tag for 6.6.6.6/32 but CSR has automatically set tag 600 for BGP route and being appeared in the routing table.
I would like to know that how does BGP set automatic tag ? In this topology tag and neighbor AS number value is same, is it co-related?
Thanks in advance
12-02-2020 01:16 PM - edited 12-02-2020 03:40 PM
Thanks a lot for this question
https://ccieblog.co.uk/bgp/bgp-automatic-tag-as-path-tag
See automatic tag add when redistribute bgp
12-02-2020 05:49 PM - edited 12-02-2020 06:14 PM
Hi Rateesh,
This is indeed the default behavior with IOS. It is used to indicate which ASN it comes from (600 in your case) and can be used to avoid advertising back to the original AS, using the "set as-path tag" when redistributing from the IGP to BGP.
Regards,
12-03-2020 12:53 PM
12-03-2020 02:02 PM
I think it not only for ios but also for ios-xe and ios-xr but for nex-os i am not so sure.
02-09-2022 05:33 AM
I do confirm that the behavior is the same on IOS-XE (tested on branch 3.16).
To be accurate, the tag is set on the BGP NLRI with the value of the last ASN. It is not set with the origin ASN of the path.
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