Routing

 View Only
last person joined: 2 days ago 

Ask questions and share experiences about ACX Series, CTP Series, MX Series, PTX Series, SSR Series, JRR Series, and all things routing, including portfolios and protocols.
  • 1.  Need assistance for BGP policy

    Posted 01-16-2021 20:17
    anyone can help me to understand the difference between the following two?

    set policy-options policy-statement FromISP2 term 1 then community set no-export

    set policy-options policy-statement FromISP2 term 1 then accept

    set policy-options policy-statement FromISP2 term 2 then local-preference 150

    set policy-options policy-statement FromISP2 term 2 then accept

     

    set policy-options policy-statement FromISP2 term 1 then community set no-export

    set policy-options policy-statement FromISP2 term 1 then local-preference 150

    set policy-options policy-statement FromISP2 term 1 then accept

     

    set protocols bgp group ToISP2 import FromISP2

    if I used the first one, only community applied. but the second one applies both.

    what have I missed ?

    thanks a lot !!



  • 2.  RE: Need assistance for BGP policy
    Best Answer

    Posted 01-16-2021 20:28
    As soon as a prefix matches a term the next and following terms are no longer processed. 

    The second policy properly combines the two desired items into the same term.

    We need to arrange the order of terms such that when your match conditions process the prefixes they fall through the non-match terms first and the desired matching term is the next one they hit.

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



  • 3.  RE: Need assistance for BGP policy

    Posted 01-16-2021 20:34
    thanks so much for such a quick assistance !!


  • 4.  RE: Need assistance for BGP policy

    Posted 01-16-2021 22:01
    One more questions.
    If I like to export multiple ospf routes and only default generated route to BGP,   how should the policy look like?

    The following does not work. It  only exports 0.0.0.0/0.
    set policy-options policy-statement ISP-UP term 1 then accept
    set policy-options policy-statement exp2DC term 1 from protocol aggregate
    set policy-options policy-statement exp2DC term 1 from protocol ospf
    set policy-options policy-statement exp2DC term 1 from route-filter 0.0.0.0/0 exact
    set policy-options policy-statement exp2DC term 1 then next-hop self
    set policy-options policy-statement exp2DC term 1 then accept

    thanks in advance !!


  • 5.  RE: Need assistance for BGP policy

    Posted 01-16-2021 22:09
    Edited by ylara 01-16-2021 22:10
    Your policy is matching on routes that are aggregate OR OSPF AND  0/0. In other words: 

    routes that match either aggregate AND 0/0  OR 
    routes that match OSPF AND 0/0

    If you want to advertise OSPF routes  AND the 0/0 aggregate, you need two terms:


    set policy-options policy-statement exp2DC term 1 from protocol aggregate
    set policy-options policy-statement exp2DC term 1 from route-filter 0.0.0.0/0 exact
    set policy-options policy-statement exp2DC term 1 then next-hop self
    set policy-options policy-statement exp2DC term 1 then accept
    set policy-options policy-statement exp2DC term 2 from protocol ospf
    set policy-options policy-statement exp2DC term 2 then next-hop self
    set policy-options policy-statement exp2DC term 2 then accept

    Regards, 



  • 6.  RE: Need assistance for BGP policy

    Posted 01-16-2021 22:14
    thanks a million !!


  • 7.  RE: Need assistance for BGP policy

    Posted 01-16-2021 22:18