Routing

last person joined: 4 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.  Do you think this command is correct ?

    Posted 08-02-2016 19:38

    Do you think following command are correct ?

    I know if 20 and 30 are replaced by 10, they would be correct.

     

    Thank you

     

    set policy-options policy-statement IMPORT_POLICY term 10 from prefix-list ABC
    set policy-options policy-statement IMPORT_POLICY term 20 then community set WXA
    set policy-options policy-statement IMPORT_POLICY term 30 then accept 


  • 2.  RE: Do you think this command is correct ?
    Best Answer

     
    Posted 08-02-2016 19:50

    It is incorrect as it is ,as each are different terms and cannot be evaluated individually (term 1 is a subset of term 2 and term 3(term 2 and 3 will impose the policy on non-matching sets of route as well) ,this will not serve the purpose of setting only prefixes from prefix list ABC with community WXA)



  • 3.  RE: Do you think this command is correct ?

    Posted 08-02-2016 20:47

    Thank you



  • 4.  RE: Do you think this command is correct ?

     
    Posted 08-02-2016 21:40

    Hi,

     

    I believe the policy-statement is a valid one, however may not be what you require.

    Junos will evaluate the policy as follows:

    term 10: Prefixes in prefix-list ABC will be matched and no action -> Next term evaluated
    term 20: All prefixes match this and will have community set to WXA
    term 30: All prefixes match this and will be accepted

    _______________________________________________________________________________________

    It is incorrect as it is ,as each are different terms and cannot be evaluated individually

    _______________________________________________________________________________________

    I don't think this is correct. The terms will still be evaluated individually.

     

    If you meant by replacing with 10:

    set policy-options policy-statement IMPORT_POLICY term 10 from prefix-list ABC
    set policy-options policy-statement IMPORT_POLICY term 10 then community set WXA
    set policy-options policy-statement IMPORT_POLICY term 10 then accept

    It is a also valid policy and evaluation is as follows:

    term 10: Prefixes matching prefix-list ABC will have community set to WXA and accepted

    Cheers,

    Ashvin

     



  • 5.  RE: Do you think this command is correct ?

     
    Posted 08-02-2016 22:02

    I beleive the context of the question was whether the above said policy statement will set community WXA ,only for prefixes from prefix list ABC and accept the same.

     

    "It is incorrect as it is ,as each are different terms and cannot be evaluated individually"

     

    The above said statement was also explained based on the context of the problem .What was mentioned was since term 2 and term 3 was not related to term 1, it cannot be evaluated (term 2 matches to all prefixes , term 3 matches to all prefixes , whereas term 1 matches to only to prefixes in prefix list ABC )

     

    The mentioned terms will set community WXA, which will not serve the purpose , as the objective is to set community WXA  only to prefix list ABC . 

     

    May be I have worded things in a different way, but this is  what I meant by the explanation