Routing

last person joined: 3 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.
Expand all | Collapse all

Why cannot I delete existing command "policy-options policy-statement ......" ?

  • 1.  Why cannot I delete existing command "policy-options policy-statement ......" ?

    Posted 01-06-2017 09:57

     

    Hi

     

    Why cannot I delete the below command?  

     

    AC1#delete policy-options policy-statement IN term 85 from route-filter 1.4.13.52/30 orlonger

     

    After I use the above command, the below command is used. Please see its output:

     

    AC1# show | compare
    [edit policy-options policy-statement IN term 85 from route-filter 1.4.13.52/30 orlonger]- accept;



  • 2.  RE: Why cannot I delete existing command "policy-options policy-statement ......" ?
    Best Answer

     
    Posted 01-06-2017 17:04

    Hi eesunj,

    Actually I got this, you are trying to do delete operation under policy-options configuration hierarchy . I assume that there are two or more configuration parameters under the < policy-options policy-statement IN term 85 from route-filter 1.4.13.52/30 orlonger >  policy-options configuration hierarchy  level.

     

    lab# show policy-options policy-statement IN term 85 from route-filter 1.4.13.52/30 orlonger                   

    local-preference 200;

    accept;

     

    As you are specifically deleting the only one parameter in the level “delete policy-options policy-statement IN term 85 from route-filter 1.4.13.52/30 orlonger accept”; it will not delete the entire policy or the entire term IN or the entire “from route-filter 1.4.13.52/30 orlonger” configuration hierarchy .

     

    Example:

    Current Configuration [Assumtions with 2 or more config parameters]:

    [edit]

    lab# show policy-options policy-statement IN                                                          

    Jan 07 00:33:30

    term 85 {

        from {

            route-filter 1.4.13.52/30 orlonger {

                local-preference 200;

                accept;

            }

        }

    }

     

    [edit]

    lab# commit                                                                                          

    Jan 07 00:33:34

    commit complete

     

    [edit]

    lab# show policy-options policy-statement IN   

    Jan 07 00:33:58

    term 85 {

        from {

            route-filter 1.4.13.52/30 orlonger {

                local-preference 200;

                accept;

            }

        }

    }

     

    This is expected <<<

    [edit]

    lab# delete policy-options policy-statement IN term 85 from route-filter 1.4.13.52/30 orlonger accept          

    Jan 07 00:34:08

     

    [edit]

    lab# show | compare                                                                                            

    Jan 07 00:34:14

    [edit policy-options policy-statement IN term 85 from route-filter 1.4.13.52/30 orlonger]

    -      accept;

     

    Since we have one more configuration parameter in the same hierarchy  “policy-options policy-statement IN term 85 from route-filter 1.4.13.52/30 orlonger”

     

    [edit]

    lab# show policy-options policy-statement IN                                                            

    Jan 07 00:34:29

    term 85 {

        from {

            route-filter 1.4.13.52/30 orlonger {

                local-preference 200;

            }

        }

    }

     

    Other OPTIONs:

    Alternatively based on your requirement you can also delete at different configuration hierarchy  as below to the config below the hierarchy ,

     

    [edit]

    lab# delete policy-options policy-statement IN term 85                                                  

     

    or

     

    [edit]

    lab# delete policy-options policy-statement IN

     

    or

     

    [edit]

    lab# delete policy-options policy-statement IN term 85 from

     

    -Python

    #Please mark my solution as accepted if it helped, Kudos are appreciated as well.



  • 3.  RE: Why cannot I delete existing command "policy-options policy-statement ......" ?

    Posted 01-07-2017 11:53

    Right, Thank you!