Routing

Expand all | Collapse all

question about bgp route tag

Jump to Best Answer
  • 1.  question about bgp route tag

    Posted 05-18-2021 14:24
    I have the following topology
    I have the following configuration on vMX2 to tag 1.1.1.1 learnt from vMX1
    vMX2
    set policy-options policy-statement AddTag term 1 from protocol bgp
    set policy-options policy-statement AddTag term 1 from external
    set policy-options policy-statement AddTag term 1 from route-filter 1.1.1.1/32 exact
    set policy-options policy-statement AddTag term 1 then tag 510
    set policy-options policy-statement AddTag term 1 then accept
    
    set protocols bgp group TovMX1 import AddTag
    
    root@vMX2# run show route 1.1.1.1 extensive | match Tag
                            Tag: 510
    ​

    Is this tag supposed to be carried to vMX3 and vMX4 ?

    I could not see the tag on vMX3 and vMX4.

    Did I miss something here ?

    thanks !!



  • 2.  RE: question about bgp route tag
    Best Answer

     
    Posted 05-18-2021 17:13
    I don't use tags but believe they are local use only.

    We use communities to add an attribute to a route that will then be shared to other neighbors that we send that route to.

    ------------------------------
    Steve Puluka BSEET - Juniper Ambassador
    IP Architect - DQE Communications Pittsburgh, PA (Metro Ethernet & ISP)
    http://puluka.com/home
    ------------------------------



  • 3.  RE: question about bgp route tag

    Posted 05-18-2021 17:33
    thanks a lot !
    I remembered some time ago I used tag for Cisco this way, But I could not remember it exactly. So I tried the same thing for Juniper to see if it works.


  • 4.  RE: question about bgp route tag

     
    Posted 05-19-2021 05:39
    BGP communities is the IETF standard for this function that makes it not only cross systems but vendors too.  The juniper implementation docs are here.

    https://www.juniper.net/documentation/en_US/junos/topics/concept/policy-bgp-communities-extended-communities-match-conditions-overview.html

    ------------------------------
    Steve Puluka BSEET - Juniper Ambassador
    IP Architect - DQE Communications Pittsburgh, PA (Metro Ethernet & ISP)
    http://puluka.com/home
    ------------------------------



  • 5.  RE: question about bgp route tag

    Posted 05-19-2021 10:28
    thanks so much !!!


  • 6.  RE: question about bgp route tag

    Posted 05-20-2021 13:59

    Y'all made me curious, and as Steve mentioned, this "tag" and "tag2" option apparently, with BGP, is locally significant only.  I'm wondering if Juniper allows it to some how propagate outside of the router when used in an OSPF or IS-IS policy as I read that it sets something in External LSA's or TLV's (respectively)... but of course your topic is bgp-related.

    I read here that it is in fact, used with BGP on import policy direction only, and is a 2^32 number... I'm thinking, when tags are set, they are then later used as influencers into what the local bgp table decides.

    https://www.juniper.net/documentation/partners/ibm/junos11.4-oemlitedocs/config-guide-routing-policy.pdf 

    p.s. i could see where the confusion may come with bgp community "tags" since when searching through docs the word "tag" is used to describe a bgp community... so I wish they would've simple called it just that.... a bgp community attribute, so as not to confuse one with the other   :)



    ------------------------------
    Aaron Gould
    Senior Network Engineer
    aaron@gvtc.com
    https://www.linkedin.com/in/agould123/
    ------------------------------



  • 7.  RE: question about bgp route tag

    Posted 05-20-2021 14:36
    thanks for taking a look.  I tried to tag some advertised BGP routes to let the remote routers to manipulate them.  I tired to see if this is option vs. community.  I used tag in Cisco routers before, but could not remember exactly if I used for BGP.  I will dig a little more later.